Posts

Showing posts from January, 2011

javascript - JQuery Virtual Keyboard and Datatables.js search filter box not updating on user input -

i have datatables.js application works allongside jquery virtual keyboard. when using virtual keyboard enter information generated search box, filtered content not work. meaning if have column names , search name(e.g airi) virtual keyboard, information inside datatables not updated. if remove it works. the code using datatable following: $(document).ready(function(){ $('.selectpicker').selectpicker(); $('#example').datatable(); // example virtual keyboard on datatable search // shows keyboard content not filtered function virtualksearch() { $('input[type="search"]').keyboard({ layout: 'qwerty', draggable: true, position: { of : $(window), : 'center bottom', @ : 'center bottom', at2: 'center bottom' }, change: function(e, keyboard, el) {

In SQL SERVER, how to see multiple column values in new line -

i have data present in sql server following format sa path_information ------ ------ 1 h drive - h:\baa\c,h drive - h:\caa\d, des- f:\detail ------- ------------- 2 oracle: h:\baa\c, excel: h:\caa\d but, want in sa path_information ---------------- 1 h drive - h:\baa\c h drive - h:\caa\d des - f:\detail ------- ----------- 2 oracle: h:\baa\c excel: h:\caa\d with every path information in on new line of same row. so, can please tell how that? thanks you store line breaks , carriage returns in data, though won't see reflected in ssms. i use both results across many applications, you'd want stick char(13) + char(10) want line break. in case, if commas divider, can replace commas aforementioned 2-character string. you can store such, or query way display purposes. documentation using char: https://docs.microsoft.com

asset pipeline - Rails bootstrap gem import vs require -

i wanted use in rails project bootstrap framework. used github repository/instruction it: https://github.com/twbs/bootstrap-rubygem . in instruction underlined need change application.css extension css.scss , use import statements (delete all: //= require). how can include in application other css files? require type //= require tree . in case have no idea do. you can still use require_tree . css files included way not compiled sass , not have access sass variables , mixins defined in other files. the recommended solution create 1 single file (say main.scss) , import files require access site-wide sass resources (e.g. bootstrap variables , mixins). import 1 file in application.scss. , can leave require tree . there pick rest of files.

osx - Got permission denied on steamcmd.sh on Mac -

i try upload mac app steam using steamcmd.sh, when try run script, got error: ./steamcmd.sh: line 32: /users/fabioguimaraes/temp/steamworks_sdk/tools/contentbuilder/builder_osx/osx32/steamcmd: permission denied i try run chmod +x steamcmd.sh change file, still got same error. how can correct that?

rstudio - Data frame printing in R Markdown : how to hide column type? -

Image
when print data frame in r markdown (html_document), following table (see image link below) following code : title: "motor trend car road tests" output: html_document: df_print: paged --- ```{r} mtcars ``` is there way hide column types corresponding yellow highligting in image? one option - use dt package. --- title: "motor trend car road tests" output: html_document: df_print: paged --- ```{r} dt::datatable(mtcars) ```

reactjs - Return infinite data from the dribbble API -

i'm making app using data returned dribbble api: http://developer.dribbble.com/v1/ , how return infinite dribbble shots? each shot amount (for example 10 shots) appear in 2 , 2 seconds? know isn't elegant or userful want start , more sophisticated in future. i'm making app using react.js import _ 'lodash'; import react, { component } 'react'; import reactdom 'react-dom'; import dribbble './dribbble'; export default class dribbbles extends react.component { constructor(props) { super(props); this.state = { work: [] }; } componentdidmount() { this.shotlist(); } shotlist() { return $.getjson('https://api.dribbble.com/v1/shots?per_page=3&access_token=<token>&callback=?') .then((resp) => { this.setstate({ work: resp.data.reverse() }); }); } render() { const works = this.state.work.map((val, i) => { return <dribbble dados={val} key={i} /> }); return <ul>{works}

Open PDF File and Perform Text Search Using excel vba -

i need develop simple excel vba application data validation. have excel files employee information , need validate information against source document ( pdf file(s)). information in excel grouped employee name. is possible write vba script open specified pdf file, allow user perform search of employee name pdf jumps appropriate employee page? (each employee has individual page in pdf document.) once on employee page user review data, make necessary edits excel file , search next employee. i believe can use: sub navigatepdf() thisworkbook.followhyperlink "c:\user\target.pdf" end sub to open pdf file, don't know how issue search excel vba once have file open. can offer suggestions or point me useful resoucres. some additional research yielded application written christos samaras. tool uses excel vba open specified pdf , highlight provided search term. possibly downside requirement adobe pdf pro - code not work acrobat reader. here link ,

swift - Customizing iOS UISlider -

Image
i'm trying customise of uislider in ios. my problem concerns trackimages, i've tried use: let insets = uiedgeinsets(top: 0, left: 14, bottom: 0, right: 14) let trackleftimage = uiimage(named: "myimage") let trackleftresizable = trackleftimage.resizableimage(withcapinsets: insets) slider.setminimumtrackimage(trackleftresizable, for: .normal) but wanted image recreate instead of resize. for example when use image i on 1 side: is there way have image recreate , replace self in order form nice pattern instead of resizing add half of image @ end?

asp.net mvc - What is the proper way to scope OData methods to single controller? -

i have webapi 2 controllers working side side single odata controller in same project. trying set needed routing configuration: all request /api should mapped odatacontroller all other requests should directed ordinary web api controllers when try map /api route odata contoller this: class webapiconfig { public static void register(httpconfiguration configuration) { configuration.routes.maphttproute("api default", "api/{action}/{id}", new { controller = "apiodata", id = routeparameter.optional }); odatamodelbuilder builder = new odataconventionmodelbuilder(); builder.entityset<organization>("organizations"); configuration.routes.mapodataserviceroute( routename: "odataroute", routeprefix: "api", model: builder.getedmmodel()); } } all method calls work fine both web api , odata controller, such requests /api/$metadata not work. when remove "a

jquery - update shopping cart using ajax and laravel -

im using package crinsane/laravelshoppingcart and want update cart items ajax, im using laravel 5.4 , jquery. cant update cart ajax. if use without jquery have pass id of product this: /cart/add-item/{id} this code: the route: web.php route::get('/cart/add-item/{id}', 'cartcontroller@additem')->name('cart.additem'); the controller: cartcontroller.php public function additem($id){ $productos = db::connection('oracle_db')->select("select id,description, price inv.pwv_articulos id = '$id'"); foreach($products $product){ $products_id = $product->id; $products_descripcion = $product->description; $products_price = $product->precio; } cart::add($products_id, $products_description , 1 , $products_price, ['size'=> 'medium']); return back(); } my js jquery: formdata = $('#color_black').serializearray(); var value_

apache - Varnish triggering 503 without timeout -

disclaimer : in moment migrating servers windows linux, see unusual architecture here. i have following communication between our backend servers: client -> apache httpd (decrypts ssl - running windows server) -> varnish cache (forward proxy , http cache - running ubuntu 16) -> apache tomcat (application server - running windows server). we have 200 users active @ peak time , ajax call verify user connection every second. from time time, our clients receives 503 (backend fetch failed - guru meditation) ajax request. first thought kind of application server slowdown increase timeouts follows: backend xxx { .host = "<%= $host_api %>"; .port = "<%= $host_port %>"; .first_byte_timeout = 1200s; .between_bytes_timeout = 1200s; .connect_timeout = 10s; } but problem continued happen. investigated modifying apache access log log time request spent on backend: the configuration was: logformat "%h %l %u %t \&qu

ios - Hide and Show TableViewCells properly? -

i in process of making table view controller app , has different headers. using custom header view has button inside it. button used show rows section. save section number of each header in tag property of button. i have looked @ more 20 posts set height 0 , hide cell. ridiculous auto layout produce tons of errors , make app lag lot. what did make 2 different cells. 1 used show data , other 1 empty cell height of 0. then in code have variable called opensection , holds current open section number. so when click on button current section closes , new 1 opens. there lots , lots of issues. instance if scroll cells keep changing. next problem fact if open last header, cannot scroll first header weird. this function when button tapped func buttontapped(_ sender: uibutton) { dispatchqueue.main.async { self.opensection = sender.tag self.tableview.reloaddata() self.tableview.beginupdates() self.tableview.endupdates() } print("

c++ - Class won't work with .hpp file included in main, but does with .cpp file include in main -

this question has answer here: what undefined reference/unresolved external symbol error , how fix it? 27 answers i'm having issue classes in ide tells me have undefined reference constructor if include .hpp file in main, not if include .cpp file in main instead. problem in class , across various sites, should .h or .hpp file included in main. here files: student.hpp #ifndef student_hpp #define student_hpp class student { private: std::string lastname; double gpa; public: student(); student(std::string lastname, double gpa); void setlastname(std::string lastname); std::string getlastname(); void setgpa(double gpa); double getgpa(); }; #endif //student_hpp student.cpp #include <iostream> #include "student.hpp" using namespace std; student::student() { lastname = "unknown"; gpa = 0.0;

autolayout - Constraints in iOS development -

is right choice start developing xcode without add constraints , developing unique device (for example iphone 7) running own simulator; , when application finished adding constraints other devices? depends want do: it right choice when want test idea or test network layer of app , don't care ui. it bad choice if writing production code delivered on appstore , plan fix later. "fix later" might annoying task , don't want create more annoying work yourself.

python - Pythonic asyncio communication with unreliable servers -

is there standard pattern using asyncio poll intermittent servers? take following example: client reads every second unreliable tcp server. without error handling, async/await notation looks great: class basictcpclient(object): """tcp client without error handling.""" def __init__(self, ip, port): self.ip = ip self.port = port async def connect(self): reader, writer = await asyncio.open_connection(self.ip, self.port) self.connection = {'reader': reader, 'writer': writer} async def get(self, request): self.connection['writer'].write(request.encode()) return await self.connection['reader'].readuntil(b'\n') async def read(): client = basictcpclient('ip', 8000) await client.connect() while true: print(await client.get('request')) await asyncio.sleep(1) ioloop = asyncio.get_event_loop() try:

url rewriting - Directories or GET -

i have seen multiple sites using each of these variations, directory based stackoverflow does: https://stackoverflow.com/questions/ask opposed using https://stackoverflow.com/?p=ask i realise puts lot of strain on single file , can clutter workspace wanted ask if there real benefits each , importantly if there time , place use each respectively. 1 outweigh other?

ms app analytics - Application Insights Extract Nested CustomDimensions -

Image
i have data in application insights analytics has dynamic object property of custom dimensions. example: | timestamp | name | customdimensions | etc | |-------------------------|---------|----------------------------------|-----| | 2017-09-11t19:56:20.000 | spinner | { | ... | mycustomdimension: "hi" properties: context: "abc" usermessage: "some other" } does make sense? key/value pair inside of customdimensions. i'm trying bring context property proper column in results. expected : | timestamp | name | customdimensions | context| etc | |-------------------------|---------|----------------------------------|--------|-----| | 2017-09-11t19

php - symfony Invalid credentials memory provider -

im trying login user defined in memory section got error invalid credentials, here security.yml security: encoders: symfony\component\security\core\user\user: plaintext # https://symfony.com/doc/current/security.html#b-configuring-how-users-are-loaded providers: in_memory: memory: users: user: password: 1234 roles: 'role_user' root: password: 1234 roles: 'role_admin' firewalls: dev: pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false main: pattern: ^/ anonymous: true form_login: login_path: login check_path: login logout: path: logout target: homepage access_control: - { path: ^/login, roles: is_authenticated_anonymously } -

vue.js - Vue2: Custom Directive Like v-if -

i'm trying create custom directive v-if render if data being passed element isn't empty. example: <div v-if="!_.isempty(data.employer)">{{ data.employer.name }}</div> this render if data.employer isn't empty won't throw reference error. i'm trying create directive simplify v-notempty="data.employer" , run logic inside directive issue it's doing hook on custom directive after element being rendered throws reference error employer undefined. is there way custom directive work v-if runs logic before element created. had far: vue.directive('notempty', (el, binding) => { if (_.isempty(binding.value)) { el.style.display = 'none'; } else { el.style.display = 'initial'; } }); you need write directive code inside bind hook function. ( reference ) bind : called once, when directive first bound element. can one-time setup work. so code should be: vue.directive(&

AngularJS passing data back from mdDialog to parent controller -

i have little angularjs application making use of $mddialog pop html page has 1 text input on it i want able return value user types input parent scope. i'm unsure how this. this have far $scope.shownewteamdialog = function () { $mddialog.show({ controller: newteamdialogcontroller, templateurl: 'newteam.html', locals: { newteamname: $scope.newteamname }, parent: angular.element(document.body) }) }; function newteamdialogcontroller($scope, $mddialog, newteamname) { $scope.closedialog = function(newteamname) { // before closing want set $scope.newteamname whatever user typed in text on dialog pop $mddialog.hide(); } } any appreciated while wouldn't right before dialog closed, using .then part of dialog.show promise. here codepen using 1 of ngmaterial examples modify variable on close: https://codepen.io/mckenzielong/pen/vebrge . basically, this: $scope.shownewteamdialog = f

javascript - Can't signOut of Google OAuth2 -

Image
i not able use google signout() sign me out of oauth session signed into. as example, have pasted below code taken directly google quick start site... https://developers.google.com/google-apps/calendar/quickstart/js i have saved 1.htm file on website , attempting drive google api. when use oauth 2.0 client id (not shown in attached code) api console, able login , see calendar events. however, when sign out button clicked, don't logged out. right after clicking sign out, following code running sure... but then, doesn't sign me out. running console, see still thinks logged in... i listening changes status on signin our signout... but callback never hit signout()... finally, if try entire thing developer console... shows gapi.auth2 says logged in manual sign out command shows gapi.auth2 says still logged in how can code modified make signout() work? <!doctype html> <html> <head> <title>google calendar api quickstart<

javascript - Parallel Coordinates Download Plot Callback -

i trying implement download plot feature parallel coordinates. have setup using jquery handle on click , followed example download plot. getting failed - network error on chrome. i assume has callback have idea can causing this? $('#download-image').click(function(e){ e.preventdefault(); var callback = function (canvas) { // download image var download = document.createelement("a"); download.href = canvas.todataurl("image/png"); download.download = "parallel-coordinate.png"; download.click() }; parcoords.mergeparcoords(callback); });

jquery - Bootstrap datepicker options not working -

i have form field date , i'm using datepicker that. form field: <div class=form-group> <div class="input-group date" data-provide="datepicker"> <input class="form-control" id="data" name="data" placeholder="vvvv/mm/dd" type="text" /> <div class="input-group-addon"> <span class="glyphicon glyphicon-calendar"></span> </div> </div> </div> these options have provided not being applied: $('#data').datepicker({ format: "yyyy/mm/dd", todayhighlight: true, autoclose: true, clearbtn: true }); this jquery code inside $(document).ready() function in external javascript file, included right before closing </body> tag. in jquery targeting id of <input/> element. if target input's parent element, bootstrap datepicker work. try running code snippet or check out codep

javascript - Access DOM when using hyper.Component -

when using hyperhtmlelement it's possible access contents of component using this.children or this.queryselector() , since it's element. but how achieve similar behavior when using hyper.component ? the hypothetical example have in mind react docs: https://facebook.github.io/react/docs/refs-and-the-dom.html - i'd focus specific node inside dom. i have codepen sandbox i'm trying solve this: https://codepen.io/asapach/pen/ogvdbd?editors=0010 the idea render() returns same node every time, save before returning , access later this.node : render() { this.node = this.html` <div> <input type="text" /> <input type="button" value="focus text input" onclick=${this} /> </div> `; return this.node; } but doesn't clean me. there better way this? the handleevent pattern there you. idea behind pattern never need retain dom references when behavior event-driven, 'cause

arrays - How can I get a solution from this Java Program to solve algorithm? -

for(int=0; i<1,000,000; i++) { if(data[i]< 0) data[i]= data[i] * 2; } hello everyone, i know possible calculate absolute speed of algorithm below if time takes execute memory access 100 nanoseconds , other operations (arithmetic, register accesses, etc.) take 10 nanoseconds? pretty sure problem can used calculate absolute speed. know have 1 of variables ta= 100 nanoseconds, right? rest of missing variables found through lines of code have provided after compile in java program? compiled , ran it, doesn't tell need solve problem. suggestions? here formula using calculate absolute speed of algorithm: t=tna x nna + ta x na; tna= time execute memory nonaccess instruction; nna= number of memory nonaccess machine language instructions executed; ta= time execute memory access instruction; na= number of memory access machine language instructions executed; here code compile , run see if give of missing variables need solve problem. @dorakta if

c# - certcontext is an invalid handle -

i'm trying install certificate trusted root local machine. this have far private void installcertificate() { x509certificate2 certificate = new x509certificate2(); string certfile = environment.currentdirectory + "\\resources\\cert.crt"; x509store store = new x509store(storename.root, storelocation.localmachine); store.open(openflags.readwrite); store.add(certificate); store.close(); i'm getting following error "certcontext invalid handle" , wondering if can shed light. thanks x509certificate2 certificate = new x509certificate2(); string certfile = environment.currentdirectory + "\\resources\\cert.crt"; one presumes meant load certfile @ point: string certfile = environment.currentdirectory + "\\resources\\cert.crt"; x509certificate2 certificate = new x509certificate2(certfile); as stands, have managed object represents lack of having certific

c - I am trying to implement dijkstra's algorithm for a class -

i supposed 0-3-6-5 output cost. -1-0-3-1 output of previous array. , 1-1-1-1 visit array. i getting 0-3-7-5 output in cost , -1-0-1-1 previous. please if can. i have tried see 7 comes when should 6 , not figuring out. first time have coded in c language might seem kind of sloppy. #include <stdlib.h> #include <stdio.h> #include <math.h> #define infinity 999 int main (void){ int dij[4][4] = {{0,3,8,6}, {3,0,4,2}, {8,4,0,1}, {6,2,1,0}}; int visit[4]; int cost[4]; int previous[4]; //filling visit, cost, previous arrays for(int j=0; j<4; j++){ visit[j] = 0; cost[j] = infinity; previous[j] = -1; }//adding values arrays //node on cost[0] = 0; //first position in cost array set 0 int counter = 0; //counter while loop int currentrow = 0; //checks rows holding th smallest value in dij array while(counter < 4){ int min = infinity; /

(Python 3): Scrapy MongoDB pipeline not working -

i attempting connect mongodb scrappy pipeline via pymongo in order create new database , populate have scraped, running weird issue. followed basic tutorials , set 2 command lines, 1 run scrapy in , other run mongod. unfortunately when run scrapy code after running mongod, mongod not appear pick on scrapy pipeline trying set , maintains 'waiting connections on port 27107' notice. in command line 1 (scrapy) set directory documents/pyprojects/twitterbot/krugman in command line 2 (mongod) set documents/pyprojects/twitterbot the scripts using follows: krugman/krugman/spiders/krugspider.py (pulls paul krugman blog entries): from scrapy import http scrapy.selector import selector scrapy.spiders import crawlspider import scrapy import pymongo import json krugman.items import blogpost class krugspider(crawlspider): name = 'krugbot' start_url = ['https://krugman.blogs.nytimes.com'] def __init__(self): self.url = 'https://krugman.blo

javascript - Error save data google place autocomplete Angular 2 -

error when try save data using google place autocomplete. error: uncaught error: cannot assign reference or variable! </div><form #formendereco="ngform" (ngsubmit)="onsubmit()"> <select class="form-control" [(ngmodel)]="options.componentrestrictions.country" name="options.componentrestrictions.country" > <option *ngfor="let country of countrycodes" [value]="country.code">{{country.name}}</option> </select> <table id="address"> <tr> <td class="label">street</td> <td class="widefield" colspan="2"><input class="field" id="route" #street=ngmodel [(ngmodel)] = "address.street" name="street"></td> </tr> </table> <input type="submit" value="{{titulo}}" class=&quo

javascript - gulp webserver / livereload firefox browser -

gulp.task('webserver', function() { gulp.src('builds/sassessentials/') .pipe(webserver({ livereload: true, open: true })); }); i have gulp snippet here. is there way have open firefox instead of chrome? (note: system default browser chrome) i not find documentation on in gulp webserver or gulp livereload either. on atom.io there's package called live-reload lets specify browser want use. hoping gulp had equivalent

r - Incorrect Legend Ordering with scale_color_grey() -

i doing monte carlo simulation, in have display density of coefficient estimates simulations different sample sizes on same plot. when using scale_color_grey . have put coefficient estimates in same dataframe, sample size factor. if query factor levels() , in correct order (from smallest highest sample size). however, following code gives scale in order correct in legend, color moves light grey darker grey in seemingly random order montecarlo <- function(n, nsims, nsamp){ set.seed(8675309) coef.mc <- vector() for(i in 1:nsims){ access <- rnorm(n, 0, 1) health <- rnorm(n, 0, 1) doctorpop <- (access*1) + rnorm(n, 0, 1) sick <- (health*-0.4) + rnorm(n, 0, 1) insurance <- (access*1) + (health*1) + rnorm(n, 0, 1) healthcare <- (insurance*1) + (doctorpop*1) + (sick*1) + rnorm(n, 0, 1) data <- as.data.frame(cbind(healthcare, insurance, sick, doctorpop)) sample.data <- data[sample(nrow(data), nsamp), ]

facebook - Firebase - getRedirectResult not async with signInWithRedirect.? -

i`m using create-react-app. signinwithredirect response not async getredirect result, reckon because when loginwithfacebook button clicked first time, result null while second time result object required. , after couple of clicks, page redirected not intended.i using in mobile signinwithpopup not used. handlefacebooklogin = event => { event.preventdefault(); auth.signinwithredirect(fb).then(result => console.log(result)); auth .getredirectresult() .then(result => { console.log(result); if (result.credential) { let accesstoken = result.credential.accesstoken; let provider = result.credential.providerid; let email = result.user.email; console.log(accesstoken, provider, email); axios({ method: 'post', url: url, headers: { accept: 'application/json', 'content-type': 'application/json' }, data: { email, accesstoken,

python - IPython notebook doubles up the qqplot -

i tested statsmodels.api.qqplot function in ipython notebook (jupyter) running python 3.6, , got 2 identical plots in column (i asked one). going on? import statsmodels.api sm test = np.random.normal(0,1, 1000) sm.qqplot(test, line='45')

python - Keras LSTM is not learning -

i'm trying understand how keras' lstm model works took udemy course , teacher built model lstm predict google stock prices. model works , here is: # part 1 - data preprocessing # importing libraries import numpy np import matplotlib.pyplot plt import pandas pd # importing training set training_set = pd.read_csv('google_stock_price_train.csv') training_set = training_set.iloc[:,1:2].values # feature scaling sklearn.preprocessing import minmaxscaler sc = minmaxscaler() training_set = sc.fit_transform(training_set) # getting inputs , ouputs x_train = training_set[0:1257] y_train = training_set[1:1258] # reshaping x_train = np.reshape(x_train, (1257, 1, 1)) # part 2 - building rnn # importing keras libraries , packages keras.models import sequential keras.layers import dense keras.layers import lstm # initialising rnn regressor = sequential() # adding input layer , lstm layer regressor.add(lstm(units=4, activation = 'sigmoid', input_shape = (none, 1)))

vb.net 2010 - Arithmetic Operations Resulted in an Overflow -

i have vb.net application copies text file windows ce device via active sync. however, when doing throws exception stating arithmetic operations resulted in overflow on specific workstation running windows 7 64 bit on other machine runs seamlessly. can me resolve exception? here code: if m_rapi.connected = true dim dirmasterfile string = application.startuppath & "\masterfile.txt" try if file.exists(dirmasterfile) m_rapi.copyfiletodevice(dirmasterfile, "\storage card\testfolder\masterfile.txt", true) mmas = "item masterfile uploaded" else mmas = "no item masterfile found" end if catch ex exception msgbox(ex.tostring, vbcritical + vbokonly, "error") exit sub end try end if

Find all occurences of many words in large body of source code -

the body of source code 500k lines of c# , 50k lines of xml. need find occurrences of each of 30k words. one-time effort. what's way efficiently? i'm expecting answer suggests tools, not algorithms. there tokenizer index symbols , literals in source, , support indexed lookup?

java - log4J is Not Writing to Specific Log File in Spring Boot Microservice -

am trying use log4j write local log file in filesystem. actually used exact properties file different project , changed name of top level directory match app's name. different project writes logs.log file doesn't print content @ all. both projects use same version of log4j. pom.xml <dependency> <groupid>log4j</groupid> <artifactid>log4j</artifactid> <version>1.2.17</version> </dependency> on unix based macos, cd'ed /var/log/ , did following: sudo mkdir myapp chmod 777 myapp have inside myapp, following setup on place: if (log.isdebugenabled() { log.debug("print something"); } myapp/src/main/resources/log4j.properties: log4j.rootcategory=debug, rf log4j.category.your.category.name=debug log4j.appender.stdout=org.apache.log4j.consoleappender log4j.appender.stdout.layout=org.apache.log4j.patternlayout log4j.appender.stdout.layout.conversionpattern=%-5p [%f]: %m [%d{iso8601}]%n log4j.

html - is there a way to center align this span element without affecting how the element renders? -

Image
i'm rendering rating stars using this , need center elements of html page, including stars. page this: problem is, when use <center> or <style="text-align: center;"> stars end looking this: code: <center> <span class="stars">4</span> </center> result: is there way center span class without affecting how renders? tried using margin-left/right pretty bad when change size of browser/use on phone. what is: what want: use margin: 0 auto; . center parent div.. if want understand more margin: 0 auto; try link .

ios - Image Upload: Swift 3 to PHP using alamofire - How would you include an image in the code I provided? -

i know has been asked looking specific answer fit code have. appreciated. have been stuck on months. i have register form inside tableview cell textfields , profile image user can select. using alamofire , php backend. php set receive data , image. able select image , able submit form , pass data through. problem having have no idea how include image when submitted. code below. there no errors btw. select image - works fine @ibaction func image(_ sender: uibutton) { let cell = sender.superview?.superview as! tableviewcell func imagepickercontroller(_ picker: uiimagepickercontroller, didfinishpickingmediawithinfo info: [string: anyobject]) { cell.profileimage.image = info[uiimagepickercontrolleroriginalimage] as! uiimage picker.dismiss(animated: true, completion: nil) } func imagepickercontrollerdidcancel(_ picker: uiimagepickercontroller) { picker.dismiss(animated: true, completion: nil) } let optionmenu = uialertcontroller(t

customization - Wordpress & child themes - strategies to find out which .php to override? -

starting basic wordpress bootstrap themes i'd modify width posts , post links. more get-to-know-wp heavy duty theme creation - interested in how apply minor customizations across different themes. know each theme can kinda pick php files wants provide, know works in theme won't work in theme b. i've done once 1 theme, other theme doesn't have same php file names. for example, know make widget area narrower posts, want override sidebar.php : <!-- <div id="secondary" class="widget-area col-md-4" role="complementary"> --> <div id="secondary" class="widget-area col-lg-2" role="complementary"> and modifying index.php makes left-side wider: <!-- <section id="primary" class="content-area col-md-8"> --> <section id="primary" class="content-area col-lg-10"> <div class="tmarker">index.php</div> <!-- a

About Timer and Timer Task in Java -

let's have running timer scheduled timertask. if call timer.cancel() kill of variables in timertask or have wait gc? also, can reassign new task after calling .cancel() timer.cancel(); timer = new timer(); messagetimer = new messagetask(); timer.schedule(messagetimer, 1000, 1000); or there more suitable way replace timer task in original timer object, or i'm not thinking of? thanks -t in java, memory only reclaimed via gc, developer, variables useless (and ready garbage collection) once have no more references them. in example, creating new timer reassigning =. if there no more references, old 1 garbage collected.

How to Insert data using lookup CRM 365 through Plugin C# -

i have lookup " new_lookuptransactionheader " in entity " new_trialxrmservicetoolkit ". lookup linked " new_transactionheader " entity. how can insert data using c# crm plugin? mycode: public void insertdatausinglookup(xrmservicecontext xrm, entity entitiy, itracingservice tracer) { new_trialxrmservicetoolkit trial = new new_trialxrmservicetoolkit(); trial.new_name = "testplugin"; trial.new_lookuptransactionheader = null; //this don't know how value new_lookuptransactionheader trial.new_notes = "this test plugin using c#"; xrm.addobject(trial); xrm.savechanges(); } i updated mycode , solve: public void insertdatausinglookup(xrmservicecontext xrm, entity entitiy, itracingservice tracer) { new_trialxrmservicetoolkit trial = new new_trialxrmservicetoolkit(); trial.new_name = "testplugin"; trial.new_lookuptransactionheader = new entityreference("new_transaction

ios - PFQuery FindObjectsInBackground Returns 0 -

in uiviewcontroller trying query parse server, keep getting return of 0 it, though know 100% class have objects in it. thoughts? pfquery *query = [pfquery querywithclassname:@"general"]; int i; (i = 0; < [follows count]; i++) { [query wherekey:@"session" containedin:follows]; } query.cachepolicy = kpfcachepolicycachethennetwork; [query orderbydescending:@"createdat"]; [query findobjectsinbackgroundwithblock:^(nsarray *objects, nserror *error) { // never gets here... nslog(@"objects%@", objects); if (!error) { nslog(@"successfully retrieved %lu objects.", (unsigned long)objects.count); (pfobject *object in objects) { nslog(@"%@", object.objectid); } // [self gotomain]; } else { nslog(@"error: %@ %@", error, [error userinfo]); } }]; it tells me there no error retrieved 0 objects in console. as other suggested, first simplest query: p

c - why does my netpay display no answer? -

i writing code payroll check. function asks user hours worked , hourly pay. function accepts hours , rate arguments , calculates , returns grosspay. send grosspay function calculate , return payrolltax(.22). call function accept grosspay , taxes arguments , return netpay. last send data function display values (totalhours, hourlyrate, grosspay, tax, , netpay). netpay displaying me 0 , tax displaying wrong answer. can tell me went wrong? /* payroll check */ #include <stdio.h> float askhoursworked(); float askhourlyrate(); float calculategrosspay(float hours,float rate); float calculatepayrolltax(float grosspay); float calculatenetpay(float grosspay,float tax); float displayallvalues(float ,float ,float,float ,float ); int main() { float hours; float rate; float grosspay; float tax; float netpay; float values; hours=askhoursworked(); rate= askhourlyrate(); tax= calculatepayrolltax( grosspay); netpay= calculaten

angular2 template - Create Dynamic Modal Angular 4 -

Image
i have list of elements service, need send name , other properties modal onclick event every element, have code. onclick of item, pass items information showdialog method. in dialog display information passed follows: <h2>{{this.profileselected}}</h2> <p (click)="showdialog(item)"></p> in component create member variable profileselected store item clicked follows: showdialog(item){ this.profileselected = item; this.display=true; }

ms access - How to concatenate three fields in table into one table? -

i concatenate 3 fields in ms access table 1 field using vba. how can this? i have tried using query concatenate , works, concatenated , saved in table instead. my 3 fields want concatenate 1 field are: companycode,yearcode , po number. currently table this: company code yearcode ponumber abc 17/ 200 what want: ponumber abc17/200 use query: select *, [company code] & [yearcode] & [ponumber] fullnumber yourtable if insist on having calculated field in table itself, use expression when - in design view - add calculated field: [company code] & [yearcode] & [ponumber]

Can we Integrate JBPM Console and Eclipse -

i creating workflow in eclipse (provided jbpm 7.1.0). want creating in eclipse reflected on jbpm web console. is possible? if yes, how? kie-workbench uses git repository store assets, create repository in kie-workbench, clone ide, create/update rules/processes , push changes kie-workbench using standard git commands.