Posts

Showing posts from July, 2015

angularjs - Get template associated with a controller inside that controller itself -

is there injectable providers available controllers partials template on controller same applied. like <div ng-controller="testcontroller"> <div> angular.module("app") .controller("testcontroller",function([$templateprovider]){ }); i want <div ng-controller="testcontroller"> <div> element inside testcontroller is there template built-in providers available in angularjs?? we can use $rootelement . giving complete ng-app element. can use queryselector partials $rootelement . the root element of angular application. either element ngapp declared or element passed angular.bootstrap. element represents root element of application. location application's $injector service gets published, , can retrieved using $rootelement.injector().

ios - Post image on Facebook web -

in app, using slcomposeviewcontroller post images on facebook app, works fine. requirement is, if facebook app not installed, open web page , allow user post image though web. please can advise how post image on facebook web? have ios 9 , above xcode 8.1. use facebook sdk post image facebook. can find code , documentation here: https://developers.facebook.com/docs/sharing/ios facebook sdk handle types of exception , scenario.

sql - MySQL Innodb fail to use index due to extremely wrong rows estimation -

i've innodb table, query on table looks below. select * x now() between , b i've create composite index on (a,b), query returns around 4k rows, while total number of rows in table around 700k. however, when explain of execution plan, found query did not use expected index. because estimated rows around 360k, extremely larger actual value. i know many posts (such why rows returns "explain" not equal count()? ) had explained, explain estimation. force index solution tricky , may bring potential performance risks in future. is there way can make mysql more accurate estimation (the current 1 90 times larger)? thanks. innodb keeps approximate row counts tables. explained in documentation of show table status : rows the number of rows. storage engines, such myisam, store exact count. other storage engines, such innodb, value approximation, , may vary actual value as 40 50%. i don't think there's way make innodb keep acc

How can i programmatically get the root of an Active Directory Forest via C# -

my customer has huge active directory forerst. example: root company.com de.company.com us.company.com in.company.com xx.company.com when current user domainname\username . when grab domainname , want search in domain other users in world, can't cause need know company.com directory search. is there way in c# root object use directorysearcher or other c# method query ad? root forest name can ontained rootdse partition. @ rootdomainnamingcontext attribute. wiil return forest root domain. not recommend extract forest name user dn, not work in case if have 2 domain trees in 1 forest. second option search users in global catalog of current domain. global catalog contains partial replica of users entire forest the code below performs search on global catalog. have 2 domains, in forest returns me 2 users. aware, have deal multiple results returned: var forest = forest.getcurrentforest(); var globalcatalog = globalcatalog.findone(new direct

react native - How to change state when Button pressed? -

i'm new react native , unfamiliar js. i want program show wrote in textinput when pressed button (there's text below button ). figured maybe should make 2 state: put state1 text text input, , put state2 mimin textinput input, , when button pressed , put state2 mimin state1 text . i've tried code below gave me red page when click button . import react, { component } 'react'; import { appregistry, stylesheet, text, button, textinput, alert, view } 'react-native'; export default class hella extends component { constructor(props) { super(props); this.state = {text: '', mimin: ''}; } render() { return ( <view style={styles.container}> <textinput style={{height: 40}} placeholder="type here translate!" onchangetext={(mimin) => this.setstate({mimin})} /> <button onpress={onbuttonpress} title=&q

java - org/apache/http/protocol/HTTP error when using Rest Assured -

Image
my code snipped is: @test public void connectiontestwithrestassured() { given(). contenttype("application/json"). when(). get("http://localhost:8080/dictionaries"). then(). statuscode(200); } getting following error: java.lang.noclassdeffounderror: org/apache/http/protocol/http @ com.jayway.restassured.config.encoderconfig.<init>(encoderconfig.java:48) @ com.jayway.restassured.config.restassuredconfig.<init>(restassuredconfig.java:41) @ com.jayway.restassured.restassured.<clinit>(restassured.java:423) @ com.adobe.test.dictionary.getdictionary.connectiontestwithrestassured(getdictionary.java:33) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(unknown source) @ java.lang.reflect.method.invoke(unknown source) @ org.testng.internal.methodinvocatio

android - Collapsing toolbar with tablayout -

Image
what want achieve : this ui design belongs to audio beats and here have . problem tablayout going behind recyclerview when collapsing toolbar expanded. , i'm not able remove title "musico" or set top sticky. my xml <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="200dp" android:fitssystemwindows="true" android:theme="@style/apptheme.appbaroverlay"> <android.support.design.widget.collapsingtoolbarlayout android:id="@+id/collapsing_toolbar" android:layout_width="match_parent"

sql - Want to insert data in oracle number data type column as '001' instead of '1' -

want insert data in oracle number data type column '001' instead of '1'. here code: create table temp2 (id number); insert temp2 values(001); when executing: select * temp2; the output appears as: id 1 i want store number '001' instead of '1'. you shouldn't store information used display purposes. if number, means store number. you can format output when displaying values: select to_char(id, 'fm000') temp2; if don't want each time run select, create view: create view formatted_temp select to_char(id, 'fm000') temp2; or create computed column you: alter table temp2 add formatted_id generated (to_char(id, 'fm000'));

gulp sass sourcemaps and autoprefixer not working -

i unable autoprefixer working gulp sass. here gulpfile.js: 'use strict'; var gulp = require('gulp'); var sass = require('gulp-sass'); var sourcemaps = require('gulp-sourcemaps'); var autoprefixer = require('gulp-autoprefixer'); gulp.task('sass', function () { gulp.src('./sass/**/*.scss') .pipe(sourcemaps.init()) .pipe(sass().on('error', sass.logerror)) .pipe(sourcemaps.write()) .pipe(autoprefixer({ browsers: ['last 2 versions' ]})) .pipe(gulp.dest('./css/')); }); gulp.task('watch', function () { gulp.watch('./sass/**/*.scss', ['sass']); }); gulp.task('default', function () { gulp.watch('./sass/**/*.scss', ['sass']); }); i followed solution in related question couldn't done. here link : link i able achieve sourcemaps , autoprefix functionality thought of sharing. here gulpfile.js : 'use strict'; var gulp

pass variable from html to ruby on rails -

i new in ruby on rails , want pass variable index.html.erb search.html.erb file , use variable in ruby code. in other words, have text , submit button in index.html.erb . if type in text , press button pass in text search.html.erb , use text in ruby code index.html.erb <h1>twitter</h1> <html> <form> <input type = 'search' name = 'search' /></br> <a href=/home/search><button type="button">search</button></a> </form> </html> search.html.erb <h1>twitter</h1> <html> <%= require 'twitter' client = twitter::rest::client.new |config| config.consumer_key = "xxxxxxxxxxxxxxxxxx" config.consumer_secret = "xxxxxxxxxxxxxxxxxx" config.access_token = "xxxxxxxxxxxxxxxxxx" config.access_token_secret = "xxxxxxxxxxxxxxxxxx" end %> <ul> <%=client.

regex - Split camelCase word into words with php preg_match (Regular Expression) -

how go splitting word: onetwothreefour into array can get: one 2 3 4 with preg_match ? i tired gives whole word $words = preg_match("/[a-za-z]*(?:[a-z][a-za-z]*[a-z]|[a-z][a-za-z]*[a-z])[a-za-z]*\b/", $string, $matches)`; you can use preg_match_all as: preg_match_all('/((?:^|[a-z])[a-z]+)/',$str,$matches); see it explanation: ( - start of capturing parenthesis. (?: - start of non-capturing parenthesis. ^ - start anchor. | - alternation. [a-z] - 1 capital letter. ) - end of non-capturing parenthesis. [a-z]+ - 1 ore more lowercase letter. ) - end of capturing parenthesis.

swift - Unable to load TableView in Today Extension ios -

Image
i unable load tableview inside today extension. deleted initial view controller , replaced tableview controller. did added delegates in table view ncwidgetproviding , function widgetperformupdate . sample app, check today extension. can respond solution !!! thanks few things noticed: try setting tableview's delegate , datasource in viewdidload() : self.tableview.delegate = self self.tableview.datasource = self it's better use tableview.dequeuereusablecellwithidentifier indexpath : let cell = tableview.dequeuereusablecellwithidentifier("reuseidentifier", forindexpath: indexpath) more on here if none of above helps, maybe there's wrong autolayout? table might displayed, it's not visible.

Which one to choose Betweeen Spring scheduler and JMS ? And difference between them -

i using spring scheduler , jms, 1 better approach scheduling. @service public class scheduledprocessor implements processor { private final atomicinteger counter = new atomicinteger(); @autowired private worker worker; @scheduled(fixeddelay = 30000) public void process() { system.out.println("processing next 10 @ " + new date()); (int = 0; < 10; i++) { worker.work(counter.incrementandget()); } } } these solutions fundamentally different. scheduled services kicked off every n milliseconds after last run , processes whatever available. it's not guaranteed process in timely manner , might not scale if amount of data process grows (and if processing has level of complexity). i tend lean towards jms. first off, messages processed come in, pushed listener, rather being polled in service. second, if necessary can scale messages both horizontal , vertical, giving more knobs make sure actual pr

jquery - Bootstrap w3school tutorial Dropdown not work -

hi i'm new bootstrap , i'm trying create dropdown bootstrap , not working. here html <!doctype html> <html> <head> <title>sample</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <script type="text/javascript" src="js/bootstrap.min.js"></script> <link rel="stylesheet" href="css/bootstrap.min.css"> </head> <body> <div class="dropdown"> <button class="btn btn-primary dropdown-toggle" type="button" id="ddbutton" data-toggle="dropdown">button</button> <ul class="dropdown-menu" role="menu"> <li><a href="#">html</a></li> <li><a href="#">css</a></li> <

php - Variable variables in SimpleXMLElement -

Image
i have 'simple' problem :-) i'm reading large xml file using this: $node = new simplexmlelement($reader->readouterxml()); $node have elements severity, class... can compare them this: if($node->severity==warning){ or show them this: echo $node->severity; what want prepare if statements in advance reading posts variables this: if(isset($_post['severity']) && !empty($_post['severity'])){ $severity[]=$_post['severity']; foreach($severity $severityval){ foreach($severityval $severityvalues){ $searchquery .= '($node->severity==' .$severityvalues. ') || '; } } } then want use $searchquery inside xml reader: if($searchquery){ echo $node->severity; } but, return true , shown :-( my variable created, if echo shows ($node->severity==warning) maybe screen shot can explain problem: thanks in advance try : if(isset($_post['severity']) && !empty(

java - How to compile or run Kumo cli on php server w/ jdk and jre installed -

i want generate text cloud on php server. found kumo in github , seems promising. https://github.com/kennycason/kumo . the problem have how build jar file / use kumo on server. don't intend install java ide think jdk / jre should provide me necessary tools compile/make jar file. not sure how correctly on php server. , unfortunately, there no doc there in github telling me how it. after getting cli, intend use cli interface php script.

csv - unexpected EOF while parsing string to float python -

i`m trying read data csv file contains matrix of strings ["1", "2", "1", "3", "45", "65"] want change float or int prepare data using tensorflow import numpy np import tensorflow tensorflow import csv import ast file = open('stub.csv') reader = csv.reader(file) temp = list(reader) del temp[0] # convert data numpy array data = np.array([[ast.literal_eval(j) j in row] row in temp]) when i`m using ast.literal_eval(j) have got exception: syntaxerror: unexpected eof while parsing i tying many things, can me please ? since consider file csv, first value parse ["1" can't translated python type. then, tried solve problem without consider file csv. import numpy np import ast open('stub.csv') file: temp=file.readlines() # convert data numpy array data = np.array([map(int, ast.literal_eval(row)) row in temp]) you can choose convert data float replacing int float . hope

android - GridLayoutManager same background for each row -

i have been trying project in link . working fine. got output also. enhance don't know do. having background , need keep background each row of gridlayoutmanager in recyclerview. please me on this. , in advance mainactivity.java public class mainactivity extends appcompatactivity { recyclerview recyclerview; context context; recyclerview.adapter recyclerview_adapter; recyclerview.layoutmanager recyclerviewlayoutmanager; string[] numbers = { "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", }; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); context = getapplicationcontext(); recyclerview = (recyclerview) findviewbyid(r.id.recy

ios - Swift - Different object in console/debugger -

Image
i'm having big wtf moment , have no idea what's going on so have little piece of code let par2 = bla.parameter[2]! print(par2) bla object of class called fitservice singleton , parameter dictionary id of object. class of object called parameter , looks this: class parameter:object{ dynamic var parameterid:int = -1 dynamic var name:string = "" dynamic var updatedat:date = date(timeintervalsince1970: 0) convenience init(json:json){ self.init() self.parameterid = json["parameterid"].int ?? -1 self.name = json["name"].string ?? "" self.updatedat = date.from(mysql: json["updatedat"].string) } override static func primarykey() -> string? { return "parameterid" } } i'm using realm save objects , swiftyjson/alamofire data backend , convert it. so come wtf moment: i've set breakpoint after print() line first snippet , output: so

osx - RAM/Hard Drive space occupied as I run a C++ code on MAC? -

i compile c++ code (c++11, stl libraries) , run on mac. simulation progresses, notice after while, space on hard drive starts being occupied point if don't stop code, can freeze machine. tried valgrind (mandatorily on smaller problem size) find memory leaks, don't. unfortunately, actual problem size big won't' possible run valgrind on it. what maybe problem? potential memory leak? ps: if helps, using os x 10.9.5 , compile cpp code using g++ command. edit: checking activity monitor , memory not seem increase on mac. makes more peculiar. edit2: able track down problem in code. std::vector mistakenly extended via push_back calls. that's why valgrind did not report memory leak either. interesting observation: on osx, actual ram not being used program size grew bigger. osx decided use hard drive space instead. on linux (centos), ram occupied code until os killed job.

php - CakePhp 3 strange behavior AuthComponent -

environment: php 5.4.45 cakephp 3.1.11 debian 7 problem login not alway's working. after submit returns same login-page without error. after closing , restarting browser, login works expected. problem seems exist mostley google chrome. clients (on mac , google chrome) -even after closing , restarting- never able login. on same machine work safari , firefox. on testserver (debian 8, php 5.6, cake 3.3) never experienced problem. again, since test-server, not used on lot of machines. usercontroler login public function login() { $session = $this->request->session(); $session->destroy(); $session->renew(); cache::clear(false); $this->viewbuilder()->layout('id_start'); if ($this->request->is('post')) { $user = $this->auth->identify(); if ($user) { $newtime = date("ymd|h:i:s"); $this->auth->setuser($user); $this->loadmodel('te

How to pass variables for a script via SNMP by using snmpget? -

i have 1 simple bash script calls test_snmp, let's say: #!/bin/bash echo $1 i have snmpd.conf set following: rwcommunity public 127.0.0.1 extend .1.3.6.1.4.1.2021.53 /bin/bash /tmp/test_snmp what i'd run snmpwalk command, like: snmpwalk -v2c -c public 127.0.0.1 .1.3.6.1.4.1.2021.53 "print something" from output see oid = iso.3.6.1.4.1.2021.53.3.1.1.9.47.98.105.110.47.98.97.115.104 = "", output of script. i'd pass string "print something", $1 parameter script mentioned above , string (in case "print something") using snmpget command, like: snmpget -v2c -c public 127.0.0.1 iso.3.6.1.4.1.2021.53.3.1.1.9.47.98.105.110.47.98.97.115.104 it example, i'm testing options have running scripts via snmp. because if works i'll write scripts run remotely, have run them variables. does know how it? thank you

mysql - Select last record in each group -

Image
i have table: id group_id name linked_group 1 1 name1 2 1 name2 3 1 name3 4 1 name4 5 2 name5 6 2 name6 3 7 2 name7 8 3 name8 9 3 name9 10 4 name10 11 4 name11 i need retrieve last record in each group linked_group: id group_id name linked_group 4 1 name4 9 3 name9 11 4 name11 how this? p.s. need ignore group_id = 2, because group_id need union group_id = 3 try this select g.id,g.group_id,g.name,g.linked_group grouptable g left join grouptable g2 on (g.group_id = g2.group_id , g.id < g2.id) g2.id null;

PHP mutliple .scss Files to one .css File after change -

i compile multiple .scss files 1 .css file. my code: <?php class sasscompile { private $scssfiletype = ".scss"; private $cssfiletype = ".css"; private $cssfilename = "style"; public $scssfolder = "scss/"; public $cssfolder = "css/"; public $scssphp = "scssphp/scss.inc.php"; public $scssphpcompression = "scss_formatter_compressed"; public function compile($scss_folder, $css_folder, $scssphp, $scss_format) { require $scssphp; $scss_compiler = new scssc(); $scss_compiler->setimportpaths($scss_folder); $scss_compiler->setformatter($scss_format); $filelist = glob($scss_folder . "*" . $this->scssfiletype); foreach ($filelist $file_path) { $file_path_elements = pathinfo($file_path); $file_name = $file_path_elements['filename']; $file_content = file_get_contents($scss_folder . $file_name . $this->scssfiletype); $string_css

titanium - Ti.Media.showCamera() on fullscreen? -

Image
when use ti.media.showcamera() overlay, camera frame fixed @ top remains black stripe @ bottom. need camera's image in full screen, , not fastened @ top can not move in way.. know solution? this code: ti.media.showcamera({ allowediting : false, overlay : $.overlay,//overlayview, showcontrols : false, mediatypes : [ti.media.media_type_photo], autohide : false, transform: ti.ui.create2dmatrix().scale(1) }); so, used work ok in previous tisdks and/or ios sdk targets. titanium uses old method camera apple has been trying rid of. ios 10, apple removed hook titanium using work around this. it reported and, right or wrong, dismissed not titanium problem.( https://jira.appcelerator.org/browse/timob-24036 ) you can use mike fogg's module ( https://github.com/mikefogg/squarecamera ) achieve once had, because uses appropriate foundation classes media work.

c# - Removing navigation properties from a generic list in entity-framework -

firstly object class generated entity framework: public partial class sorular { public int id { get; set; } public string soru { get; set; } public int taslakid { get; set; } public virtual devriyeformtaslak devriyeformtaslak { get; set; } } i getting values this: public list<sorular> getsorular() { return entity.getentity().sorular.orderby(s => s.soru).tolist(); } the part call method: var sorular_list = sorular_model.getsorular(); the thing is, need remove navigation properties. found clear() method couldn't manage use properly. tried remove devriyeformtaslak attribute foreach loop failed again. should ?

excel - VBA: Remotely refresh queries in another workbook -

i working 2 workbooks. inserting data in 1 , other taking part of data via excel query, have open second 1 every time want refresh information, sharing other users. in few words, remotely refresh second workbook when updating main 1 not have continuously open, refresh , close. let's assume both workbooks in same folder in dropbox, example. thanks lot! i have found way, not work in mac os queries not supported (i did not know this). for might help, below code: sub refreshwb() application.screenupdating = false activeworkbook.save dim wb excel.workbook set wb = application.workbooks.open(thisworkbook.path & application.pathseparator & "workbook.xlsx") wb.sheets("sheet 1").range("a1").listobject.querytable.refresh backgroundquery:=false wb.save wb.close application.screenupdating = true end sub

How can I change bucket or prefix when writing to Google Cloud Storage from Dataflow? -

in streaming dataflow pipeline, how can dynamically change bucket or prefix of data write cloud storage? for example, store data text or avro files on gcs, prefix includes processing hour. update: question invalid because there no sink can use in streaming dataflow writes google cloud storage. google cloud dataflow not allow gcs sinks in streaming mode.

c# - ppt and pptx files are corrupted when trying to stream from asp.net website -

i trying stream documents server location asp.net website. document types work expected apart powerpoint ppt , pptx files. when these streamed message "powerpoint found problem content in [filename]" if selected save rather open open doc works ok. my code follows wcf service //get doc server , convert bytearray filestream myfilestream = new filestream(fullpath, filemode.open, fileaccess.read, fileshare.read); byte[] myfilebyte = new byte[(int)myfilestream.length]; myfilestream.read(myfilebyte, 0, (int)myfilestream.length); myfilestream.close(); asp.net web app response.addheader("content-disposition", "attachment; filename=" + filename); response.buffer = true; response.bufferoutput = true; response.binarywrite(getdoc.downloaddata); // [byte array ] response.end(); i have tried using response.flush stops opening. i

sql - How do I resolve an "incorrect syntax near ','"? -

im writing query campaign , whenever try run error saying syntax isn't correct. select opp.* ( select opp.*, row_number() on (partition opp.contact_email_address order opp.status_date desc) row_number opportunity_data opp opp.email_bounced = 'false' , opp.email_unsubscribe = 'false' , opp.first_mkt_medium not in ('partner', 'inbound_outbound') , opp.latest_mkt_medium not in ('partner', 'inbound_outbound') , datediff (day, cast(latest_rfq_submitted_date date), cast(getdate() date)) > 30 , opp.on_cover = 'no' , opp.primary_group in ('market_trader', 'food_stand', 'mobile_food_van', 'caterer') , opp.site = 'simplybusiness' , opp.opportunity_status = ('quote_recieved', 'rfq_submitted', 'policy_expired_not_renewed') ) opp row_number = 1 che

How to register JAVA executable as Windows Service in Windows 10 -

all of solutions found on stackoverflow suggest wrappers register java application windows service. requirement totally different. please don't suggest wrappers purpose. question simple have java executable , want register windows service. phyiscal path service properties unfortunately don't have backup of previous setup installed windows service @ first place. need setup program or that. not necessarily. it difficult advise on precisely need without more information on still have; e.g. application installer, application jar files, wrapper scripts, etc. alternatively, if told application was, maybe give hints on installers, etc. however, can tell registering java.exe or javaw.exe directly windows service will not work . these not executables java application. rather executables java virtual machine run (real) java application. it easy task in case of visual studio. want same support in eclipse or else. well java doesn't work that.

jsp - How to set conditional visibility in html? -

i have following code: <div class="form__group form__group--select" id="choice"> <select name="area" class="selectbox form__element"> <option selected="selected" value="">sparte auswählen</option> <option value="erdgas">erdgas</option> <option value="strom">strom</option> <option value="telekommunikation">telekommunikation</option> <option value="energiedienstleistungen">energiedienstleistungen</option> </select> <div class="form__message"> <div class="form__infotext">

ios - No visible @interface for 'UIButton' declares the selector 'setBackgroundImage:forState:' -

this error happened in afnetworking/uikit+afnetworking/uibutton+afnetworking.m .and when go uibutton.h,find there no method setbackgroundimage should there. i find error happened whenever u use setbackgroundimage. seems not relevant library uibutton *btn = [[uibutton alloc]initwithframe:cgrectmake(self.frame.size.width, 0, 10, 10)]; [btn setbackgroundimage:[uiimage imagenamed:@"something.png"] forstate:uicontrolstatenormal]; code here! can me?thanks there no method signature * setbackgroundimage:forstate:' * use - (void)setbackgroundimageforstate:(uicontrolstate)state withurl:(nsurl *)url; or - (void)setbackgroundimageforstate:(uicontrolstate)state withurl:(nsurl *)url placeholderimage:(nullable uiimage *)placeholderimage;

sql - The type of column "Change_Date" conflicts with the type of other columns specified in the UNPIVOT list -

having problems unpivot , not sure why. understand column types need same , think have sorted. table create table [dbo].[zztmp1]( [project_number] [varchar](50) null, [changed_design_status] [varchar](50) null, [changed_cost] [decimal](38, 4) null, [change_date] [varchar](8) null ) on [primary] script select project_number, columnname, value, change_date ( select project_number, changed_design_status , cast(changed_cost varchar(50)) changed_cost, cast(change_date varchar(50)) change_date zztmp1 ) d unpivot ( value columnname in ( changed_design_status-- ,changed_cost ) ) unpiv; when adding change_cost in error : msg 8167, level 16, state 1, line 15 type of column "changed_cost" conflicts type of other columns specified in unpivot list. if change order , run change_cost works fine. seems issue when have multiple columns, mising. any advice appreciated. thanks i find easier unpivot using cross apply : select z.projec

angular2 - bootstrap-sass compilation error using angular-cli -

i using angular-cli: 1.0.0-beta.19-3 node: v5.11.1 in angular-cli.json file, have set global style file extension .scss. here styles file. angular2/src/styles.scss // default font @import url(https://fonts.googleapis.com/css?family=raleway:300,400,600); // typography $font-family-sans-serif: "raleway", sans-serif; $font-size-base: 14px; $line-height-base: 1.6; $text-color: #636b6f; // import bootstrap @import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap"; errors spits out when try import bootrap-sass modules, gives error associated glyphicon icons. don't know how resolve it. error in ./~/css-loader!./~/postcss-loader!./~/sass-loader!./src/styles.scss module not found: error: can't resolve '../fonts/bootstrap/glyphicons-halflings-regular.eot' in '/var/www/angular/src' @ ./~/css-loader!./~/postcss-loader!./~/sass-loader!./src/styles.scss 6:4253-4315 6:4338-4400 @ ./src/styles.scss @ multi styles error in

javascript - AngularJS + Jquery broken -

i'm new angularjs , jquery student, , made code both languages , totally broke . jquery copy internet, when programming angularjs code, jquery animations gone. my json code creating 3 menu levels, think it's working, jquery not helping me =/ . can me please? <!-- scripts--> <script src="js/lib/jquery-2.1.1.js"></script> <script src="js/lib/bootstrap.min.js"></script> <script src="js/plugins/metismenu/jquery.metismenu.js"></script> <!-- plugin --> <script src="js/lib/inspinia.js"></script> i'm loading correctly scripts... here download code. (800kb) (i didn't make plunk because there lot of code, hope understand me click here thanks support!

sbt published maven file missing artifacts with multiple scopes -

say have project b depends on project a test->test , provided scopes. val b = project( id = "project-b", base = file("myproject"), ).dependson(a % "test->test;provided") the published maven pom file b , however, has test dependency. why provided dependency left out ? update : this actual sbt codes in our project lazy val streaming = project( id = "gearpump-streaming", base = file("streaming"), settings = commonsettings ++ myassemblysettings ++ javadocsettings ++ addartifact(artifact("gearpump-streaming"), sbtassembly.assemblykeys.assembly) ++ seq( assemblymergestrategy in assembly := { case "geardefault.conf" => mergestrategy.last case x => val oldstrategy = (assemblymergestrategy in assembly).value oldstrategy(x) }, librarydependencies ++= seq( "com.goldmansachs" % "gs-collections" % gscollectionsversi

ios - Cannot create NSManagedObject subclass -

Image
i trying learn coredata. created single entity 1 attribute , created it's nsmanagedobject using editor menu. but try build app shown swift compiler error file structure: data.xcdatamodeld: error: you manually generating nsmanagedobject subclass, has been generated xcode. find detailed solutions here .

javascript - How to make the form scroll alongwith the page scroll -

i have mailchimp subscribe newsletter form. want form scroll down alongwith page scroll. right fadein , fadeout when page scrolled want move down when user scrolling page down. this html. <div class="container"> <div class="row"> <div class="pull-right"> <!-- begin mailchimp signup form --> <link href="//cdn-images.mailchimp.com/embedcode/slim-10_7.css" rel="stylesheet" type="text/css"> <form id="subscribe-form" name="mc-embedded-subscribe-form" class="validate"> <p>sign our newsletter</p> <div id="signup_scroll"> <div class="mc-field-group"> <label for="mce-email">email address <span class="asterisk">*</span> </label>

php - Class does not exist laravel 5.3 -

namespace myapp\http\requests; use illuminate\foundation\http\formrequest; class createadmingroup extends formrequest { public function authorize() { return false; } public function rules() { return [ // ]; } } my controller: namespace myapp\http\controllers\administration\resource; use myapp\http\requests\admin\admin\createadmingroup; but error class swapsome\http\requests\admin\admin\createadmingroup not exist why error, request there, shuold good. request in app\http\requests\admin\admin\ folder thank you! change request's namespace to: namespace myapp\http\requests\admin\admin;

c++ - Templatized [] or () operator overload - possible without using type as arg? -

in same way can this... template< typename t > t getvalue( const int index ) const; char c = getvalue< char >( 0 ); ...is possible this: template< typename t > t operator[]( const char* key ) const; char c = getvalue< char >( "some key" ); // *** doesn't compile *** ...or this: template< typename t > t foo::operator()( const char* key ) const; char c = foo< char >( "some key" ); // *** doesn't compile *** the 2 examples above don't compile due < char > , without "can't deduce type" error (i understand why case). the closest can specify 'default value' gets rid of "can't deduce type" error, this: template< typename t > t operator()( const char* key, const t& defaultvalue ) const; char c = foo( "some key", 'x' ); but, isn't want. edit essentially, i'm doing: class collection { ... template< typenam

javascript - Vuejs array push -

Image
im receiving array of objects backend in below format. trying these datas , push javascript array can use them later on based on needs. [ { id: 1, name: "dr. darrin frami iii", email: "gaylord67@example.com", address: "42568 cameron cove fritschborough, ma 86432-0749", }, ] here vuejs code: <script> export default { data(){ return { fakeusers: [], fakeuser: {id: '', name: '', email: ''}, } }, methods:{ }, mounted() { var route = '/get-users'; this.$http.get(route).then((response)=>{ (var = 0; < response.data.length; i++) { this.fakeuser.id = response.data[i].id; this.fakeuser.name = response.data[i].name; this.fakeuser.email = response.data[i].email; this.fakeusers.push(this.fakeuser); }

How to access object with "creative" names in scala? -

for example, given object ~ { def foo = ??? } how access method? neither of work: ~.foo `~`.foo with both compiler complains "illegal start of simple expression". and yes, know shouldn't name classes "~" both standard library , other libraries do, , need work them. added: looking @ sschaef's answer tried $tilde.foo and works. not sure if that's intended or implementation detail of how names translated jvm-identifiers. , whether work in other flavors of scala (e.g. scala.js)? i'll leave open bit see maybe chimes in more extensive answer. the problem seems exist in 2.11: welcome scala 2.11.8 (openjdk 64-bit server vm, java 1.8.0_102). type in expressions evaluation. or try :help. scala> object ~ { def foo = 0 } defined object $tilde scala> ~.foo <console>:1: error: illegal start of simple expression ~.foo ^ in 2.12 works fine: welcome scala 2.12.0 (openjdk 64-bit server vm, java 1.8.0_102). t

How to copy and paste dynamically created folders to server using VBScript -

i'm executing auto tcs & generating report folder each tc. after generated each report floder, need copy & paste report server. i can copy reports after completion of tcs, want copy & paste each new report after completion of each tc. how can achieve using vbscript? dim ofso dim rfol, lfol set ofso = wscript.createobject("scripting.filesystemobject") rfol = "d:\test" lfol = "\reports\*.*" if ofso.folderexists(rfol) wscript.quit else msgbox rfol & " not exist. press ok copy." ofso.createfolder rfol ofso.copyfolder lfol, rfol, true end if

Howto select and edit TabelCell in TableView with mouseclick on a MenuItem of ContextMenu - JavaFX -

is there possiblity select & edit tablecell within tableview after 1 has mouse clicked or key pressed menuitem of contextmenu ? default textfieldtablecell implementation supports pressing enter key while tablerow has focus or directly clicking respective cell select & edit content. if understand question correctly, yes can this. here's example lets edit cells in second column using context menu: import javafx.application.application; import javafx.beans.property.simplestringproperty; import javafx.collections.fxcollections; import javafx.collections.observablelist; import javafx.event.eventhandler; import javafx.scene.scene; import javafx.scene.control.contextmenu; import javafx.scene.control.menuitem; import javafx.scene.control.tablecolumn; import javafx.scene.control.tablecolumn.celleditevent; import javafx.scene.control.tableview; import javafx.scene.control.cell.textfieldtablecell; import javafx.stage.stage; public class editabletablemcve extends a

c# - WPF Custom Control in separate namesapce -

i try make visual c# app, using usercontrol (wpf). default, vs community 2015 c# generates usercontrol in same namespace main program. it's built correctly. i'd separate in it's own namespace possible future reuse. change auto-generated code have usercontrol in separate namespace. here code usercontrol <usercontrol x:class="nstabi2cmemrw.tabi2cmemrw" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:nstabi2cmemrw" mc:ignorable="d" d:designheight="300" d:designwidth="500"> <grid> <textbox x:name="addrh"/> <label x:name="addrh_label

metadata - Meta data location of modelling-views -

i'd read meta data our calculation views. (in order best practice checks) the check want make include: view graphical calculation view view-properties: default client: cross client execute in sql engine filter on columns (show if column names appear) read commends (we have rule states each calculation view must have commend in semantics, explains purpose of view) that's possible querying _sys_repo tables. gave full example answer here https://answers.sap.com/questions/58460/meta-data-sorage-location-of-modelling-views.html?childtoview=59915#answer-59915

javascript - What is /i in navigator.userAgent.match -

i'm curious /i in: var ismobile = { android: function() { return navigator.useragent.match(/android/i); }, blackberry: function() { return navigator.useragent.match(/blackberry/i); }, ios: function() { return navigator.useragent.match(/iphone|ipad|ipod/i); }, opera: function() { return navigator.useragent.match(/opera mini/i); }, windows: function() { return navigator.useragent.match(/iemobile/i); }, any: function() { return (ismobile.android() || ismobile.blackberry() || ismobile.ios() || ismobile.opera() || ismobile.windows()); }}; } source: https://www.sitepoint.com/navigator-useragent-mobiles-including-ipad/ could tell me /i exactly? i've searched lot of websites things navigator.useragent.match none explain /i is, /g /heregoesregex/flags literal regular expression in many languages (including javascript). after last slash can specify flags regular express

jquery - Asp.net/C# Get repeater row data through checkbox -

hello have repeater present data table checkbox each row, want show checked rows data when button clicked. .aspx code: <asp:repeater id="rptitems" runat="server"> <headertemplate> <table class="table table-bordered table-hover table-responsive table-striped table-condensed"> <tr> <th> </th> <th>goods desc</th> <th>balance units</th> <th>exit units</th> </tr> </headertemplate> <itemtemplate> <tr> <td><asp:checkbox id="cbitem" runat="server" /></td> <td><%#eval("itemdesc") %></td> <td><%#eval("invoicbalanceunits") %></td>

Regex Matches any new line within a comment -

is there way search \n within comment "" in notepad++ , replace there no spaces within comments? for example: this example "hello, separated. [together]" finish i can change first " < , second " > within <> or "" should not space: i have following result: this example "hello, separated. [together]" finish thanks, here way job: find what: [^"]*(?:\g|")\k([^"\r\n]+)\r+ replace with: $1 where: (?:\g|") : end of previous successful match or double quote \k : reset operator discards previous match [^"\r\n]+ : 1 or more character not " , \r or \n \r+ : 1 or more line break

ios - Why Swift crash report doesn't show the exception name? -

i'm checking crash report on crashlytics. for crashes there clear message like: *** -[__nsarrayi objectatindex:]: index 13 beyond bounds [0 .. 12] but other crashes have function name , message: crashed: com.apple.main-thread exc_breakpoint 0x00000001001f3938 is there can increase verbosity of crash log?

objective c - How can I get info about iPhone/iPad battery in iOS 10? -

how can battery cycles count , wear rate or @ least max capacity, app accepted? this how battery level [uidevice currentdevice].batterylevel this how battery state uidevicebatterystate currentstate = [uidevice currentdevice].batterystate; this enum of uidevicebatterystate typedef ns_enum(nsinteger, uidevicebatterystate) { uidevicebatterystateunknown, uidevicebatterystateunplugged, // on battery, discharging uidevicebatterystatecharging, // plugged in, less 100% uidevicebatterystatefull, // plugged in, @ 100% } __tvos_prohibited;

xml - Counting in XSL:FO -

Image
i have 2 expressions, , want put them in same table , count them have this: 1. replacement 1 2. replacement 2 3. replacement 3 4. repair 1 5. repair 2 6. repair 3 but i'm getting output: 1. replacement 1 2. replacement 2 3. replacement 3 1. repair 1 2. repair 2 3. repair 3 xml <selectedcalculation> <classxml> <calcdata> <rundesc>normalcalc</rundesc> <spareparts> <partdtls> <partdtl> <reptyp>e</reptyp> <gid>0281</gid> <partdesc>replacement 1</partdesc> <partno>8w0 807 065 gru</partno> <price cur="hrk">+3002.92</price> </partdtl> <partdtl> <reptyp>e</reptyp>