Posts

Showing posts from March, 2015

html - Web Proyect, need some jquery and paths -

i got problem, im trying add background-image maindiv, code doesnt work. $("#exd2").click(function(){ $(".maindiv").css({"background":"url('../../img/backs/steel.png')"}); }); folders -js: home: jsfile -img: backs -css: cssfile html files i think path of url, can me?

layout - Bootstrap-like col-row-grid functionality on React Native? -

Image
it better if demonstrate images. this trying achieve. assume landscape mode tablet size. let's have x amount of elements in array. want map across row until has 3 items in row, goes down. bootstrap, can col-md-4 3 times. currently using native-base . has interesting grid systems , not wanted. this have right now: <grid> <row> { recipestore.categories.map((category, index) => { return ( <col key={index} style={{height: 300}}> <card> <carditem> <body> <text>{ category.name }</text> </body> </carditem> </card> </col> ) })} </row> </grid> how can array iteration fill out 3 columns goes next row? you can use flexwrap: 'wrap' on parent contain , use flexbasis on children. import react, { component } 'react'; import { view, styles

javascript - Why doesn't this basic anime.js work? -

i starting learn anime.js. see how worked, copied basic sample code documentation website . weirdly, square not animating right 250px should be... html: <!doctype html> <html lang="en-us"> <head> <link rel="stylesheet" type="text/css" href="style.css"> <script src="anime.min.js"></script> <script src="script.js"></script> </head> <body> <div id="cssselector"> <div class="line"> <div class="square el"></div> </div> </div> </body> </html> css: body{ background-color: #232323; } .square{ width: 100px; height: 100px; background-color: red; } and javascript var cssselector = anime({ targets: '#cssselector .el', translatex: 250 }); i see square there no animation. program does read anime.min.js because there

FAQ react-virtualized questions -

i attempting make grid polished. instead of asking these questions separately, thought gather them altogether in 1 place. for react-virtualized grid , how i: render decimals precision 2 , trailing zeroes 48.5 shows 48.50. put lines in between rows , lines in between columns. add column names header @ top of grid. change font of text in cell change alignment per cell cellrenderer looks this: cellrenderer ({ columnindex, key, rowindex, style }) { const { quotelist } = this.state; const rowclass = this.getrowclassname(rowindex) // first try @ making use of .css customize look. doesn't seen anything. const classnames = cn(rowclass, styles.cell, { [styles.centeredcell]: columnindex > 1 }) return ( <div //classname={classnames} key={key} style={style} > {quotelist[rowindex][columnindex]} </div> ) } i instantiating grid this: render() { return ( <

Getting .Net Core 2.0 Self-contained to publish framework DLLs -

Image
the setup: .net core 2.0 plain mvc template: publishing folder: i added runtimeidentifiers: but can not vs copy .net core dlls output folder, site files. i've read this: ms core manual , seems should include them. "dotnet restore" seems nothing. what missing?!?! thanks. not sure issue was, appears latest vs update days after v15.3 new v15.3.1 fixes problem.

android - Error receiving broadcast Intent at org.jivesoftware.smack.SmackAndroid$1.onReceive -

my asmack library has bug, please tell me correct asmack library version , download address, or tell me other solutions. thank much! an occasional flash occurred in app. see code , picture descriptions details. (lookup.refreshdefault) related operation of network, main thread cannot carry out network operation, onreceive method should start new thread, cannot find asmack library source code, code can not modified, class files. please have experienced developers tell me how solve problem. android.os.networkonmainthreadexception @ android.os.strictmode$androidblockguardpolicy.onnetwork(strictmode.java:1273) @ java.net.inetaddress.lookuphostbyname(inetaddress.java:431) @ java.net.inetaddress.getallbynameimpl(inetaddress.java:252) @ java.net.inetaddress.getbyname(inetaddress.java:305) @ org.xbill.dns.simpleresolver.<init>(simpleresolver.java:56) @ org.xbill.dns.simpleresolver.<init>(simpleresolver.java:68) @ org.xbill.dns.extendedresolver.<

php - Laravel: How can i generate two unique seeds in my laravel faker -

i want create 2 unique users in faker. wanna know right way of doing it. $factory->define(app\user::class, function (faker\generator $faker) { static $password; return [ { 'name' => "person 1", 'email' => "person1@gmail.com", 'password' => $password ?: $password = bcrypt('secret'), 'remember_token' => str_random(10), 'role' => 'super', }, { 'name' => "person 2", 'email' => "person2@gmail.com", 'password' => $password ?: $password = bcrypt('secret'), 'remember_token' => str_random(10), 'role' => 'admin', }, ]; }); this code solved problem $factory->define(app\user::class, function (faker\generator $faker) { static $password; return [ 'name' => $faker->

Android all kinds of errors from Gradle and Kotlin -

what going on gradle , kotlin? haven't started coding yet, , regretting getting on android :( gradle project buildscript { ext.kotlin_version = '1.1.3-2' repositories { jcenter() mavencentral() maven { url 'https://maven.google.com' } } dependencies { classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.google.gms:google-services:3.1.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version" } } allprojects { repositories { jcenter() maven { url 'https://maven.google.com' } mavencentral() } } task clean(type: delete) { delete rootproject.builddir } gradle module apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' app

Where is docker-ee-selinux-17.06.1.ee.1-1.el7.noarch.rpm -

docker has released 17.06 version of docker-ee. there no selinux rpm in trial packages /rhel/7.3/x86_64/stable-17.06/packages/ , , yum install docker-ee-17.06.1.ee.1-1.el7.rhel.x86_64.rpm failed because of selinux needed. anybody knows find it? thanks. got it! docker-ee 17.06 uses container-selinux, yum install container-selinux-2.19-2.1.el7.noarch.rpm .

reactjs - React.js with ESlint settings -

when use eslint check code, got error---'react' defined never used no-unused-vars import react 'react'; const app=({})=>{ return <div>123</div>; }; export default app; how modify .eslintrc.json file fix error? use eslint-plugin-react eslint plugin introduces react specific linting rules eslint. simply can install npm , configure in eslint config file. npm install eslint-plugin-react --save-dev { "plugins": [ "react" ] } and need enable react/jsx-uses-react rule in eslint config file. "rules": { // other rules, "react/jsx-uses-react": 2 } or can enable recommended eslint-plugin-react configs extends property. { "extends": [... /*other presets*/, "plugin:react/recommended"] } however, enable additional rules enforces react practices.

html - Align flex items to the left -

this question has answer here: how center flex container left-align flex items 1 answer targeting flex items on last row 1 answer i have aligned flex items using justify-content: space-around; in example given below, need align last item left. please help. .wrapper { display: flex; justify-content: space-around; flex-wrap: wrap; } .block { width: 30%; border: 1px solid red; margin-bottom: 20px; } <div class="wrapper"> <div class="block">orem ipsum dolor sit amet, consectetur adipiscing elit. morbi elementum dui quam, </div> <div class="block">orem ipsum dolor sit amet, consectetur adipiscing elit. morbi elementum dui quam, vitae venenatis est ultricies blandit. aenean augue enim, </di

python - using groupby/aggregate to return multiple columns -

i have example dataset want groupby 1 column , produce 4 new columns based on of values of existing columns. here sample data: data = {'alignmentid': {0: u'ensmust00000000001.4-1', 1: u'ensmust00000000001.4-1', 2: u'ensmust00000000003.13-0', 3: u'ensmust00000000003.13-0', 4: u'ensmust00000000003.13-0'}, 'name': {0: u'noncodingdeletion', 1: u'noncodinginsertion', 2: u'codingdeletion', 3: u'codinginsertion', 4: u'noncodingdeletion'}, 'value_cds': {0: nan, 1: nan, 2: 1.0, 3: 1.0, 4: nan}, 'value_mrna': {0: 21.0, 1: 26.0, 2: 1.0, 3: 1.0, 4: 2.0}} df = pd.dataframe.from_dict(data) which looks this: alignmentid name value_mrna value_cds 0 ensmust00000000001.4-1 noncodingdeletion 21.0 nan 1 ensmust00000000001.4-1 noncodinginsertion 26.0 nan 2 ensmust00000000003.13-0 codingdeletion

ssl - Play/scala app for Heroku stopped running -

all of sudden facing issue while running heroku app locally, play/scala app isn't working. seeing error may causing cannot load ssl context: 22:27:05 web.1 | caused by: com.typesafe.config.configexception$wrongtype: system properties: path has type object rather string procfile: web: target/universal/stage/bin/myapp -dhttps.port=${port} -dhttp.port=disabled -dhttps.keystore.path=conf/generated.keystore i same error on remote well. if run app locally without heroku, don't see issue (sbt -dhttps.port=$1 -dhttp.port=disabled ~run). not clear config property referring to. play version 2.5.4. full log: $ heroku local web [okay] loaded env .env file key=value format 22:26:38 web.1 | 2017-08-17 22:26:38,177 [debug] p.a.l.c.actorsystemprovider - starting application default akka system: application 22:26:39 web.1 | 2017-08-17 22:26:39,289 [debug] p.a.d.s.defaultslickapi - created slick database config key admin. 22:26:40 web.1 | 2017-08-17 22:26:40,049 [debu

C++ use symbols from other namespace without making them externally accessible -

is there construction similar using namespace doesn't make imported symbols visible outside body (or bodies) of namespace? in example here, every symbol in whatever , other_namespace accessible through foo::<name_of_symbol> ... , i'd way prevent happening. namespace foo { using namespace whatever; using namespace other_namespace; // definitions } as complete example, program valid. if alternative using namespace intended semantics exists , used, not be. namespace { int func(int x) { return 10; } } namespace b { using namespace a; } namespace c { int do_thing(int x) { return b::func(57); } } you can use alias inside unnamed namespace. namespace a_long_namespace_name { void somefunc() {}; } namespace b { namespace { // unnamed namespace namespace = a_long_namespace_name; // create short alias } void someotherfunc() { a::somefunc(); } } b::a::somefunc(); // compiler error you still

Ruby DBI: How to add the execute arguments when use method "in (?)" -

here sample code using dbi: begin dbh = dbi.connect("dbi:mysql:test:localhost", "testuser", "testpassword") sql = "select u.email, u.account_name, u.height, u.weight test_users id in (?) group u.id order u.id outfile '/tmp/test.csv' fields terminated ',' enclosed '\"' lines terminated '\n'" sth = dbh.prepare(sql) sth.execute('1,2,3') sth.finish rescue dbi::databaseerror => e puts "an error occurred" puts "error code: #{e.err}" puts "error message: #{e.errstr}" ensure # disconnect server dbh.disconnect if dbh end but sql gives me like, value of "in" method incorrect: select u.email, u.account_name, u.height, u.weight test_users id in ('1,2,3') group u.id order u.id outfile '/tmp/test.csv' fields terminated ',' en

unix - Errors in bash scripts -

i have couple of errors in script built in centos deployed unix. have shebang #!/bin/bash on top of scripts , execute script using bash myscript.sh line in script: existing[0]="" error: existing[0]=: not found line in script: not sure if - while ifs='' read -r line || [[ -n "$line" ]]; or 1 - if [[ $sftp_status != 0 ]]; error: syntax error @ line 118: `i=$' unexpected line in script: i=$((i + 1)) if have shebang line on top, can set execute permission , run script ./<scriptname> . dont need bash <scriptname> . those syntax seems valid me , doubt if bash. try /bin/bash <scriptname> , see if helps.

pandas - python sklearn: IndexError :'too many indices for array' -

i new fish in machine learning. had problem lately , searched stackoverflow same topic already, still can't figure out. take look? lot! #-*- coding:utf-8 -*- import pandas pd import numpy np import matplotlib.pyplot plt data_train = pd.read_excel('py_train.xlsx',index_col=0) test_data = pd.read_excel('py_test.xlsx',index_col=0) sklearn import preprocessing x = data_train.iloc[:,1:].as_matrix() y = data_train.iloc[:,0:1].as_matrix() sx = preprocessing.scale(x) sklearn import linear_model clf = linear_model.logisticregression() clf.fit(sx,y) clf the code runs before, , data cleaned. fit in data, like: id rep b c d 1 0 1 2 3 4 2 0 2 3 4 5 3 0 3 4 5 6 4 1 4 5 6 7 5 1 5 6 7 8 6 1 6 7 8 9 7 1 7 8 9 10 8 1 8 9 10 11 9 1 9 10 11 12 10 1 10 11 12 13 and code below shows indexerror. why? , how fix it? thanks! import numpy np import matplotlib.pyplot plt

android - phpmyadmin mysqli to sqlite sync data -

am new server based application, need have phpmyadmin mysqli server need sync sqlite can access offline mode also, need easiest method, in advance. haven't tried method because new sqlite , doesn't know how syncing takes place please me here volley fetching mysqli phpmyadmin server stringrequest stringrequest = new stringrequest(request.method.post,location, new response.listener<string>() { @override public void onresponse(string response) { try { arraylist<string> arrlist = new arraylist<string>(); jsonarray jsonarray = new jsonarray(response); jsonobject json = null; (int = 0; < jsonarray.length(); i++) { json = jsonarray.getjsonobject(i); final string strvalue = json.getstring("location_name"); arrlist.add(strvalue); adapte

java - Finding the nth nearest object for two datatypes -

i'm trying find nth nearest object player , have looked around , come conclusion 2d arraylist or list seems need store object id's , distances player, sorting ascending order. i'm not sure how achieve lists. have working code find nearest object finding nth seems trickier without using lot of variables. this question below closest answer i've seen - use 2 strings , not 2 different values such object , int need. how sort 2d arraylist<string> first element list<arraylist<gameobject>> nearest = new arraylist<arraylist<gameobject>>(); nearest.add(new arraylist<gameobject>(arrays.aslist(instance, int))); //adds new instance , it's distance player. currently i'm getting error i'm not allowed both object , int in array , can't seem define both types. let's have collection (set, list, whatever) of gameobject: collection<gameobject> gameobjects = ...; you have, somewhere, method used compute

node.js - Nodejs server ignores my android app connections but accepts it if it is the same request from mobile chrome browser? -

i have strange problem,every thin working charm until nodejs server decides not accept requests , log anything.i turned off firewall nut yet still exist.i tested send request chrome browser got response.the android app built seems not getting accepted it's server , no not permission problem goes working before whats going on here?!! even simple nodejs code refusing application: const http = require('http'); const express=require('express'); const path=require("path"); const socketio=require("socket.io"); var app=express(); var server=http.createserver(app); var io=socketio(server); io.on("connection",(socket)=>{ console.log("new user connected"); socket.on("hello",(message)=>{ console.log(message); }); }); server.listen(3500,()=>{ console.log("server up"); }); that's simple android app mainactivity : public class mainactivity extends appcompatactivity {

php - yii2 framework: Controller/Action url & without parameters -

in application , have admincontroller actionupdate, in yii path becomes admin/update . in order users info , use following path admin/update?id=10 10 empid . is there way same thing without id part of path, i.e. want path admin/update? instead of ( admin/update?id=10 ). don't need user want see id values. thank you! you can send data using post method instead of get with of javascript use hidden form post method , input field. onclick of update button set id input field , submit form. id in controller's action without showing in url

r - shiny reactive if statement giving a "[1]" in output. how to remove this? -

Image
i have shiny server code in have loop check whether user entered 9 or nothing. whenever user enters 9 or nothing output containing [1] aswell "" if enter nothing output [1]"" if enter 9 output is [1]"you not working good" how avoid [1] double quotes? below server.r code library(shiny) shinyserver(function(input, output) { output$name <- rendertext({input$name}) output$whrs<-renderprint({ if (input$whrs == "") { "" } else if(input$whrs == 9) { "you not working good" } }) }) this should keep going: library(shiny) server <- function(input, output) { output$whrs<-rendertext({ if (input$text == "") { "" } else if(input$text == 9) { "you not working good" } }) } ui <- shinyui(fluidpage( sidebarlayout( sidebarpanel( ), mainpanel(selectinput("text","enter text",choices=

php - Get facebook messages from browser and save to database -

i want create php site opens facebook profile/messages , automatically saves messages datbase separated conversations. of messages, not incoming. want open php in 1 pc logging , when send message phone or computer saves outgoing , incoming messages database.anybody has idea how create this?

javascript - Error after installing react-native-elements -

Image
i created project in expo runs on genymotion simulator no problems when empty tried install react-native-elements , after succesfull instalation of got error when tried open project in simulator.

objective c - Navigation bar title and navigation buttons not appearing on iOS 11 -

prior ios 11, uinavigationbar buttons , title being displayed correctly. yesterday downloaded xcode 9 ios 11 and, after building , running without doing changes, both navigation buttons , title not being displayed anymore. shows uinavigationbar correct color setting nothing else. i tried on different simulators , updated iphone 7 ios 11 beta 5 , result same. nothing being displayed. has faced same problem? have tried changing different parts of code , storyboard nothing affects... edit screenshots: http://imgur.com/a/hy46c thanks in advance! i have exact same issue... on ipad. navigation items , titleview show correctly on iphone devices not on ipad reason. working fine in ios 10. if can figure out fix i'll report back.

Steps to connect Angular4 to a Database (Oracle) -

actually i've connect angular project database access data. don't know how. should write rest api it? if yes, how can connect rest api project? which steps should follow? thanks the angular application "front" application. store , fetch data database you'll need "back" application provide urls angular app call. a simple can done using laravel , oci 8 connector in order query oracle database. backend in php common solution might not fit needs. set laravel project : https://laravel.com/docs/5.4 install oci8 module connect oracle database : https://github.com/yajra/laravel-oci8 then follow laravel's guidelines set urls callable front application in angular4.

ios - GMSMapView crashes because it is always nil -

i have been working on googlemaps, working on own framework when stumbled upon clusterkit amazing framework. wish make of own that. however facing weird problem. when execute target of project on own works fine when bundle in framework , use project, gsmmapview returns nil , app crashes. have tried possible, thinking doing wrong not. -objc flag set, googlemaps.framework latest, given specific static parameters frame line fails: gmsmapview *mapview = [gmsmapview mapwithframe:self.mapview_container.bounds camera:map_camera]; please let me know if it's entirely possible fix it. have exhausted methods make work no avail. exception breakpoints in xcode have given way , unsolvable bug.

java - Sprint Boot Application Shutdown -

i have spring boot application listens jcaps. connection durable. when shutdown application using curl -x post ip:port//shutdown application not shutting down completely. can see pid when grep processes. tried kill using kill -15 pid or kill -sigterm pid the pid gone, subscription jcaps topic still active. hence, when restart application, unable connect same topic using same subscriber name. please on how shutdown spring boot application.

Custom ListView with checkbox changes position while scrolling in android -

i new android , working on web view demo, have implemented it. problem me when check check box , scrolling list view , checked position changes. i have tried links stack on flow no luck, request can me resolve issue, please adapter below, adapter public class filteradapter extends baseadapter { private static final int type_item = 0; private static final int type_separator = 1; private static final int type_max_count = type_separator + 1; private arraylist<string> mdata = new arraylist<string>(); private layoutinflater minflater; private treeset<integer> mseparatorsset = new treeset<integer>(); public filteradapter(context context) { minflater = (layoutinflater) context.getsystemservice(context.layout_inflater_service); } public void additem(final string item) { mdata.add(item); notifydatasetchanged(); } public void adds

html5 - Show bootstrap alert on a video tag -

i have following div items. first 1 plays video , second 1 display bootstrap alert. want display alert on video. can 1 help? <div class="alert alert-info" role="alert"> <strong>you watched promo video!</strong> please our premium user activating video package here. </div> <video id="video" src="/uploaded_images/{{$video->promo_video_url}}" data-viblast-key="d784d003-60eb-46b5-b801-c534b6560036" controls style="width: 100%;"> </video> <script> var video = document.getelementbyid('video'); video.onplaying = function(e) { /*do things here!*/ $('#alert').show(); } </script> <div class="alert alert-info" role="alert" id="alert"> <strong>you watched promo video!</strong> please our premium user activating video package here. </div> <video id="video" src=

Android: Is a slider button possible in widget? -

i'm working on homescreen widget time-tracking app. widget consists of button changes "start" "stop" when click it. want button more "accident-safe" if click mistake. know longclick isn't possible in homescreen (because it's needed editing/deleting), know if sliding is, too? try this: https://www.sitepoint.com/creating-an-ios-style-swipe-button-for-android/ thanks!

ios - In UICollectionViewCell need to set border effect where it cross to each others (Junction type) -

Image
i implement uicollectionviewcell. need set border effect cell cross each others junction point. here image, need set border this.. i tried out give cell border in output left & right side border appear not desired output. output this. (wrong output) so please me.. note: below answer based on discussion between question owner , myself. you need setup collectionviewflowlayout achieve desired output. try below code: func collectionview(_ collectionview: uicollectionview, layout collectionviewlayout: uicollectionviewlayout, sizeforitematindexpath indexpath: indexpath) -> cgsize { // values changable according needs. let layout = collectionview.collectionviewlayout as! uicollectionviewflowlayout layout.sectioninset = uiedgeinsets.zero layout.minimuminteritemspacing = 1 layout.minimumlinespacing = 2 return cgsize(width: (self.collectionview.frame.width / 2) - 1 , height:(self.collectionview.frame.height / 3) - 1) } update 1: ca

batch file - How to run PowerShell Start-Process without closing the output window? -

i trying run following powershell command in cmd: powershell -command "start-process msbuild.exe myproject.sln -verb runas" i'm running in powershell can uac (for elevated privileges). i'm not sure if there equivalent in cmd. now, run powershell script within batch file, can double-click , execute. (or put in $path location , call anywhere) but problem finishes running, closes, , cannot see build error message if any. how can wait or pause when msbuild.exe has finished executing in new window? the noexit command keeps powershell window open. powershell -noexit -command "start-process msbuild.exe myproject.sln -verb runas"

ios - Weird fatal error: unexpectedly found nil while unwrapping an Optional value -

Image
i'm using sqlite ios swift app. below error snippet when select row database. the problem is: has value generate fatal error. (unexpectedly found nil while unwrapping optional value) the library used is: stephencelis/sqlite.swift import foundation import sqlite struct studentdb { let table = table("students") let code = expression<string>("code") let name = expression<string>("name") let gender = expression<int>("gender") let birth = expression<string>("birth") let born = expression<string>("born") let classname = expression<string>("class") let speciality = expression<string>("speciality") let department = expression<string>("department") let faculty = expression<string>("faculty") let training = expression<string>("training") let course = expression<

python - How to normalise inputs inside a Keras model -

when using keras, found it's important normalise inputs variables (mean value = 0) , (standard error = 1). perform normalisation before start training, wonder if there way perform procedure inside model? such using dedicated layer or activation function it. don't need normalise inputs variables manually.

c++ - GDB debug linux application using shared library -

i debugged application using shared library on target linux system. , came across following errors: (gdb) set sysroot /mnt/hgfs/sharefolders/mksdboot-tl/filesystem warning: unable find dynamic linker breakpoint function. gdb unable debug shared library initializers , track explicitly loaded dynamic code. (gdb) does shared library have problem or gdb debugger wrongly configured? any great.

wordpress - Multiple Mailchimp Subscription forms on one page conflicting -

i have conflict using 2 mailchimp forms on same page in wordpress . 1 subscribing emails newsletter (standard email form) , other being form collects people's information different mailing list. now, following error: mc-validate.js:189 uncaught typeerror: cannot read property 'replace' of undefined @ object.getajaxsubmiturl (mc-validate.js:189) @ mc-validate.js:338 @ mc-validate.js:359 (index):536 uncaught syntaxerror: unexpected token = (index):536 seems there conflict validating forms, conflicting on having same id. (id="mc-embedded-subscribe-form") is there way have multiple forms on 1 page, , how able fix it? in advance.

javascript - Periodically call node.js function every second -

i have node.js server , client. client has video.js player, progressbar.js , socket.io. want progressbars show buffer percentage of other users. here piece of server source function updateprogressbars() { io.sockets.emit('updateprogressbars'); //send data } socket.on('userprogressbarupdate', function(data) { socket.broadcast.emit('changelocalprogressbar', data); //send data not sender }); and here client socket.on('updateprogressbars', function() { var bufferlevel = myplayer.bufferedpercent(); var data = { bl: bufferlevel, n: name } socket.emit('userprogressbarupdate', data); //send data server }); changelocalprogressbarlevel changing progressbars on client side dont worry it. how can make updateprogressbars() called every second. using setinterval not best choise because should clearinterval . prefer using recursion bluebird promises: function a() { if(smthcompleted) dosmth(); els

javascript - jquery.simplePagination.js:334 Uncaught TypeError: Cannot set property 'currentPage' of null -

hello im getting error in browser, function working intetend im curious of why im getting error, can see becasue sets currentpage value null dont understand why thats problem. paging works fine im want know if can solved error. im rookie. jquery.simplepagination.js:334 uncaught typeerror: cannot set property 'currentpage' of null @ init._selectpage (jquery.simplepagination.js:334) @ init.selectpage (jquery.simplepagination.js:66) @ init.$.fn.pagination (jquery.simplepagination.js:389) @ checkfragment (blog:440) @ htmldocument.<anonymous> (blog:447) @ c (jquery.min.js:4) @ object.firewith [as resolvewith] (jquery.min.js:4) @ function.ready (jquery.min.js:4) @ htmldocument.q (jquery.min.js:4) <script src="~/scripts/jquery.simplepagination.js"></script> <script> // mind slight change below, personal idea of best practices jquery(function ($) { // consider adding id table,

html - why "text-overflow: ellipsis" property of div not working for its child div -

this question has answer here: applying ellipsis multiline text 12 answers css property text-overflow: ellipsis not working on child div has class name cluster-name . .ft-column { flex-basis: 0; flex-grow: 1; padding: 4px; text-overflow: ellipsis; overflow: hidden; } .ft-column>.cluster-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } <div class="ft-column"> <div>cluster</div> <div class="pull-left cluster-name">fqdn</div> </div> you should give parent div width when child overflows width trigger style .this work if give width child div hard manage parent wrapper it's better to manage parent div. .ft-column { flex-basis: 0; flex-grow: 1; padding: 4px; width: 20%; } .cluster-name{ white-space: now

centos - pam ldap password reset on terminal -

i have solaris machine running connected ldap. users can login using credentials stored in ldap. when user forgets his/her password, can reset password in ldap , force user pick new password after successful login (terminal , gui). trying on centos using pam not work (login screen rejects password if wrong) or not quite sure how configure pam. /etc/pam.d/password-auth-ac looks this: #%pam-1.0 # file auto-generated. # user changes destroyed next time authconfig run. auth required pam_env.so auth sufficient pam_unix.so try_first_pass auth requisite pam_succeed_if.so uid >= 1000 quiet_success auth sufficient pam_ldap.so use_first_pass auth required pam_deny.so account required pam_unix.so broken_shadow account sufficient pam_localuser.so account sufficient pam_succeed_if.so uid < 1000 quiet account [default=bad success=ok user_unknown=ignore] pam_ldap.so account required pam_permit

How to get user's publics content using token in Facebook API? -

i need following: user gives me access (i' not sure kind of access) make requests pages specifies , grab data need. example, user needs buy car (e.g. bmw). subscribes many publics cars (including private ones) gives access app make requests these publics using token. user specifies public's links , keyword "bmw" app give him actual posts publics contains "bmw"-keyword. sorry if explanation unclear , in advance!

c# - Passing Name from Parameter to Linq Query -

can : public int countspesific(string querystring, string namakategori, string namalaporan) { var results = getsearchresults(querystring); //will result in list var count = results.where(o => o.klasifikasilaporan == namalaporan && o.[namakategori] == true).count(); return count; } i want [namakategori] changed based on parameter you can use reflection property info , fetch value. in below code yourtype type of o in lambda expression. query = query.orderby(x => prop.getvalue(x, null)); public int countspesific(string querystring, string namakategori, string namalaporan) { system.reflection.propertyinfo prop = typeof(yourtype).getproperty(namakategori); var results = getsearchresults(querystring); //will result in list var count = results.where(o => o.klasifikasilaporan == namalaporan && (bool)prop.getvalue(o) == true).count(); return count; }

java - JTextPane Syntax Highlighting Offsets Are Incorrect -

i creating text editor syntax highlighting in java using jtextpane. when run program, output: https://www.dropbox.com/s/kkce9xvtriujizy/output.jpg?dl=0 i want every html tag highlighted pink, after few tags begins highlight wrong areas. here highlighting code: private void htmlhighlight() { string texttoscan; texttoscan = txtredit.gettext(); styleddocument doc = txtredit.getstyleddocument(); simpleattributeset sas = new simpleattributeset(); while(texttoscan.contains(">")) { styleconstants.setforeground(sas, new color(0xeb13b1)); styleconstants.setbold(sas, true); doc.setcharacterattributes(texttoscan.indexof('<'), texttoscan.indexof('>'), sas, false); styleconstants.setforeground(sas, color.black); styleconstants.setbold(sas, false); texttoscan = texttoscan.substring(texttoscan.indexof('>') + 1, texttoscan.length());

windows - BATCH exist not working -

i've started making small program in batch, worked fine until i've gotten if not exist , problems started every time got statement, batch file has crashed. here's code: rem beggining options @echo off title organizer color 07 mode con cols=101 lines=30 setlocal enabledelayedexpansion cls rem welcome cls color e echo welcome organizer.bat! program made eldar bakerman organize files , computer! echo version 1.0! echo project started in 11.08.2017 (dd/mm/yyyy) echo press key continue pause>nul rem organization :organization color 0b cls rem create foldername variable set /p foldername=what name of folder unorganized files located in? rem find folder if not exist "d:\users\eldar\desktop\%foldername%\nul" ( color 0c echo error! folder "%foldername%" not found! pause>nul ) else ( pause ) pause here's script without bloat: @echo off set/p "foldername=what name of unorganized files folder? " if not exist "d:\users\e