Posts

Showing posts from May, 2011

javascript - Ionic 2: typescript: typescript: Cannot find name 'EventStaffLogService' -

i'm having error. i've installed latest app scripts. don't know typescript used work before ran update scripts. cli $ ionic serve running 'serve:before' npm script before serve > ionic-hello-world@ watch c:\users\cmadmin\development\mobile\sportsinfocus-mobile-app > ionic-app-scripts watch [14:01:26] ionic-app-scripts 0.0.42 [14:01:26] watch started ... [14:01:26] build dev started ... [14:01:26] clean started ... [14:01:26] clean finished in 6 ms [14:01:26] copy started ... [14:01:26] transpile started ... [14:01:32] typescript: ...sportsinfocus-mobile-app/src/app/events/event-sign-in/event-sign-in.component.ts, line: 18 cannot find name 'eventstafflogservice'. event-sign-in.component.ts event-sign-in.component.ts import { component } '@angular/core'; import { navcontroller, navparams, toastcontroller } 'ionic-angular'; import { eventstafflogservice, eventstaff } '../shared/'; @component({ temp

Bootstrap tooltip opens and closes repeatedly -

i have bootstrap tooltip have custom styled. there seems issue it. whenever hover on it, opens , closes. html - <div class="container" style="padding-top:300px"> <div class="row"> <div class="col-md-12"> <span>a bunch of random text</span><span class="info-circle" data-html="true" title="" data-original-title="tooltip text">i</span> </div> </div> <div class="row"> <div class="col-md-12"> <span>a bunch of random text</span><span class="info-circle" data-html="true" title="" data-original-title="tooltip text">i</span> </div> </div> here's inline link jsfiddle you no longer using tooltip-arrow visual arrow using :before , :after after visual arrow. problem have made arrow bigger , made own t

php - Trying to get plist data from server but getting nothing -

Image
i building app in need data server here code nsstring *url = [nsstring stringwithformat:@"http://url/ios/jobsearch.php"]; nsdictionary *datadict = [[nsdictionary alloc] initwithcontentsofurl:[nsurl urlwithstring:url]]; originalresultarray=[datadict valueforkey:@"objects"]; jobresultarray=[[nsmutablearray alloc] init]; [jobresultarray addobjectsfromarray:originalresultarray]; nslog(@"result : %@",jobresultarray); and here jobsearch.php <plist version="1.0"> <dict> <key>objects</key> <array> <dict> <key>jobname</key> <string>asdfasdf111</string> <key>jobbids</key> <integer>3</integer> <key>jobpay</key> <integer>$30</integer> <key>jobid</key> <integer>3</integer> </dict> <dict> <key>jobname</key> <string>asdfasdf1111111333</string> <key>

python - How to replay a message for app.control.revoke when handling SIGTERM in celery? -

i'm using celery 3.1 django. right now, have task need run forever, , hope can stop manually. code like: import signal @shared_task(bind=true) def mainjob(self, name): def handler: stop_running_jobs() return 'terminated!' # message hope reply. signal.signal(signal.sigusr1, handler) keep_running_job() and call task using: result = mainjob.delay() when want stop task, call make sure task has stopped. result.revoke(terminate=true, signal='sigusr1', wait=true, timeout=3) but when revoking task, wait 3 seconds, , never receive reply.what should do?

ruby on rails - Assign a value to an active record relation field -

this first model : class sender < applicationrecord has_many :letters end and second one: class letter < applicationrecord belongs_to :sender end i find letter in rails consol : @letter = letter.where(id: 378) the result : #<activerecord::relation [#<letter id: 378, indicator: "95/2", classification: "aa", urgency: "aa", package_id: nil, registrar_id: 0, user_id: nil, subset_type: "official", created_at: "2016-11-10 06:02:14", updated_at: "2016-11-10 06:02:14", sender_id: nil>]> as can see sender_id nil . thing want set value sender_id : @letter.sender_id = 12 but got error : nomethoderror: undefined method `sender_id=' #<letter::activerecord_relation:0x00000004cc96c0> did mean? send_later /var/lib/gems/2.3.0/gems/activerecord-5.0.0.1/lib/active_record/relation/delegation.rb:123:in `method_missing' /var/lib/gems/2.3.0/gems/activerecord-5.0.0.1/lib/active

objective c - How do you compare different strings in an If loop? -

how compare 2 strings different format strings? example, in code below: str1 = [datadic1 objectforkey:[finalarray objectatindex:indexpath.row]]; str1 contains 124.00,120/70-14,1,759,140/70-14,48.8 x 57.0. str2 = [datadic2 objectforkey:[finalarray objectatindex:indexpath.row]]; str2 contains 1.00,90/90-6,1,250,90/90-6,45.3 x 87.0. i want compare str1 , str2 if ([bike1str intvalue] < [bike2str intvalue]){ nslog(@"%@", str2); } else{ } for example: if (120/70-14 < 90/90-6) how do type comparison ? datadic1 { "displacement_trim" = "124.00 "; "dry_weight" = "<null>"; "front_brakes_size_trim" = "260 "; "front_tire_size" = "120/70-14"; "fuel_capacity_trim" = "13.50 "; "overall_height_trim" = "1,759 "; "overall_length_trim" = "2,230 "; power = ""; "power_weight_ratio" = "<null>&

Need solution regarding generic c# method -

i trying make method generic , stuck @ point , need assistance. code scenario have abstract class mybaseabs contains common properties: public abstract class mybaseabs { public string commonprop1 { get; set; } public string commonprop2 { get; set; } public string commonprop3 { get; set; } } now have child classes: public class mychild1: mybaseabs { public string mychild1prop1 { get; set; } public string mychild1prop2 { get; set; } public string mychild1prop3 { get; set; } } and child class: public class mychild2: mybaseabs { public string mychild1prop1 { get; set; } public string mychild2prop2 { get; set; } } now have create common method needs perform operations on basis of mychild1 , mychild2 , did is: public mycustomclass saveoperation<t>(t myobj) t : mybaseabs { saveobject obj = new saveobject(); } so inside method need write common code mapping saveobject object according child object passed. how can determi

c++ - Input vector without temporary variable -

this question has answer here: getting input directly vector in c++ 5 answers how input vector without temporary variable(like x in example)? std::vector<int> a; int n, x; std::cin >> n; (int i=0;i<n;i++) { std::cin >> x; a.push_back(x); } one possible solution: int n, x; std::cin >> n; std::vector<int> a(n); (int i=0;i<n;i++){ std::cin >> a[i]; }

swift - Some cells bottom are being cut off using UICollectionViewCell and dequeueReusableCell -

i spent entire day trying figure out going on uicollectionview. i’m trying implement feed news facebook, obscure reason i’m having weird behaviors reusing cells. i’ve read apple’s documentation related tons of time , tried diverses fixes. i'm using firebase pull out data, when user scrolls down function asks more data , merges posts array, , calls collectionview.reloaddata()... ` override func scrollviewdidenddragging(_ scrollview: uiscrollview, willdecelerate decelerate: bool) { // uitableview moves in 1 direction, y axis let currentcontentoffset = scrollview.contentoffset.y let maximumcontentoffset = scrollview.contentsize.height - scrollview.frame.size.height // set minimum distance bottom load more posts if maximumcontentoffset - currentcontentoffset <= 1000.0 { self.updatenewrecords(withoffset: self.currentoffset, findoffsetbyiteminarray: false) } } a second function override func collectionview(_ collectionview: uicollectio

How to modify or extract multiple file/folder names on windows? -

Image
is possible write program extract file/folder names in folder , modify it? example, want file names here not have "0n eagles - " prefix. or if want extract file names , store in text document. general solution, if any, such problems lot of help.

regex to make the string meaningful. python -

how remove non-english words (vocabulary) string for example: puppies monitoring_string = c1299fe10ba49eb54f197dd4f735fcdc dogtime how remove non-english word, keep vocabulary: result : puppies monitoring string dogtime or puppies monitoring string ....or others the purpose make string meaningful. what tried was: re.sub('[^a-za-z0-9]+', ' ', string) result: puppies monitoring string c1299fe10ba49eb54f197dd4f735fcdc dogtime can't think of logic words possess non-words not. to start, maybe can try removing words numbers in them. the regex \w*\d\w* should find letter combos numbers , numbers.

windows - "This file came from another computer and might be blocked to protect this computer" inconsistency -

i encountering strange inconsistency message. basically, symantec extended validation code signing on our windows product installer. had been doing since end of july (it not automated yet) , had done more 50 signings different products' releases. verification process involve: 1. running signtool /verify option check signing done properly. 2. manually open file's properties double check sure. yesterday, our tester product release noticed problem on windows 2003 , windows 2008 box , discovered message files' properties. internet search points ntfs's feature. however, here discrepancies trying figure out. when start vagrant image running windows 2012 r2 (64bit) ntfs system , download signed installer, noticed "zone.identifier" not removed when more < myinstaller.exe:zone.identifier; , if bring file's properties, don't see warning/error "this file came computer , might blocked protect computer". , therefore during manual test run,

c++ - reduce a 5x5 matrix to an 25 element array in c -

i have following homework problem witch can't seem find solution. problem: create 5x5 matrix of integers , check if of elements of matrix in interval [-10,15], , ones belong interval add array of 25 elements. program should implemented in c/c++. question: have written following code , problem have when try transfer elements have found fit condition, in nested for-loop. trouble when cycle through 5 elements , @ same time iterate 25 elements. how can this? here code: #include <stdio.h> #include "stdafx.h" void main() { int i, j, k, l, m; int a[5][5]; int b[25]; printf("please enter elements of matrix:\n"); ( = 0; < 5; i++) { ( k = 0; k < 5; k++) { scanf_s("%d", &a[i][k]); } } ( k = 0; k < 25; k++) { ( l = 0; l < 5; l++) { if (a[k][l] > -10 && a[k][l] < 15) { b[k] = a[k][l]; }

Calculate Different Types of Spend - Pandas/Numpy - Python -

Image
i have 2 dataframes : df1 +------------+-------------+------+ | product id | cost method | rate | +------------+-------------+------+ | 10 | cpm | 10 | | 20 | cpc | 0.3 | | 30 | cpcv | 0.4 | | 40 | flf | 100 | | 50 | vad | 0 | | 60 | cpm | 0.1 | +------------+-------------+------+ df2 +--------+------------+-------------+--------+-----------------+ | date | product id | impressions | clicks | completed views | +--------+------------+-------------+--------+-----------------+ | 01-jan | 10 | 300 | 4 | 0 | | 02-jan | 20 | 30 | 3 | 0 | | 03-jan | 30 | 200 | 4 | 20 | | 02-jan | 40 | 300 | 4 | 0 | | 02-jan | 40 | 500 | 4 | 0 | | 03-jan | 40 | 200 | 3 | 0 | | 04-jan |

php - Laravel and SQL server and database class -

i have got laravel installed , trying fetch data sql server database keep having same problem time , getting frustrated because either don't know doing or doing wrong. i've got database connection set after lot of hassle odbc sql drivers windows. in welcome.blade.php want fetch data database everytime try data error: fatal error: class 'illuminate\support\facades\db' not found in c:\xampp\htdocs\resources\views\welcome.blade.php on line 9 now got these 2 lines in code should fetch (i guess) data: <?php $booking = \illuminate\support\facades\db::table('fmsstage.dbo.booking')->get(); var_dump($booking); ?> but instead gives me error. , i've tried using \db::table , tried using table \db::table('booking') , table prefix \db::table('dbo.booking') won't find whole db class. doing wrong, don't @ all. when try add use db; it gives me error/warning: warning: use statement non-compound name &

php - Refresh oauth2 token google api and HWIOAuthBundle -

how can refresh token ? use google api token - work can't find how refresh it, in example dont save expired time. require `access_type: offline ` then $client = new google_client(); //$client->setclientid($googleclientid); $client->setapplicationname($googleappname); $client->setclientid($this->user->getgoogleid()); $client->setaccesstype('offline'); if token valid can work when expired try $token = [ 'access_token' => $this->user->getgoogleaccesstoken(), 'expires_in' => (new \datetime())->modify('-1 year')->gettimestamp(), ]; i put date because in example don't save expired time https://gist.github.com/danvbe/4476697 $client->setaccesstoken($token); if($client->isaccesstokenexpired()){ $refreshedtoken = $client->refreshtoken($client->getaccesstoken()); here have error array:2 [▼ "

How to take one character at a time as input from a string of characters without space in c? -

suppose,"5181 2710 9900 0012"- string of digits.i need take 1 single digit @ time input string of number without space make arithmatic operations . so, write that, int a[20]; for(int i=0;i<16;i++) { scanf("%d",&a[i]); } but didn't give me expected result. when use "%1d"instead of "%d",it gave me expected result. so, how works? since scanf inverse of printf, verify printing number modifier (just little tip). * in general, number before format 'width' modifier. in case means you're reading 1 byte number. if specify %d, may number of arbitrary length. example: #include <stdio.h> int main() { int a; sscanf("1234", "%d", &a); printf("%d\n", a); // prints 1234 sscanf("1234", "%1d", &a); printf("%d\n"m a); // prints 1 } *) appears false particular case. makes sense numbers not truncated when specifiying %d

swift3 - The error is "Error Domain=NSCocoaErrorDomain Code=3840 "No value." UserInfo={NSDebugDescription=No value.}" -

i'm learning json. have problem parsing json url. error : "error domain=nscocoaerrordomain code=3840 "no value." userinfo={nsdebugdescription=no value.}" json valid - i've checked. structure of json: and code: import uikit @ibaction func signintapped(_ sender: uibutton) { if validate() == true { let myurl = url(string: "") var myrequest = urlrequest(url: myurl!) myrequest.httpmethod = "post" myrequest.addvalue("application/json", forhttpheaderfield: "content-type") let poststring = "{\"login_username\":\"xyz\",\"login_password\":\"abc\"}" myrequest.httpbody = (poststring string).data(using: .utf8) urlsession.shared.datatask(with: myrequest, completionhandler: { (data:data?, response:urlresponse?, error:error?) -> void in if error != nil { print(&q

API POSTing for large batches of data -

i trying add products deals in pipedrive - excel import doesn't allow that. api does. https://developers.pipedrive.com/v1 i complete beginner in of this, i've been able use postman chrome app add products: post: https://api.pipedrive.com/v1/deals/:id/products?api_token=mytoken in postman, set variables :id (the deal), , mytoken. in body section (raw/json), add following: [{ "product_id":34160, "item_price":25, "quantity":50 }, { "product_id":34160, "item_price":10, "quantity":50 }] which adds product 2 times deal. great! so have basic questions making api calls, want make large update of data (100s of deals , products) as complete beginner, how can make such api calls, on mass - many updates? there simple tool can that? need wrap code in html , make database? (hopefully not!) in same action, i'd need dynamically pass :id in url variable. postman doesn't seem let me - possible. ease of

excel - VBA code for deleting columns that contain a specific string with the function Cells -

i writing code rid of columns contain specific string in cell. code follows: dim integer dim j integer dim state string dim num variant num = inputbox("enter state", "what stx it?", "enter x here") 'the & combine them state = "st" & num activesheet.usedrange 'uses columns in use due previous line j = 2 .columns.count if .cells(2, j).formula = state 'do nothing else range(.cells(1, j), .cells(.rows.count, j)).delete shift:=xltoleft end if next j end end sub i start @ j=2 because not want erase first column. here snippet of data trying modify. however, doesn't erase columns contain specific cell. puzzles me if replace range(.cells(1, j), .cells(.rows.count, j)).delete shift:=xltoleft with range(.cells(1, j), .cells(.rows.count, j)).interior.colorindex = 6 it correctly highlights cells want delete. when deleting rows loop should run backwards, when delete row, j increases 1 ,

html - align content to top in div -

i'm not clever man, trying make responsive page left sidebar, far that's okay, cannot figure out how align content of main div top. this code : https://jsfiddle.net/kissja74/df8vkn2a/ #content { position: relative; max-width: 400px; margin: 0 auto; } #menu { position: relative; width: 50px; height: 30px; margin-left: -50px; background-color: blue; } <div id='content'> <div id='menu'>menu</div> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit. morbi interdum porttitor accumsan. aliquam @ egestas lacus, sed ultrices dui.</p> </div> add style #menu {float: left}

wordpress - How to make woocommerce always show price including tax based on shop location? -

how make woocommerce show price including tax based on shop location , in checkout woocommerce show price depends on user country. it possible? thank you with can choose currency show depending on location. can set rate manually can apply different prices different countries https://wordpress.org/plugins/woocommerce-product-price-based-on-countries/

python populate elements in array -

i new python (previous matlab user). i have array y_pred = [none] * 128 test_idx array of indeces array([ 3, 4, 5, 19, 28, 30, 38, 39, 47, 49, 50, 51, 54, 64, 74, 81, 84, 85, 90, 91, 93, 97, 102, 103, 106, 107, 109, 111, 115, 121], dtype=int64) i replace values of y_pred corresponding test_idx array results array([0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]) if try y_pred[test_idx] = results i error: typeerror: integer arrays 1 element can converted index short version: replace y_pred = [none] * 128 y_pred = np.full(128, np.nan) . else work once that. long version: the problem others have said, y_pred list, not array. lists not support getting or setting multiple indexes @ time, need use numpy array that. the simplest approach want use numpy array of called "sentinel" value, value indicates nothing written there. obvious choice value either 0

codenameone - ToastBar in postResponse of connectionRequest -

toastbar when use in part of code, works fine, when use show message connection completed ie. use in postresponse of connectionrequest , doesn't show. why? public boolean abc = false; connectionrequest cr = new connectionrequest(){ @override protected void postresponse() { abc = true; //update: toastbar commented toastbar.showmessage("confirmation of password sent email address", fontimage.material_mail_outline,2000); } }; cr.setpost(true); cr.seturl(allurl.forgetpasswordurl); cr.setduplicatesupported(true); cr.settimeout(30000); cr.addargument("forgetten_email", forgottonemail); infiniteprogress ip = new infiniteprogress(); dialog d = ip.showinifiniteblocking(); cr.setdisposeoncompletion(d); networkmanager.getinstance().addtoqueueandwait(cr); update1: form created in gui builder blank dialog. toastbar doesnot work here dialog box works protected void beforeforgetpassworddialog(form f) { textfield emailtextfi

python - Perplexity comparision issue in SKlearn LDA vs Gensim LDA -

i applied lda both sklearn , gensim. checked perplexity of held-out data. i getting negetive values perplexity of gensim , positive values of perpleixy sklearn. how compare values. sklearn perplexity = 417185.466838 gensim perplexity = -9212485.38144 in order compare perplexities need convert gensim's perplexity using np.exp(-1. * gensim_model.log_perplexity(train_corpus)) . see here general comparison of gensim , sklearn lda implementations.

javascript - $.get is not a function -

i want data on js , therefore "develop" small script. haven't worked js/jquery long time , i'm facing basic problem. tried replace $ jquery got same error. html <html> <head> <script type="text/javascript" src="jquery-3.1.1.slim.min.js"</script>"></script> <script type="text/javascript" src="main.js"</script>"></script> </head> <body> <button>test</button> </body> js jquery(document).ready(function(){ jquery("button").click(function(){ jquery.get("mydomain", function(data, status){ alert("data: " + data + "\nstatus: " + status); }); }); }); you referencing jquery slim, doesn't include (among other things) ajax functions such .get() . you need reference full version of jquery instead. see link more detailed description of , n

c++ - How to find an owned window in a Win32 application? -

first, let me explain situation: in win32 app, have overlapped window hwnd name hwnd1. create overlapped window following code: hwnd hwnd2 = ::createwindowex(0, l"classname", l"window_name", ws_overlappedwindow, left, top, width, height, hwnd1, null, ::getmodulehandle(null), null); at first, thought hwnd1 hwnd2's parent window. when use "findwindowex" trying find hwnd2 below: ::findwindowex(hwnd1, nullptr, l"classname", l"window_name"); i can't find it. discovered hwnd1 not hwnd2's parent owner. "findwindowex" invalid in situation. how can find hwnd2 when know owner , class name , window name?

javascript - Going to the router URL directly is not working -

i'm using react-router, , working fine except when go url directly. example, if clicked on link in app goes "/quizreview?quizid=naul3dmflx" works no problem. if entered url " http://localhost:3000/quizreview?quizid=naul3dmflx " says: cannot /quizreview?quizid=naul3dmflx here router code: reactdom.render(( <router history={browserhistory}> <route path="/" component={app}> <indexroute component={userquiz} onenter={loginrequired}/> <route path="/login" component={login}/> <route path="/quiz/:id" component={quiz}/> <route path="/quizreview" component={postquiz}/> <route path="/quizquestions/:quizid" component={questionform}/> <route path="/questionreview/:questionid" component={questionreview}/> <route path="/noquestions" component={noquestionsdialog}/> </route> <

excel - Show values matching multiple statements -

Image
i'm stuck how move forward problem. i have excel sheet looking attached images. want in sheet present reviews have comment attached. what want in sheet(report) want show list consisting of good/bad scores connected team during week 42 comment has been made. in example list concisting of row 2 , 4. the source list consist of on 100k rows first try limit formula offset on rows in specified week. maybe vba code better quicker way this? try code: sub test() dim row integer, lastrow long, rng range 'this filters data , copies result second worksheet - sheet2 (rename suit) sheet1 on error resume next .showalldata on error goto 0 lastrow = .cells(rows.count, 1).end(xlup).row .range("a1:d" & lastrow).autofilter field:=1, criteria1:="a" .range("a1:d" & lastrow).autofilter field:=2, criteria1:="42" .range("a1:d" & lastrow).autofilter field:=4, criteria1:="<>

python - xlrd: Select cell relative to another cell -

i'm wondering if there way select cell/cell range relative position of known cell? along lines of... refcell = mysheet.cell(4, 4) desiredcell = refcell.relative_position(2, 1) so desired cell select cell (6, 5). i've looked through documentation ( https://media.readthedocs.org/pdf/xlrd/latest/xlrd.pdf ) can't find anything. the reason want refcell , surrounding desiredcells stay together, position of block of cells change, breaking code. way can search worksheet single cell, , base rest of code on position. # sentinel_rowx , sentinel_colx determined @ run-time ... (4, 4) in example. delta_rowx = 2 delta_colx = 1 base_rowx = sentinel_rowx + delta_rowx base_colx = sentinel_colx + delta_colx # application-specific code # e.g. operations on rectangle of 20 rows , 10 columns rowx in range(20): colx in range(10): do_something_with(sheet.cell(base_rowx+rowx, base_colx+colx)) is looking for?

r - Find an element following a sequence across rows in a data frame -

i have data set structure shown below. # example data set <- "a" b <- "b" d <- "d" id1 <- c(a,a,a,a,b,b,d,d,a,a,d) id2 <- c(b,d,d,d,a,a,a,a,b,b,d) id3 <- c(b,d,d,a,a,a,a,d,b,d,d) dat <- rbind(id1,id2,id3) dat <- data.frame(dat) i need find across each row first sequence repeated elements "a" , identify element following sequence immediately. # desired results dat$s3 <- c("b","b","d") dat i able break problem in 3 steps , solve first 1 programming skills quite limited, appreciate advice on how approach steps 2 , 3. if have idea solves problem in way extremely helpful well. here have far: # step 1: find first occurence of "a" in fist sequence dat$s1 <- apply(dat, 1, function(x) match(a,x)) # step 2: find last occurence in first sequence # step 3: find element following last occurence in first sequence thanks in advance! i'd use filter :

How to clean the /boot directory on LINUX Mint? -

Image
after yesterday update of linux mint mate (64bit), started receive warning "full disk space". have 400 mb /boot partition on hard disk. this screen-shot of /boot files. this screen-shot of update-log. the question is: how can clean /boot ? files safe delete? check current kernel version uname -r , make sur current kernel work without problem keep it. from terminal : list installed kernel : dpkg --list | grep linux-image dpkg --list | grep linux-headers remove old kernels through following command: apt-get purge linux-image.x... apt-get purge linux-headers.x... using synaptic package manager open synaptic , mark old kernel versions removal apply changes update manager from update manager view linux kernels , click 'remove' button kernels want remove purge-old-kernels you can install purge-old-kernels cli tool through: sudo apt-get install bikeshed if want purge old kernel except latest 2 kernels, run follo

php - Make associative array from array structure build with JSON and Simple XML -

i read xml file , want values output array. code write array: $xml = simplexml_load_file('http://www.xyz.be/meteo'); $json_string = json_encode($xml); $result_array = json_decode($json_string, true); the output array has following structure: array ( [station] => array ( [0] => array ( [@attributes] => array ( [id] => 6407 [name] => kust ) [day] => array ( [0] => array ( [@attributes] => array ( [id] => 20161110 ) [tmax] => 10 [weather] => 11 [dd] => nw

themes - How to remove White space on Images in Magento 2 -

Image
how can remove white spaces on pictures in magento 2? thx you have more 1 way. the problem: images small or given size in config big. you have edit view.xml app/design/frontend/themename/theme/etc/ take size (px) images , edit given values in file. use image biger size. i think have first way. otherwise have change images , thats not fastest way, right? =) and dont forget check given/set image "attribut/role" in product under "images , videos". can set

fsm - coffee vending machine simulation in verilog with test bench issue -

i have written verilog code simple coffee vending machine inputs 25ps,50ps,75ps , 1 as "00","01","10" , "11" respectively. coffee cost 1 rs. if more 1rs inserted, balance returned. balance 01, 10, 11 as 25ps, 50ps, 1rs respectively. simulate without test bench. simulation takes double clock pulse output.(when put 25 ps 8 times or 8 clock pulses required getting output. expected clock pulse 4). why happens? , didn't output when using test bench. please me correct test bench , programme. clock frequency divider necessary while doing programme in fpga board see output? working expected when programmed fpga board.im using xilinx vivado 2015.2 tool , zynq board.please me solve these issues //programme module main( input clk, input rst, input [1:0] money, output coffee, output [1:0] balance ); reg coff; reg [1:0] bal; reg [2:0] pr_st; reg [2:0] nx_st; parameter [2:0] a=3'b000; parameter [2:0]

javascript - ng-include wont load script nested in inlcuded html -

i´m trying include html page ng-include directive div in main html. main html: <div class="col-sm-9" data-ng-include="'subpage.html'"> </div> this subpage displayed correclty in given div. additionaly subpage contains script contains angular methods. added in header of subpage. <script type="text/javascript" src="js/subservice.js"></script> calling page localhost:8080/subpage allowes me use functions , linked functions controller. but when included via ng-include script not load ofc results in no functionality. (checked in console) both mainpage , subpage contain ng-app directive , both full standalone html. does have idea how this? update like said in answers <object name="subpage" type="text/html" data="./subpage.html"></object> is solution.but did´t found solution swap them dynamcly in body div tag. another option load via jquery

Why are Spring Data repository method parameters names not available even on Java 8? -

i'm having hard time getting tests pass on pivotal's example project spring-boot 1.4 release from examples shows spring-data-jpa using unannotated named parameters in jpql e.g. from example.springdata.jpa.simple.simpleuserrepository @query("select u user u u.firstname = :firstname") list<user> findbyfirstname(string firstname); nb not using @param annotation this doesn't run on machine. exception detailed here, self-explanatory title. name parameter binding must not null or empty! named parameters need use @param query method parameters on java versions so have instead: @query("select u user u u.firstname = ?1") list<user> findbyfirstname(string firstname); or this: @query("select u user u u.firstname = :firstname") list<user> findbyfirstname(@param("firstname") string firstname); what i'm using: os - win7 java - 1.8.0_112 ide - intellij idea 2016.2 jpa version - jpa v2

Failure to start session. Selenium running phantomjs webdriver and facebook's php bindings -

i have been looking web browser automation , have managed selenium server jar executable work facebook php bindings on laptop ability swap between chrome , phantomjs. versions: selenium: 3.0.1 phantomjs: 2.1 (example) <?php namespace facebook\webdriver; use facebook\webdriver\remote\desiredcapabilities; use facebook\webdriver\remote\remotewebdriver; require_once('vendor/autoload.php'); $host = 'http://localhost:4444/wd/hub'; $capabilities = desiredcapabilities::phantomjs(); $driver = remotewebdriver::create($host, $capabilities, 5000); $driver->get('https://google.co.uk'); my next step move project onto remote box , integrate web applications, can source form information or trigger tasks in situations. i began placing selenium.jar file /opt directory, , have lightly edited this init script run selenium standalone server , not hub. i have installed phantomjs path. whenever attempt run above example on web server, receive following m

jquery chosen - Angular 2 Select - Load data from web service trouble -

Image
i using ng2-select display list of items user can search , find appropriate 1 select list. problem facing works on static data. data loaded restful webservice. have tried multiple hacks , tricks unable load data web service ng2-select. appears plugin not support loading web service data. there working hack load webservice data ng2-select ? if not please suggest other angular2 plugin can load data web service , enables user search , select. update : missed mention getting data web service. there no issue in getting data web service. problem ng2-select. populate items array fetched data web service(confirmed printed items array on console) ng2-select not show anything. if not fetch data web service , populate array local data(which assigned @ time of initializing), works , displays local data. it cant seem work requests. here example code comment product-category.service.ts import { injectable } '@angular/core'; import { http} '@angular/http'; import {ob

linux - Docker swarm, listening in container but not outside -

we have number docker images running in swarm-mode , having trouble getting 1 of them listen externally. if exec container can curl url on 0.0.0.0:8080. when @ networking on host see 1 packet being stuck in recv-q listening port (but not others working correctly. looking @ nat rules can curl 172.19.0.2:8084 on docker host (docker_gwbridge) not on actual docker-host ip (172.31.105.59). i've tried number of different points (7080, 8084, 8085) , stopped docker, did rm -rf /var/lib/docker, , tried running container no luck. ideas on why wouldn't working 1 container image 5 others work fine? docker service docker service create --with-registry-auth --replicas 1 --network myoverlay \ --publish 8084:8080 \ --name containerimage \ docker.repo.net/containerimage ss -ltn state recv-q send-q local address:port peer address:port listen 0

javascript - Angular cascading dropdowns -

i trying create 2 drop downs 1 topic , other 1 videos. videos 1 going filter topics. thank in advance help. <md-input-container flex> <label>topic</label> <md-select ng-model="selected.topic" required ng-change="getvideosbytopicid(selected.topic)"> <md-option ng-repeat="topic in topics" value="{{topic.topicid}}">{{topic.topicname}}</md-option> </md-select> </md-input-container> <md-input-container flex> <label>video</label> <md-select ng-model="selected.video" required > <md-option ng-repeat="video in videos" value="{{video.videoid}}">{{video.name}}</md-option> </md-select> </md-input-container> and controller function getvideosbytopicid(topicid) { return $http.post(baseurl +

xml - Android Admob banner display always front the page -

my banner adview display front screenshot. my xml code is: <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ads="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/content_main" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior" tools:showin="@layout/app_bar_main"> <relativelayout android:id="@+id/fragmentreplace" android:layout_width="match_parent" android:layout_height="wrap_content"></relativelayout> <com.google.android.gms.ads.adview android:id="@+id/adview" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignparentbott