Posts

Showing posts from February, 2014

Overlap the layout in the android ExpandableListView -

in following template , @ above new vhd text, overlap row , want fix problem .i tried change height of main file no used.i increase text size 14 15 px in template ,size increased in main template programmatically, problem occur. attached code question see commented section in xml file.please suggest me solution if any.i new android .not familiar android.i attached image below.thank you. //main file <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" //changed height not work android:background="#ffffff"> <linearlayout

php - Laravel 5 Sending email to owner after a user register -

i'm using default login , registration system of laravel. want whenever new user registered email sent 1 of email address input, sending email me notify me new user register. how this? you can overwrite register method in authcontroller . put , send super simple email registered user: public function register(request $request) { // original script, not touch $validator = $this->validator($request->all()); if ($validator->fails()) { $this->throwvalidationexception( $request, $validator ); } \auth::guard($this->getguard())->login($this->create($request->all())); // custom script \mail::raw('welcome ' . $request->input('name') . '!', function ($m) use ($request) { $m->to($request->input('email'))->subject('registration successful!'); }); return redirect($this->redirectpath()); } to learn more mailing, should re

ios - Is it possible to block execution of my code until UIAlertController is dismissed? -

is there anyway wait user press button dismiss alertcontroller in swift 3, using dispatchqueue or else? you mean this? alertcontroller.displayandwaituntildismissed() // line reached after alert controller dismissed print("alert controller dismissed.") theoretically, yes, use dispatch semaphore block until alert dismissed. it’s bad idea – can’t think of scenario acceptable. accept have deal asynchronously, executing desired code in alert controller action.

java - ArrayList Index Error -

i trying finish project uses graphical user interface search through data base of geysers in us. keep getting error 1 of array lists. include data program is 10,000 entries long. appreciated. being done in bluej error : java.lang.indexoutofboundsexception: index: 0, size: 0 database code: import java.io.fileinputstream; import java.io.filenotfoundexception; import java.io.*; import java.util.arraylist; import java.util.scanner; public class geyserdatabase { private arraylist < geyser > geysers; private arraylist < eruption > eruptions; public geyserdatabase() { geysers = new arraylist < geyser >(); eruptions = new arraylist < eruption >(); } public void readgeyserdata(string filename){ try{ file f = new file(filename); scanner sc = new scanner(f); string text; // keep reading long there more data while(sc.hasnext()) { text = sc.nextline(); eruption e = new eruption(

entity framework 6 - EF OData MySql Unknown column 'Project3.x' in 'where clause' -

i'm using odata v4, ef6 , mysql 5.6/5.7 below models , tables. result of application resource fine call odata/applications error when expand on roles, follows odata/applications?$expand=roles. error: error occurred while executing command definition. see inner exception details. unknown column 'project3.applicationid' in 'where clause' i know it's mapping, can't see what. public class role { public int id { get; set; } public string name { get; set; } public int applicationid { get; set; } //public virtual application application { get; set; } } public class application { public int id { get; set; } public string name { get; set; } public bool isdeleted { get; set; } public virtual icollection<role> roles { get; set; } public application() { roles = new list<role>(); } } public class applicationview { public int id { get; set; } public string name { get; set; }

scala - SPARK SQL: Implement AND condition inside a CASE statement -

i aware of how implement simple case-when-then clause in spark sql using scala. using version 1.6.2. but, need specify , condition on multiple columns inside case-when clause. how achieve in spark using scala ? thanks in advance time , help! here's sql query have: select sd.standardizationid, case when sd.numberofshares = 0 , isnull(sd.derivatives,0) = 0 , sd.holdingtypeid not in (3,10) 8 else holdingtypeid end holdingtypeid sd; an alternative option, if it's wanted avoid using full string expression, following: import org.apache.spark.sql.column import org.apache.spark.sql.functions._ val sd = sqlcontext.table("sd") val conditionedcolumn: column = when( (sd("numberofshares") === 0) , (coalesce(sd("derivatives"), lit(0)) === 0) , (!sd("holdingtypeid").isin(seq(3,10): _*)), 8 ).otherwise(sd("holdingtypeid")).as("

How do I add a list to a table in Clojure? -

this model of list. [ [name age salary] [name age salary] [name age salary] ] let's have def named "description_list" contains list. how iterate through description_list , put table. tried doing this: (print-table [:name :age :salary] description_list) and prints out 3 empty rows of table me. need contain information list. how can accomplish this? this expected behaviour. see doc print-table . prints collection of maps in textual table. so need turn descr_list list of maps. e.g. user=> (let [h [:a :b] d [[1 2][3 4]]] (clojure.pprint/print-table h (map (partial zipmap h) d))) | :a | :b | |----+----| | 1 | 2 | | 3 | 4 |

java - Eclipse Plugin Development - ClassCastException cannot cast abc.xyz to abc.xyz -

i developing plugin in eclipse. have encountered problem following code: xyz object1 = xyz(object2); where said line throws exception: caused by: java.lang.classcastexception: abc.xyz cannot cast abc.xyz xyz class plugin. unfortunately, said plugin not have packages visible. so, setting dependency threw classdefnotfound exception. luckily, have .jar of plugin , added plugin's build path. when did so, still returned classdefnotfound exception. looked around , found out plugins, referenced libraries not 'detected' jvm automatically, , so, followed solution add said jar manifest.mf , bin.includes section of plugin's build.properties . after following said solution, tried again , have classcastexception. atleast, @ point, class xyz jar file being loaded. doing research, found out classloaders of both xyz classes different. quite stuck on steps should do. here's summary of whole problem: required class plugin. said plugin not have classe

vb.net - how to maintain DIV scroll bar position in Listview ASP.net -

my problem when click imagebutton ("imgedit") in listview scroll bar of listview doesnt stay in position click it. heres code: <asp:updatepanel id="updatepanel1" updatemode="conditional" runat="server"> <contenttemplate> <asp:scriptmanager id="scriptmanager1" runat="server"> </asp:scriptmanager> <asp:listview id="lv_profile" runat="server" groupitemcount="1" groupplaceholderid="groupplaceholder1" itemplaceholderid="itemplaceholder1" onitemdatabound="lv_profile_itemdatabound" onselectedindexchanged="lv_profile_selectedindexchanged" > <layouttemplate> <div id ="mainprofile" style="overflow-x: scroll; margin: 0 65px;" runat="server"> <div id="subdivprof" runat="server" style="height: inherit; width: 3400px;

java - Excel to String xls/xlsx different result -

want compare excel files each other see if same or not. can choose excel files , read them. have 2 excel sheets same content 1 in .xls , on in .xlsx format. use following code read files (for xls hssfworkbook , on) private string xlsx(file inputfile) { string outputstring = ""; // storing data string stringbuffer data = new stringbuffer(); try { // workbook object xlsx file xssfworkbook wbook = new xssfworkbook(new fileinputstream(inputfile)); // first sheet workbook xssfsheet sheet = wbook.getsheetat(0); row row; cell cell; // iterate through each rows first sheet iterator<row> rowiterator = sheet.iterator(); while (rowiterator.hasnext()) { row = rowiterator.next(); // each row, iterate through each columns iterator<cell> celliterator = row.celliterator();

python - Uncompressed size of a webpage using chunked transfer encoding and gzip compression -

i'm writing application calculates savings got after using gzip on web page. when user inputs url of web page used gzip, application should spit out savings in size due gzip. how should approach problem? this getting header request on page: { 'x-powered-by': 'php/5.5.9-1ubuntu4.19', 'transfer-encoding': 'chunked', 'content-encoding': 'gzip', 'vary': 'accept-encoding', 'server': 'nginx/1.4.6 (ubuntu)', 'connection': 'keep-alive', 'date': 'thu, 10 nov 2016 09:49:58 gmt', 'content-type': 'text/html' } i retrieving page requests : r = requests.get(url, headers) data = r.text print "webpage size : " , len(data)/1024 if downloaded url (using requests get request without stream option, have both sizes available whole response downloaded , decompressed, , original length available in headers:

c# - Grouping particular nodes to their parent nodes inside XML -

below given sample xml: <response> <transactions> <upload> <documentid>1</documentid> <name>a</name> <documentid>2</documentid> <name>b</name> </upload> <upload> <documentid>3</documentid> <name>c</name> <documentid>4</documentid> <name>d</name> </upload> <upload> <documentid>5</documentid> <name>e</name> <documentid>6</documentid> <name>f</name> </upload> <transactions> </response> below given coming output: <total> <documentid>1</documentid> <documentid>2</documentid> <documentid>3</documentid> <documentid>4</do

typescript2.0 - tslint no-null-keyword and typescript's lib.d.ts with strict null checking -

i've been using tslint quite time no-null-keyword enabled. recently, i've upgraded typescript 2.0 , enabled --strictnullchecking . however, looking @ typescript's lib.d.ts , appears impossible keep no-null-keyword enabled (at first glance), since result of calls can null . example: const result: regexpexecarray | null = regex.exec(regexstr); if (result === null) { // <-- tslint complains check throw new error("foo location: result of regex null."); } // or // if (result !== null) { // ...do // } the question the-right-thing-to-do ? disable no-null-keyword tslint ? use hack (?): const result: regexpexecarray = regex.exec(regexstr)!; if (result == undefined) { // check if result undefined or null throw new error("foo location: result of regex null."); } or else? no-null-keyword lint rule. it's primary purpose prevent added complexity of using both undefined , null similar purpose. but doesn't remo

android - adding sticker to a zoomed imageView -

i developed app can add stickers image resize, flip , rotate functionality stickers. want able zoom on image(for example touchimageview) , add sticker image , when zooming out image sticker remain in correct postition on image!! picsart android app nice. how can handle that? suggestion?

spring cloud stream - Annotation-specified bean name 'errorPageFilter' for bean class -

using spring cloud stream, encounter following problem: annotation-specified bean name 'errorpagefilter' bean class [org.springframework.boot.web.support.errorpagefilter] conflicts existing, non-compatible bean definition of same name , class [org.springframework.boot.context.web.errorpagefilter] my spring cloud steam dependencies judged <dependency> <groupid>org.springframework.cloud</groupid> <artifactid>spring-cloud-stream-dependencies</artifactid> <version>brooklyn.sr1</version> <type>pom</type> <scope>import</scope> </dependency> this interesting scenario, hence posting @unixnothing 's comment community wiki answer. this happens when application class defined in base package (in other words, without package declaration) move classes package avoid such name conflicts. please refer the spring boot documentation more details.

java - Rest Api call gives error 400 using Spring Oauth2 -

i'm building rest api using spring security oauth2 secure it. the following curl command runs succesfully , token: curl -x post -vu clientapp:123456 http://localhost:8080/dms-application-0.0.1-snapshot/oauth/token -h "accept: application/json" -d "password=spring&username=roy&grant_type=password&scope=read%20write&client_secret=123456&client_id=clientapp" the following test token runs succesfully: @test public void getaccesstoken() throws exception { string authorization = "basic " + new string(base64utils.encode("clientapp:123456".getbytes())); string contenttype = mediatype.application_json + ";charset=utf-8"; // @formatter:off string content = mvc .perform( post("/oauth/token") .header("authorization", authorization) .contenttype( mediatype

haskell - How do I avoid referring to all state variables when updating only a few? -

an idiom use composing couple of procedures (with memory) follows: p1 :: state (int, string) () p1 = (a, b) <- ... ... put (a', b) p2 :: state (int, string) () p2 = (a, b) <- ... else ... put (a, b') main = ... initializing a0 b0 ... print . flip evalstate (a0, b0) . sequence $ replicate 10 p1 ++ repeat p2 however, number of state variable grows, gets way more verbose necessary: p1 :: state (int, string, bool, int, string, bool) () p1 = (a, b, c, d, e, f) <- ... ... put (a, b, c', d, e, f') p2 :: state (int, string, bool, int, string, bool) () p2 = (a, b, c, d, e, f) <- ... ... put (a', b', c, d, e, f) main = print . flip evalstate (a0, b0, c0, d0, e0, f0) . sequence $ replicate 10 p1 ++ repeat p2 as wondering, there way of updating few state variables without having refer unused ones? thinking ioref state (in fact there package stateref ), i'm not s

android - Uploading a File using Volley API via PUT method -

i've been looking way upload file using volley api using put method. i've seen far through multipart post method aren't applicable case. assuming can't change on server side , i'm stuck using put. how achieve in volley? note have url upload file , file itself. use basic concept of put method url = "your url"; stringrequest putrequest = new stringrequest(request.method.put, url, new response.listener<string>() { @override public void onresponse(string response) { // response log.d("response", response); } }, new response.errorlistener() { @override public void onerrorresponse(volleyerror error) { // error log.d("error.response", response); } }){ @override protected map<string, string> getparams() { map<string, string> params = new hashmap<string, string> (); params.put("name", "file_

ios - Can you still program in xcode 7 with swift 2? -

im working on school project build ios application in swift. saw updated swift 3.0 , many tutorials don't work. question can download xcode 7.3.1 , still work in swift 2? can follow tutorials on web? my application has work on emulator. not in de app store thanks! yes can use swift 2.2 in xcode 7 , 2.3 in xcode 8 enabling use legacy swift language version in build setting (swift_version = 2.2) swift 2.2.1 , swift 2.3 similar, key changes being related sdk differences.

jquery - Bootstrap Scroll spy Not working -

i tried use affix , bootstrap scrollspy using fiddle achieved affix can't make scrollpsy working. here code please let me know if missing. here demo fiddle side menu <div class="col-md-3 scrollspy"> <ul id="nav-side" class="nav-side hidden-xs hidden-sm affix-top" data-spy="affix"> <li class=""><a href="#web-design">web design</a></li> <li class=""><a href="#web-development">web development</a> <ul class="nav-side"> <li class=""><a href="#ruby"><span class="fa fa-angle-double-right"></span>ruby</a></li> <li class=""><a href="#python"><span class="fa fa-angle-double-right"></span>python</a></li>

plsql - how to call an Oracle function from PHP that returns more than 1,000,000 buffer (max) -

my oracle not paid. can not use unlimited buffer size. php code below: <?php $conn = oci_connect('****', '****', '****'); if($conn){ $operation = isset($_post['****']) ? $_post['****'] : null; $year = isset($_post['****']) ? $_post['****'] : null; $month = isset($_post['****']) ? $_post['****'] : null; switch($operation){ case 'summary': $sql = "begin :ret:=rkarim.pkg_sr_functions.report_net(:sal_year_month); end;"; $parse = oci_parse($conn, $sql); oci_bind_by_name($parse, ":ret", $ret, 32767); oci_bind_by_name($parse, ":sal_year_month", $sal_year_month); oci_execute($parse); echo htmlentities($ret); break; case 'allowances': null; break; case 'deductions':

php - Laravel - TokenMismatchException in VerifyCsrfToken because of upload filesize -

i have found need change these settings in order upload bigger files i have changed these settings in php.ini file upload_max_filesize = 32m max_file_uploads = 20 and in nginx.conf file client_max_body_size 40m; but still error: php warning: post content-length of 27772457 bytes exceeds limit of 8388608 bytes in unknown on line 0 this 8mb limit....but where...i have restarted machine , still doesn't work where else can adjust file upload limit? in php.ini should change post_max_size and make larger upload_max_filesize for exemple use : post_max_size = 125m upload_max_filesize = 100m then restart php-fpm

reporting services - SSRS Reset Page Number on Tablix Group not working -

i have tablix (named tx_order) associated dataset (named accorderds) following columns: order date order amount order quantity account number (hidden) account address (hidden , join dataset using lookup function) the tablix grouped account number , page break on "between each instance of group". part works fine. now need add page number on report header , page number should reset when group (account number) changed. set pagename tablix as: =first(fields!account_number.value, "accorderds") and on report header, add [&pagenumber] textbox however, page number not being reset. keeps increasing group (account number) changed. googled , used method mentioned in https://blogs.msdn.microsoft.com/robertbruckner/2010/04/25/report-design-reset-page-number-on-group/ page number still not reset. did encounter issue before? how fix it? highly appreciated. thanks!

javascript - Task do not complete - do I need to return anything from my method? -

i have series of tasks: gulp.task('build', gulp.series(flag, clean, data)); in flag have: if(!path){ console.log('path not specified'.red); process.exit(1); } but when run it, get: [09:26:12] starting 'default'... [09:26:12] starting 'build'... [09:26:12] starting 'flag'... [09:26:12] following tasks did not complete: default, build, flag [09:26:12] did forget signal async completion? this happens when use flag. going wrong?

Hide specific columns in Cognos 10 -

Image
i have created crosstab in cognos 10 & have specified logic each row. have specified logic column have problem. shown in attached picture, when run report, column showed 2 times. the column logic is: case when ([fba].[fefrecord].[bl] ='spec') ('special customers') else null end i guess problem values not in 'spec' allocated in new column (which holds null values). can please show me step step should display column once, without null values? tried adding boolean variable , setting box type none, seems not working me. note: shown in picture, need second column, not 1 red x. may filter them out completely? add filter [fba].[fefrecord].[bl] ='spec' but looks problem isn't here. in case see null column header wouldn't 'special customers'. my guess have node here. switch page structure view , check it.

javascript - Typescript swap array Items -

how swap 2 elements using typescript elements:elements[] =[]; elements.push(item1); elements.push(item2); elements.push(item3); elements.push(item4); elements[0] item 1 element[3] item 3 how can interchange items in typescript , know java script way.like javascript example var tmp = elements[0]; elements[0] = elements[3]; elements[3] = tmp; but there api doing same thing in typescript array.swap() there's no builtin functionality it, can add it: interface array<t> { swap(a: number, b: number): void; } array.prototype.swap = function (a: number, b: number) { if (a < 0 || >= this.length || b < 0 || b >= this.length) { return } const temp = this[a]; this[a] = this[b]; this[b] = temp; } ( code in playground ) if using modules you'll need augment array interface: declare global { interface array<t> { swap(a: number, b: number): void; } }

javascript - How to play/pause sound and the sound play from the begininng of the sound? -

i want user able click on al link , sound start play if user click again on link stops , if again play sound strat beginning , nod whrere stop before. code simple toggle if sound: var partone = document.getelementbyid("part1"); function playpart1() { return partone.paused ? partone.play() : partone.pause(); }; <p> <a class="textaudio" onclick="playpart1()"> lorem ipsum dolor sit amet, consectetur adipiscing elit, sed eiusmod tempor incididunt ut labore et dolore magna aliqua. ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. duis aute irure dolor in reprehenderit </a> </p> <audio id="part1" src="http://www.sousound.com/music/healing/healing_01.mp3" preload="auto"></audio> you can use currenttime. make current time 0 - var partone = document.getelementbyid("part1"); funct

php - How to solve the 'MethodNotAllowedHttpException' error in laravel? -

i have got error methodnotallowedhttpexception when using 'post' in route: route::post('seedetail', [ 'uses' => 'datacontroller@seedetail', 'as' => 'seedetail' ]); but, if using 'get' in route, there's no error have data_id in link (localhost/survey/public/seedetail?data_id=1). know how make data_id disappear link (localhost/survey/public/seedetail)? button in view this: <a href="{{ route('seedetail', ['data_id'=>$getdata->data_id])}}" class="btn btn-default"> you send get request not post request. need use get instead of post . pass parameter in url don't specify in route. try this: route::get('seedetail/{data_id}', [ 'uses' => 'datacontroller@seedetail', 'as' => 'seedetail' ]); docs

caching - PlayFramework 2.2.x Java built-in cache and CORS -

i have play 2.2.6 application , need use both cache , cors. currently, i'm handling cors headers explained in this question. i have route (e.g. /users ) want cache using @cached annotation: @cached(key = "users") public static result users() { return ok(tojson(users.finder.all())); } now, if hit /users 2 requests, first time, cors headers added correctly expected. the second time, cache seems used correctly play (the response fast) but cors headers aren't added anymore . why @cached request missing cors headers?

javascript - How to make Loopback models events work? -

i have tried example http://apidocs.strongloop.com/loopback/#model : mymodel.on('changed', function(inst) { console.log('model id %s has been changed', inst.id); // => model id 1 has been changed }); i replaced mymodel actual model name. when save new instance or update existing one, expect see console log, nothing happens. how make work it's described in docs? as using loopback 3.0, not 2.0, mentioned listener deprecated , when changed example below, helped , works fine. mymodel.observe('after save', (inst) => { console.log('model id %s has been changed', inst.id); }); here more information: http://loopback.io/doc/en/lb3/migrating-to-3.0.html#replace-removed-persistemodel-event-listeners http://loopback.io/doc/en/lb2/operation-hooks.html

javascript - Centering div margin top and margin bottom -

i'm trying margin-top , margin-bottom center <div> . javascript, wrote, works. however, if site cached once, ctrl+f5 refresh causes script receive wrong clientheight . refreshing second time, retrieves correct clientheight . i've tried using window.load , works. however, slow <div> loads , after 2 seconds, shifts middle. <script type="text/javascript"> var height = $(window).height(); var clientheight = document.getelementbyid('account-wall').clientheight; var calc_height = (height - clientheight) / 2; document.getelementbyid("account-wall").style.margintop = calc_height + 'px'; document.getelementbyid("account-wall").style.marginbottom = calc_height + 'px'; </script> <script type="text/javascript"> $(window).load(function() { var height = $(window).height(); console.log(height); var clientheight = $('.account-wall').height(); console.lo

c++ - std::bind2nd and std::bind with bidimensional arrays and arrays of structs -

i know c++ have lambdas , std::bind1st, std::bind2nd , std::bind deprecated. however, start foundations of c++, can understand better new features. so, start simple code, using array of int s: first example: std::bind2nd int array1[] = { 10, 20, 30, 40, 50, 60, 40 }; int c1, c2, c3; c1 = count_if(array1, array1 + 7, bind2nd(greater<int>(), 40)); c2 = count_if(array1, array1 + 7, bind2nd(less<int>(), 40)); c3 = count_if(array1, array1 + 7, bind2nd(equal_to<int>(), 40)); cout << "there " << c1 << " elements greater 40." << endl; cout << "there " << c2 << " elements lesser 40." << endl; cout << "there " << c3 << " elements equal 40." << endl; second example: std::bind greater<int> big; less<int> small; equal_to<int> equal; c1 = count_if(array1, array1 + 7, bind(big, _1, 40)); c2 = count_if(array1, array1 +

Google Calendar API Offline Usage with access token in Ruby on Rails -

i using ruby api client google calendar. making application in server side needs post on user's calendar every 1 pm. problem , how can access google calendar api offline. store access token in db , applying exact same operation google has mentioned in docs. client_opts = json.parse(user.credentials) auth_client = signet::oauth2::client.new(client_opts) i getting 'missing token endpoint uri' error. please me this, been 5 days , cant find out how solve this. appreciate help.

Nginx proxy for webserver which is on different server where apache is dockerized -

i on scenario : server (endpoint on dmz) running somes django apps through nginx (on same server), have no trouble on those. server b (another local ip) running 2 docker's containers. 1 of them run apache, other run postgis. i have configure nginx (server a) 2 django apps , pelican blog, different subdomain. no trouble them. apache in server b run webapp on port 80. when page server:port on local network it's work properly. it may important know redirection done apache , it's done on browser. what need access server's b webapp nginx located on subdomain. i thought add new conf on ngnix on a's server made trick : server { listen [::]:80; listen 80; server_name sub.dns.com; access_log /var/log/nginx/proxy-access.log; error_log /var/log/nginx/proxy-error.log; location = / { # instead of handling index, # rewrite / /index.html proxy_pass http://192.168.1.xx; } } but when try page, 404 not found. but, can see redirection in client

Java get Response time of GET Restful Service -

i have 1 get restful service return json. have response time of service. requirement when try json data service , if service take more 10 seconds have redirect page . how can this? my code given below import java.net.url; import java.net.httpurlconnection; url url = new url(surl); httpurlconnection req = (httpurlconnection) url.openconnection(); req.connect(); if (req.getresponsecode() == httpurlconnection.http_ok) { system.out.println("responsecode = http_ok"); } i using java eclipse mars 1. first set timeout , catch timeout exception , make new request: try { req.setconnecttimeout(timeunit.seconds.tomillis(10)); req.setreadtimeout(timeunit.seconds.tomillis(10)); [...] readdata(req); } catch (sockettimeoutexception e) { // request again } edit: readtimeout optional. i'm using bacause want wait long data.

wordpress - Video not autoplaying in Chrome -

i have mp4 video, set autoplay working fine in safari , firefox not autoplaying in chrome. i'm using plugin advanced responsive video embedder , here shortcode [arve mode="normal" autoplay="yes" thumbnail="http://twitchtrainer.517design.com/wp-content/uploads/2016/11/master-slider-intro-vid-cover2.jpg" url="http://twitchtrainer.517design.com/video/twitch_reel_web_final.mp4" title="twitch trainer - intro video" description="hit ball faster, farther twitch trainer. created ryan steenberg" upload_date="2016-09-14"] does have ideas? it top video under main nav. url http://twitchtrainer.517design.com/

python - Create dictionary for classification dataset storage similar to digits dataset (sklearn) -

i extracting features images , save them alongside labels (and original images preferably) able load them later without running code feature extraction every time. i store them in in similar structure 1 digits dataset in sklearn.datasets , dictionary type. so problem not storing of type key:value , of type: features (x) target_labels (y) images (optional) target_names my x numpy.ndarray data type , y 1-d vector array . any suggestions how achieve this? if want sklearn.datasets methods return why don't use code ? they define class bunch want: class bunch(dict): """container object datasets dictionary-like object exposes keys attributes. >>> b = bunch(a=1, b=2) >>> b['b'] 2 >>> b.b 2 >>> b.a = 3 >>> b['a'] 3 >>> b.c = 6 >>> b['c'] 6 """ def __init__(self, **kwargs):

php - Adding objects to existing array in codeigniter -

in model there 2 functions data database. both return data arrays of objects.one function given below. public function get_camaramens($data,$evdata) { $this->db->select('emp_position.employee_id'); $this->db->from('emp_position'); $this->db->where('emp_position.position','c'); $this->db->where('emp_position.employee_id not in ('.implode(",",$data).')'); $query=$this->db->get('',$evdata); return $query->result(); } in controller accept result follows. $sdata['camaramen_list'] = $this->emp_position_model>get_camaramens($data,$evdata['no_of_cams']); the other function in model public function get_camara_assistants($data,$sdata,$evdata) { $cdata = array(); foreach($sdata['camaramen_list'] $row) { $cdata[] = $row->employee_id; } $this->db->select('emp_position.employee_id'); $this->db->from('emp_position'); $this-&

javascript - Angular $http calls not working in Chrome or Firefox -

i have simple angular $http.get , post calls. works in ie not in chrome or firefox. i kept break point in js , debugged, breaks in line of $http.get('urlapi') , don't see guidance this. debug takes me details of angular methods not able follow.. anyone have faced similar issue or guidance here. using angular version 1.5.8. here simple angular code $scope.wakeup = function() { $http.get('gettimings').then(function() { } } please use following: if server side scripting php work: (if asp.net should add web service in web.config file) imp: please make sure have used ng-app , ng-controller name used in html <p>today's welcome message is:</p> <h1>{{mywelcome}}</h1> </div> <p>the $http service requests page on server, , response set value of "mywelcome" variable.</p> <script type="text/javascript"> var app = angular.module('myapp', []); app.cont

I want to add datetimepicker with two dates "From & To" and validate both dates in php with bootstrap datetimepicker -

my main problem set mindate 'from' date , maxdate 'to' date. can ? my code : $(document).ready(function(){ $('#pickupdate').datetimepicker({ format: 'yyyy-mm-dd hh:mm:ss', mindate: moment().format('l'), ignorereadonly: true, }); $('#dropoffdate').datetimepicker({ format: 'yyyy-mm-dd hh:mm:ss', mindate: moment().format('l'), ignorereadonly: true, }); }); <link rel="stylesheet" type="text/css" media="screen" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.43/css/bootstrap-datetimepicker.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.16.0/moment.min.js"></script> <script type="text/javascript" src