Posts

Showing posts from June, 2014

Android Toolbar collapseMode issue -

Image
i have issue making " toolbar title text " not collapse while scrolling upwards in collapsingtoolbarlayout. i have tried few tweaks, using app:layout_collapsemode="none" attribute in android.support.v7.widget.toolbar not working. maybe there problem layout. below trying achieve. but when scroll top, toolbar collapse, , tabbar scrolls inside, , become non-visible. below have now. this layout code <android.support.design.widget.coordinatorlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.design.widget.appbarlayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content"> <android.support.design.widget.collapsingtoolba...

android - CheckBox unhide on GridView -

i did set checkbox visibility "gone" , in xml file , , want unhide when go onitemlonglistnere , on gridview , other words , if have 8 pics in gridview , want unhide checkbox each photo! thanks my gridviewadapter public class gridviewadapter extends baseadapter { // declare variables imageview image; private activity activity; private string[] filepath; private string[] filename; private static layoutinflater inflater = null; public gridviewadapter(activity a, string[] fpath, string[] fname) { activity = a; filepath = fpath; filename = fname; inflater = (layoutinflater) activity .getsystemservice(context.layout_inflater_service); } public int getcount() { return filepath.length; } public object getitem(int position) { return position; } public long getitemid(int position) { return position; } public view getview(int position, view convertview, viewgroup parent) { view vi = convertview; if (convertview == null) ...

android gradle - UiAutomator 2.0 and Eclipse -

is there way compile uiautomator 2.0 eclipse , ant? i have added android.jar , uitautomator.jar files android-23 no avail. eclipse still not see uiautomator 2.0 specific methods uiobject2 . i have attempted build .jar file ant in gradle generates required .jar file works uiautomator 1.0 . used method detailed here . i know android officially supports android studio+gradle setup requires usage of standalone uiautomator.jar file ant builds, not supported (at least far know) android studio , gradle. will appreciate push in right direction.

c# - how to make string type nullable -

i want make middle name of person optional. have been using c#.net code first approach. integer data type easy using "?" operator make in nullable. looking way make sting variable nullable. tried search not find way make nullable. below code. please suggest me how make nullable. public class childreninfo { [key] public int chidrenid { get; set; } [required] [display(name ="first name")] [stringlength(50,errormessage ="first name cannot exceed more 50 characters")] [regularexpression(@"^[a-z]+[a-z]*$",errormessage ="name cannot have special character,numbers or space")] [column("fname")] public string cfname { get; set; } [display(name ="middle name")] [regularexpression(@"^[a-z]+[a-z]*$",errormessage ="middle name cannot have special character,numbers or space")] [stringlength(35,errormessage ="middle name cannot have more 35 characters...

php - Remove part of string after third occurrence of certain character -

i have special case have whole range of different strings in array. what need remove last part of string @ third occurrence of /. example: accessories / mens accessories / bags wallets / messenger bags / so here want remove: messenger bags / how possible php - remember have lot of different strings! can't take position it's different each time. //here have 4 elements $parts = explode ('/', $string); //this glue first 3 elements list ($first, $second, $third) = $parts; //here can see desired result var_dump (implode ('/',array($first, $second, $third))); output string 'accessories / mens accessories / bags wallets ' (length=46)

css - gulp-ruby-sass - 'sass' is not recognized as an internal or external command, operable program or batch file -

i'm trying run gulp-ruby-sass on windows. i've installed ruby , sass that: $ gem install sass my gulp.task looks this: gulp.task('styles', function() { return sass('src/scss/**/*.scss') .on('error', sass.logerror) .pipe(gulp.dest('css')); }); when cd root directory of project , run $ gulp styles , this: [22:54:52] using gulpfile c:\wamp\www\wordpress\ wp-content\themes\bootscores\gulpfile.js [22:54:52] starting 'styles'... [22:54:52] 'sass' not recognized internal or external command, operable program or batch file. error in plugin 'gulp-ruby-sass' message: gem undefined not installed. [22:54:52] finished 'styles' after 89 ms i've been searching solution problem 2 hours , still haven't found 1 me. i've found solution. i had manually add path ruby bin folder in control panel > system > advanced > environment variables. here added new variable named pa...

performance - Backbone object memory questions -

have backbone-driven app, , looking information on performance. @ point in time, app managing between 2,500 , 15,000 objects (specifically, models, spread across maybe 50 collections) i'm trying find details on backbone can handle (each object quite small, small set of custom-methods available it) any direction great. thanks it not question of can backbone handle is amount of available memory @ runtime. 15,000 objects quite few store in mem, might have rendering performance issues if try display each object page element(s) though. you can try standard memory profiling ( https://developer.chrome.com/devtools/docs/heap-profiling ) or check backbone debugger ( https://chrome.google.com/webstore/detail/backbone-debugger/bhljhndlimiafopmmhjlgfpnnchjjbhd ).

vb.net - How to make a C# or VisualBasic Strobe light (Microphone) -

how make c # or visual basic strobe light flashes according microphone? add picture box form , write in code behind :) (without microphone function) var request = webrequest.create("http://www.djinmelbourne.com/lighting_effect.gif"); using (var response = request.getresponse()) using (var stream = response.getresponsestream()) { picturebox1.image = bitmap.fromstream(stream); } psst.. please read rules/faq's before ask question next time!

swift - Can't I use nil for 'undefined' on parse? -

i making simple app, , implementing userinformation part. user can edit info, have trouble if user doesn't put info, crash when try retrieve data undefined column. this code retrieve user data.now can check specific value, still, got error 'undefined' one. var query = pfquery(classname: "note") query.getobjectinbackgroundwithid("kg8khawcms", block: { (obj, error)in if let obj = obj! as? pfobject { let nickname = (obj.objectforkey("text")) as! string if (nickname != nil) { ///// have error message binary operator'!=' cannot applied operands of type 'string' , 'niliteralconvertible' self.nicknamelabel.text = nickname }else{ self.nicknamelabel.text = "you don't have nick name" } } else { print(error) } }) what 'niliteralconvertible' ? , i've t...

java - Copying parallel arrays to new parallel arrays without duplicates -

i writing method takes 2 parallel arrays , int size variable keep track of indexing. example string[] names = new string[100]; //partially filled array int[] scores = new int[names.length]; //scores each plater int entry = 0; names[size] = "bob"; scores[size] = 20; size++; the above code indicates on first entry in "list" tis of bob has score of 20. i writing method takes names array, scores array, , size variable. must copy information of arrays passed on new arrays duplicate entries 1 entry , sum aligned. so example if there original list name: bob, score: 20 name: paul, score: 30 name: bob, score: 10 //size - 3 so new parallel arrays must name: bob, score: 30 name: paul, score 30 //size - 2 i have created method, , add sum of names, stuck on process of removing duplicates. public static void totaldurations(string[] oldnames, int[] oldscores, int oldsize) { string[] newnames = new string[100]; int[] newscores = new int[newnames.leng...

html - Text moving with transform grow -

i have 2 thing trying solve. the moving text, when hover on link. (smaller) span elements not equal (or circle quarter isn't, shouldn't possible, since width , height match.) it possible solve first problem giving link position: absolute , not option. component used within flexbox, absolute kill. body{ margin: 0; } p{ position: relative; } a{ transition: .2s ease-in-out; display:block; box-sizing: border-box; /* position: absolute; */ font: 18px monaco, monospace; color: #fff; } a:hover{ transform: scale(1.1); } a#top-left-circle{ width: 90px; height: 90px; background: #006699; border-radius: 0 0 90px 0; -webkit-border-radius: 0 0 90px 0; border: 2px dashed #fff; box-shadow: -1px -1px 3px 5px rgba(0, 102, 153, 0...

php - Laravel complex query with eloquent -

i'm new laravel , eloquent , can't find example of i'm trying , lets have 3 tables b c , , of them have many many relations ships a - ab - b - bc - c. ab : table contains key , b. bc : table contains key b , c. what if want find c objects using (a_id = 1) ? i tried a::find(1) -> b() -> c()->get() ; b() method created b objects in model. c() method created c objects in b model. what doing wrong ? hope question , example clear. best regards. eloquent offers hasmanythrough relationship shortcut, supports one-to-many relations between models. there various workarounds in this thread on laravel.io forum. following short solution taken that thread i've tested , has worked. needs added base model models extend: public function manythroughmany($related, $through, $firstkey, $secondkey, $pivotkey) { $model = new $related; $table = $model->gettable(); $throughmodel = new $through; $pivot = $throughmodel->gettable(); ...

php - Need to preg_replace "/|/" -

$title = preg_replace("/|/", "", $title); in case you're wondering "/|/" it's sign on same key backslash, except use shift key use it. it doesn't if in example. there must way of removing it. i don't know exacly if want remove pipe | or literally /|/ here 2 examples: $title = "hi | there"; $text = preg_replace("/\|/", "", $title); echo $text; //"hi there"; $title = "hi /|/ there"; $text = preg_replace("/\/\|\//", "", $title); echo $text; //hi there

osx - Exclude specific resource for a pod iOS -

i'm creating pod have xib file, pod should work osx , ios when run: pod lib lint i error: /users/folder/pod/assets/myxib.xib /* com.apple.ibtool.errors */ /users/folder/pod/assets/myxib: error: ios xibs not support target device type "mac". how exclude file mac target? according cocoapods reference , use multi-platform support: for example 1 might want store resources specific ios projects. spec.resources = "resources/**/*.png" spec.ios.resources = "resources_ios/**/*.png"

excel - Import/append cell from one column (newrawdata) to another column (centrallibrary) if not preexisting - date error with Match Function -

the code below uses match function check if new set of values stored in cells of column c exists within pre-existing range stored in column a. if so, within msgbox prompt, row corresponding value displayed. otherwise, error n/a handled "if iserror" statement, append value in question next empty row within column a problem: this works text , numbers, match function doesn't seem correctly return dates. date value gets appended bottom of column a, regardless if pre-existing. likely error: formatting or value of date within match function to note: below line set comment, creates error dates when uncommented - used display row data found within column a 'msgbox ("data pre-exists in row " & matchans) happy provide examples. option explicit sub appendnewrecords() 'example used - column a, listed number of values including numbers, dates , text, 'column c contains new raw data matching column , not, 'append new raw data ...

javascript - Why does this jquery each() loop doesn't operate on unique classes -

i'm trying make jquery function work on classes unique identifier.. seems isn't adding var element... how do this my code this... var x = 1; $('.newest_posts').each(function() { $('.showfull' + x).on('click', function(e) { $('.newest_small' + x).hide(); // hide image preview on delete click $('.newest_full' + x).show(); // hide image delete link on click e.preventdefault(); }); x = x + 1; }); not versed in jquery i'm stumbled because have code works hiding them first var = 1; $('.newest_posts').each(function() { $('.newest_full' + i).hide(); = + 1; }); you have ask question: x equal when click handler called ? not equal x value when registered handler, equal value of x after loop has completed. assuming nothing else modified it, equal $(.newestposts).length() + 2 . here quick...

How to deal with punctuation in an ElasticSearch field -

i have field in document stored in elastic search, want analyzed full text field. in 1 case, contains value name field this: a&b corp i want able search documents auto-complete widget, using query (suppose user typed a&b autocomplete field). intention match documents contain terms typed prefix. { "query": { "filtered": { "query": { "query_string": { "query": "a&b*", "fields": [ "firstname", "lastname", "name", "key", "email" ] } }, "filter": { "terms": { "environmentid": [ "foo" ] } } } } } ``` my mapping name field looks this: "name": { "type": "string" }, but, no results. ...

java - Selenium xpath not found -

i tried xpath("//*[@id='btn-conv-view']") click button in selenium web driver java code , didn't seem work. html below: <button id="btn-conv-view" class="btn btn-absolute btn-view-dd" role="button" tabindex="-1" aria-haspopup="true" title="more view options" data-action="menu"> <span class="icon-text" id="yui_3_16_0_1_1443572970628_2273">sort date</span> <b class="icon icon-chevron-down" id="yui_3_16_0_1_1443572970628_2377"></b> </button> you can use of ways find element needed: driver.findelement(by.id("btn-conv-view")).click(); driver.findelement(by.xpath("id('btn-conv-view')")).click(); driver.findelement(by.cssselector("#btn-conv-view")).click();

javascript - Subtract 1 from unique concatenated variables -

so i've wrote script gives user option add more 1 image form. if user chooses add more 1 image, click 'add image' button, , file field added. when new file field added, id given field unique. first field statically set "1". if user clicks 'add image', second field given id of "2", "3" etc etc. has been working successfully. note: i'm not giving them option remove first file field @ all. the issue: due fact want check each file field has got file ready upload, i've decided add 'remove image' next each field when 'add image' button selected. ideally, when user clicks 'remove image' button, id of fields after field changed -1. eg: user has inserted 5 additional file fields using 'add image' button, , have clicked on 'remove image' button next file field id of '3', meaning '4', '5' , '6' should become '3', '4' , '5'. ...

c# - LiveSDK 5.6.3 not working in UWP store app -

Image
i have universal windows store app targeting windows 10. in previous version of app targeting windows 8.1 used livesdk ( the 5.6 version here ) access data user's ms live account using liveauthclient . in new version of app, figured i'd use recent version of livesdk ( 5.6.3 available nuget package here ) when install nuget package, unable to access microsoft.live namespace. for example, following statement: using microsoft.live; produces error "the type or namespace 'live' not exist in namespace 'microsoft'" is package broken or missing obvious here? have expected work did 5.6 version of livesdk. seems documentation livesdk pointing info onedrive api makes me wonder if purpose of sdk has changed. i'm confused... what's recent version of livesdk (the 1 has liveauthclient ) , can find it? i'm not sure why nuget manager doesn't add reference automatically, seems work once add reference manually directory: c:\users\...

visual studio - TFS 2013 View member photo (Avatar) -

Image
i have tfs 2013 setup , linked mt ad group members. member list appears ok, unable view photo or avatar, feature available? thanks. yes, can add avatar 1 member. on tfs portal, click member name on right-top corner, , select my profile . on user profile page, select change picture link choose phone want.

xml - XQuery to merge elements and children -

i'm working large volume of xml files have common elements repeated across them. i've been able concatenate them single file , sort using xquery i'm having difficulty taking next step merge elements based on key identifiers. example, have xml file following structure: <example> <store id="111"> <manager id="123"> <employee> <employeeid>0001001</employeeid> <hiredate value="1-jan-2000"/> <action id="001" type="s"> <details id="a1"> <transactiontype>i</transactiontype> </details> <transactiontype>r</transactiontype> </action> <transactiontype>r</transactiontype> </employee> <transactiontype...

php - Get Records From Array Based On Value -

bottom line, have huge multidimensional array returned ldap_get_entries trying parse different groups based on location attribute. in powershell like: $location1 = get-aduser -filter * | ? {?_.l -eq "test_location"} what doing within php (as far brain let me go) like: foreach ($records $record) { if (isset($record['l'])) { switch ($record['l'][0]) { case "test_location1": $location1[] = $record; continue 2; case "test_location2": $location2[] = $record; continue 2; } } } i use foreach loop (alternative syntax) against array of location variables ($location1, $location2), used above method, sort records appropriate location variable. in way, build html table grouping each locations records together. build new table each location html code in between each group, don't believe sorting ldap results loc...

audio - Java: Mixing two WAV files without introducing noise -

i'm trying mix 2 wav files single wav file. files exact same duration , have same format (16 bit, 44.1 khz, signed, little endian, mono). both wavs put byte arrays using bytearrayoutputstream using audiosystem.getaudioinputsream ensure i'm getting pcm data , no headers. with of few other threads, i've been able combine arrays, not without introducing significant amount of noise signal. doesn't sound clipping or distortion, have tried averaging sum of each pair of bytes safety makes quieter, noise , all. any insight appreciated! i've tried 2 methods should same thing, , seem produce same sonic results. the first, simpler method: private byte[] mixbuffers(byte[] buffera, byte[] bufferb) { byte[] array = new byte[buffera.length]; (int i=0; i<buffera.length; i++) { array[i] = (byte) ((buffera[i] + bufferb[i])); } return array; } and second, more specific method: private byte[] mixbuffers(byte[] buffera, byte[] bufferb) { b...

javascript - How to Change Element Text on Mouse Click -

so, i'm new kind of stuff, , have question. found code picking random word, not picking again until word have been picked. function shuffle(array) { var m = array.length, t, i; while (m > 0) { = math.floor(math.random() * m--); t = array[m]; array[m] = array[i]; array[i] = t; } return array; } var keywords = ["cheese", "apples", "grapes", "chicken", "potatoes", "beef", "bananas"]; shuffle(keywords); // shuffles array alert(keywords); and brought question. how can trigger when white box, posing card, has been clicked? box display 1 of values @ 1 time, , randomly pick word when clicked, using code. any super appreciated. there no need use shuffle, can pick random item using like var keywords = ["cheese", "apples", "grapes", "chicken", "potatoes", "beef", "bananas"]; var mybox = document...

game maker - How do I empty a room? -

i have scrolling room in game, , want duplicate not have go views tab again , edit each new room. there way remove of objects in room @ once? third icon in room editor. select object tab , press icon - objects deleted. select 'tiles' tab , press icon - tiles in current layer deleted.

gcc cross compiler to dump RTL file -

i using gcc cross compiler arm-elf-gcc-4.4.2. can compile normally; however, when want view intermediate file adding -fdump-final-insns , gives me following error: cc1.exe: error: unrecognized command line option "-fdump-final-insns" is there other way dump intermediate file?

arrays - How to use findAll() in yii2? -

Image
i want know how can data of user array id where condition in yii this $students = student::model()->findall("id in ({$_post['studentids']})"); or $userdtls = student::model ()->findallbyattributes ( array ( 'id' => explode ( ",", $_post ['studentids'] ) ) ); now in yii2 cdbcriteria not there, approach should use achieve same thing?? i have tried returns data first id in array $result = users::findall([ 'id'=> $_post ['keylist']]); in documentation written can use this $result = users::findall([1,488,489]); but array $_post['keylist'] this keylist{ 0='1' 1='5' 2='8' } i have tried $ids = \yii::$app->request->post('keylist', []); $result = users::findall($ids); and still returns data first id in array here screenshot thats why doesnt work guess thank $users = users::findall($id...

arrays - Ruby enumerable - find up to n occurrences of matching element -

i have following array: arr = [1, 3, 2, 5, 2, 4, 2, 2, 4, 4, 2, 2, 4, 2, 1, 5] i want array containing first 3 odd elements. i know this: arr.select(&:odd?).take(3) but want avoid iterating through whole array, , instead return once i've found third match. i came following solution, believe want: my_arr.each_with_object([]) |el, memo| memo << el if el.odd?; break memo if memo.size == 3 end but there more simple/idiomatic way of doing this? use lazy enumerator enumerable#lazy : arr.lazy.select(&:odd?).take(3).force # => [1, 3, 5] force used force lazy enumerator evaluate. or, use first it's eager: arr.lazy.select(&:odd?).first(3) # => [1, 3, 5]

php - How do I access the getServiceLocator in Model ZF2 -

i trying access getservicelocator function in model. works in controller when move model null when trying access. call member function get() on null it seemed below link offered comparable solution had trouble implementing use module in our custom helper in zend framework 2 below code trying run in model. use zend\servicemanager\servicelocatorawareinterface; use zend\servicemanager\servicelocatorinterface; class filemanager implements servicelocatorawareinterface { somefunction(){ $thumbnailer = $this->getservicelocator()->get('webinoimagethumb'); } } thank m when @ possible, should not try access servicelocator inside class except factory. main reason if servicelocator injected class, have no idea class's dependencies are, because potentially contain anything. with regard dependency injection, have 2 basic choices: constructor or setter injection. rule of thumb, prefer constructor injection. setter injection should used opt...

php - How to send parameters to queues? -

please consider following job: <?php namespace app\jobs; use illuminate\contracts\bus\selfhandling; use illuminate\contracts\queue\shouldqueue; use illuminate\queue\interactswithqueue; use illuminate\queue\serializesmodels; class importusers extends job implements selfhandling, shouldqueue { use interactswithqueue, serializesmodels; public function __construct($number) { $this->number=$number; } public function handle() { dd($this->number); return; } } dispatching job using sync queue $this->dispatch(new \app\jobs\importusers(5)); throw exception: undefined property: app\jobs\importusers::$number . seems odd me. why handle method can not access class properties? properly declare property class importusers extends job implements selfhandling, shouldqueue { use interactswithqueue, serializesmodels; protected $number; // <-- here public function __construct($number) { $th...

android - Dynamically add items to NavigationView with loading gif -

Image
i have navigation view (sidebar) looks this: the first 4 items in list static (they never change). however, need dynamically add items sidebar (which fetched rest api) below divider in picture above. few questions: how can dynamically add new items sidebar under new subheader, below divider? while it's adding items, how can display loading (spinner) gif below divider notify user happening? here navigationview activity: <android.support.design.widget.navigationview android:id="@+id/navigation_view" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="start" android:background="@android:color/white" app:menu="@menu/menu_drawer" /> and here menu_drawer (with static items): <menu xmlns:android="http://schemas.android.com/apk/res/android"> <group android:checkablebehavior="single"> <...

php - How to store data on data base in android studio with API 23? -

most of times don't post because can find need in others posts, 1 has me few days now, how guys store in databases? here java code @override protected object doinbackground(object[] params) { try { url url = null; url = new url("http://www.myserver.com/register.php"); httpurlconnection conn = null; conn = (httpurlconnection) url.openconnection(); conn.setreadtimeout(connection_timeout); conn.setconnecttimeout(connection_timeout); conn.setrequestmethod("post"); conn.setdoinput(true); conn.setdooutput(true); dataoutputstream os = new dataoutputstream(conn.getoutputstream()); uri.builder builder = new uri.builder().appendqueryparameter("name", user.name) .appendqueryparameter("age", user.age + "") ...

Why does git think this is a conflict after cherrypick? -

Image
i using tortoisegit on windows, have 2 branches. when cherrypick commits other branch, quite 'confilict' reports. when tried resolve these 'conflicts', lot of times quite confused , angry (like case in screen shot below), how can conflict? 1 file doesn't have while other file has new lines, couldn't more simppler. why git treat conflict? can explain? thanks.. i've reproduced case there real conflict behind apparent nothing-vs-something non-conflict. base commit: foo bar baz next commit on master removes baz foo baz next commit on branch adds @ same position foo spam bar baz when try merge branch master, conflict: foo <<<<<<< head ======= spam bar >>>>>>> plus baz apparently false alarm, nothing on master, added on other branch. but in reality, alarm not false, information put file git false: lists bar , removed on master, added on other branch...

javascript - How to get value of checked gridview column -

Image
hi guys have gridview below , want 'user_id' of checked column how can that??? i checked column id dont know how data of checked column in gridview want via javascript can pass service <?= gridview::widget([ 'dataprovider' => $dataprovider, 'filtermodel' => $searchmodel, 'showonempty'=>true, 'columns' => [ ['class' => 'yii\grid\checkboxcolumn'], [ 'attribute' => 'event_id', 'label' => 'event title', 'value' => 'event.title' ], [ 'attribute' => 'user_id', 'label' => 'email', 'value' => 'users.email', ], 'user_type', ], ]); ?> and here javascript ids of checked column jq...

java - Android install apk without asking user permission -

i building app kiosk mode purposes. device not rooted. app device administrator (android.permission.bind_device_admin) . want app able download , direct install other apks onto tablet without asking permission. at moment using android downloadmanager download apk: then: intent intent = new intent(intent.action_view); intent.setdataandtype(uri.fromfile(new file(filepath)), "application/vnd.android.package-archive"); intent.setflags(intent.flag_activity_new_task); // without flag android returned intent error! downloadmanageractivity.this.startactivity(intent); to install apk. bring popup confirmation. theer away direct install apk after has been downloaded? thanks update : i came across post: https://paulononaka.wordpress.com/2011/07/02/how-to-install-a-application-in-background-on-android/ but not work , limited. there no way install apk without popup conf...

ios - Xcode 7 unable to find .dylib no existing solution is working for me -

no existing solution working me, can help? i've deleted references , added .dylib again in build phase (link library), added other linker flag (-lz -lsqlite3) nothing working. here error: /applications/xcode.app/contents/developer/toolchains/xcodedefault.xctoolchain/usr/bin/libtool: can't open file: /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos9.0.sdk/usr/lib/libsqlite3.dylib (no such file or directory) sorry previous incomplete ans. solution: i applying existing solution in wrong place !!! the problem in facebook sdk... remove reference of libsqlite3.dylib (facebook sdk > targets > build phase > link library) [also remove reference project navigation] add "-lsqlite3" in facebook sdk > targets > build settings > other linker flags if linker error, go app (targets) build settings > enable bitcode > no. (in xcode 7 default yes)

json - Zoo Component Migration from Joomla 1.5 to 3 -

i using zoo component in joomla 1.5 , downloaded (export) data zoo component in xml format. now, new version of zoo component allow json , csv format import data. so, how migrate zoo component data new version? i have tried using online conversion tool convert xml json not succeed. it bit mean of zoo switch format , not allow importing xml... there's 2 ways around it. 1st - can upgrade version of zoo on old website, should preserve of data. zoo v2.5 or v2.6 when switched on xml json. zoo v2.6 able export csv or json. note: if have old version of zoo (like v2.3 or less) first upgrade v2.4, v2.6. old versions available here , click archieve in corner. 2nd - if don't want risk doing site in production, can convert xml json haphazard way: on localhost or separate folder/server create clean installation of joomla 1.5 , install zoo v2.4 import xml data there (you might need remake types, not sure how automatically) upgrade zoo v2.6 - able export json...

android - finishActivity doesn't recognize in Fragment -

i start speech recognition service mainactivity startactivityforresult , put onactivityresult in main. stop service finishactivity in mainactivity . work o.k. now pass active of service fragment , onactivityresult in fragment . there replay. when put finishactivity in fragment mark in red , didn't recognize it. it need activity add before getactivity.finishactivity(the request code) , run. doesn't close service more. problem? bar. try using this.stopself() if in same service or inside onactivityresult try calling stopservice(intent) refer alternative finish() method service class? kill dead for same

matlab - Simulink block for plotting output (on Y axis) with input (on X-axis)? -

time dependent signal input simulink model give time dependent output, both continuous functions, can separately plot input/output signal values function of time want plot input value output value particular time. simscape have block that? please help. thank in advance. the xygraph block allows input signal both, x , y axis.

objective c - UIKeyboardWillShowNotification calling twice ios 9 -

i using uikeyboardwillshownotification to detect when textfield selecting user , keyboard opening. in ios 8 , older versions of ios working fine today upgrade ios 9 , xcode 7. problem in ios notification called after selecting each textfields (while in ios 8 called after selecting first textfield). i searched , find post why uikeyboardwillshownotification called every time textfield selected? but not ios 9 (actually every thing right in ios8 , upgrading see problem) , not using inputaccessoryviews too. same problem here. have uitexfield in view controller , when leave textfield 1 programmatically using becomefirstresponder method, uikeyboardwillshownotification called once again. if keyboard not hide-and-show again. however, uikeyboardwillhidenotification not called. i don't know why problem appeared in ios9 can give workaround. did : created bool property in view controller: @property (assign, nonatomic) bool keyboardisshown; and in keyboard observers m...

ios - How to add launch images to LaunchScreenStoryboard? -

to support ipad split functionality of ios9 have use launchscreen storyboard. how can add launch images launchstoryboard imageview? you can add launch screen images using image.xcassets. open xcdoe. find image.xcassets on left hand side. in see "+" button. click on it. find new launch image. select "new launch image" option. then add launch images in it.

php - SQLSTATE[HY093]: Invalid parameter number[ask] -

please me! have trouble error pdostatement::execute(): sqlstate[hy093]: invalid parameter number: number of bound variables not match number of tokens in i use query: public function savestep1($data) $id = intval($data['id']); $query = $this->db->prepare("update `user_general_info` set `soname` = :soname, `last_soname` = :last_soname, `name` = :name, `middle_name` = :middle_name, `birthday` = :birthday, `birthplace` = :birthplace, `city_code` = :city_code, `city` = :city, `street` = :street, `house` = : house, `corp` = :corp, `litera` = :litera, `flat` = :flat `id` = :id"); $query->bindparam(":soname", $data[0], pdo::param_str); $query->bindparam(":last_soname", $data[1], pdo::param_str); $query->bindparam(":name", $data[2], pdo::param_str); $query->bindparam(":middle_name", $data[4], pdo::param_str); $query->bindparam(":birthday", $dat...

c++ - Reverse multi word string -

i want reverse string. when use simple cin strings reversed successfully. multi word string need cin.getline. problem upon using cin.getline first letter not displayed in reversed string. can please point me out mistake. in advance. #include <iostream> using namespace std; class rev_string{ char source[100], dest[100]; int pos_source, pos_dest; public: void func(){ pos_source=pos_dest=0; cout<<"enter string reversed: "; cin.getline(source,sizeof(source)); //cin>>source; cout<<endl; while(source[pos_source]!='\0') pos_source++; --pos_source; while(pos_source!=0) dest[pos_dest++]=source[pos_source--]; dest[pos_dest]='\0'; cout<<"the reversed string is: "<<dest<<endl; } }; int main(int argc, char** ar...

How add new localization for achivment or lederboard items via Play Games Services Publishing API -

when add new localization (which not manually added game) in requesting json ( https://developers.google.com/games/services/publishing/api/achievementconfigurations ) updating achievements or leaderboards server return following error: { "error": { "errors": [ { "domain": "global", "reason": "unsupportedlocale", "message": "the locale bg in name field not supported application." } ], "code": 400, "message": "the locale bg in name field not supported application." } } please me solve issue i believe in order api accept translations, language needs added game definition. if go game, game details tab, click "add translations" , add bulgarian. once added there, can use api upload values.

date - Easily convert MM/DD to DD/MM including time in excel -

need convert excel date-time format mm/dd/yyyy hh:mm:ss dd/mm/yyyy hh:mm:ss after conversion, needs still in proper date-time format can sorted correctly according date , time. the best way working use below formula , ensure have configured format cell > number > category value correctly. formula in example a1 source cell. place in a2: =value(date(text(a1,"yyyy"),text(a1,"dd"),text(a1,"mm"))+timevalue(text(a1,"hh:mm:ss"))) this reads date-time , rebuilds date-time number, swaps day , month numbers around. can used either situation is. cell format also need ensure format cell > number > category set custom , using right format: e.g. [24hr format] - dd/mm/yy hh:mm:ss [12hr format] - dd/mm/yy hh:mm:ss am/pm or whatever variation need location alternatives text format if wanted make text , swap day , month around can use [24hr format] - =text(a1,"mm/dd/yy hh:mm:ss") [12hr format] - =...

php - How to get row id using color code in phpexcel -

i have excel file contains rows color want row id of particular color code unable .. searched found nothing below code phpexcel $cellcolor = $objphpexcel->getactivesheet()->getstyle($cell->getcoordinate())->getfill()->getstartcolor()->getrgb(); this give me color code , value have $cell->getvalue() $cell variable $celliterator foreach ($worksheet->getrowiterator() $row) { $celliterator = $row->getcelliterator(); $celliterator->setiterateonlyexistingcells(false); foreach ($celliterator $cell) { $cellcolor = $objphpexcel->getactivesheet()->getstyle($cell->getcoordinate())->getfill()->getstartcolor()->getrgb(); if (!empty($cell->getcalculatedvalue())) { if ($cellcolor == 'yellow') { echo ($cellcolor.'======'.$cell->getvalue()); } } } } $cell->getvalue...

osx - hydra target ssh does not support password authentication -

i using hydra v8.1 downloaded , compiled tar file. i've managed solve standard problem of libssh support , when try make attack(i think it's called dictionary attack) on ssh server, after specifying following command: hydra -l {username} -s {port} -p /users/{username}/desktop/{file}.txt {ip} ssh i following output: hydra v8.1 (c) 2014 van hauser/thc - please not use in military or secret service organizations, or illegal purposes. hydra (http://www.thc.org/thc-hydra) starting @ 2015-09-30 10:59:49 [warning] many ssh configurations limit number of parallel tasks, recommended reduce tasks: use -t 4 [data] max 7 tasks per 1 server, overall 64 tasks, 7 login tries (l:1/p:7), ~0 tries per task [data] attacking service ssh on port {port} [error] target ssh://{ip}:{port}/ not support password authentication i have enabled support required libraries , running os x environment. can indicate solution problem? thank you. note : if manually log in username , password, auth...

AJAX REQUEST WITH IN AJAX REQUEST jquery -

$.ajax({ type: 'post', url: searchpage, datatype: "json", data: { id: id }, success: function(data) { var id1 = []; for(var = 0; < data.length; i++){ id1 .push({ id1 : data[i].id }); $("#printtdownername").text(data[i].fullname); $("#printtdownerbday").text(data[i].bday); $("#printtdownerage").text(data[i].age); } $.ajax({ type: 'post', url: 'searchpage1', datatype: "json", data: { id1: json.stringify(id1) }, success: function(data) { }, error: function(data) {} }); }, error: function(data) { } }); in project need send ajax request on specific event , when request successful want send ajax request. right working ok since database sm...

sql - Extract number from string with Oracle function -

i need create oracle function takes string parameter. string contains letters , numbers. need extract numbers string. example, if have string ro1234 , need able use function, extract_number(ro1234) , , result 1234 . to more precise, kind of sql query function used in. select distinct 'column_name', extract_number(column_name) 'table_name' extract_number(column_name) = 1234; question: how add function oracle database, in order able use in example above, using of oracle sqldeveloper or sql tools client aplications? you'd use regexp_replace in order remove non-digit characters string: select regexp_replace(column_name, '[^0-9]', '') mytable; or select regexp_replace(column_name, '[^[:digit:]]', '') mytable; of course can write function extract_number . seems bit overkill though, write funtion consists of 1 function call itself. create function extract_number(in_number varchar2) return varchar2 begin retu...