Posts

Showing posts from April, 2011

javascript - Change Parent Div Background onclick form multiple Child Div li -

i trying make parent div background img change onclick wwith multiple li instances. each li should change background map of state. doing 1 instance this works: <ul> <li><div class="panel-heading" role="tab" id="statenine"> <h3 class="panel-title"> <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion3" href="#stateal" aria-expanded="false" aria-controls="stateal">alabama | </h3></div> </li> <script>function changebackground() { event.currenttarget.classname = ('bucketal'); }</script>` this works once, fires last script instance on every button, ignoring previous. background changes last instance's background. there total # of 9

reactjs - relay fragment spread not working -

Image
i'm in learning process of relay , facing wired issue. relay not returning data network response if use fragment spread operator (actual data returning graphql, confirmed network tab). if define field requirements in query itself, returns data. this index.js of app: import react 'react' import reactdom 'react-dom' import { graphql, queryrenderer } 'react-relay' import environment './relay/environment' import alltodo './components/alltodo' const query = graphql` query frontendquery { ...alltodo_todos } ` reactdom.render( <queryrenderer environment={environment} query={query} render={({ error, props }) => { if (error) return <div>{error}</div> else if (props) { console.log(props) return <alltodo { ...props } /> } else return <div>loading...</div> }} />, document.getelementbyid('root') ) alltodo component: impo

windows - Error Logs from Python .exe -

i new programming on windows , python (mainly macos / ruby). writing program scans ip addresses, finds networked devices, logs them, , upgrades firmware. wrote python script , used tkinter gui. when run script in python, works expected. however, having issues when run script after create .exe pyinstaller. when try "map network" , export output xml using python-nmap think it's throwing error. have scan_network() function on thread , check see if running, , when done popup saying "xml generated". when input ips gui tells me xml generated, alas no xml. i assuming there problem nmap not being bundled exe, or something, not sure. there way can add way check logs? here function button "scan network" calls. how can add logs this? import nmap def scan_network(ips): nm = nmap.portscanner() nm.scan(hosts=ips, arguments='-v -a') open('xml/pyscan.xml', 'w') xml_file: xml_file.write(nm.get_nmap_las

tfsbuild - Error code 255 when trying to kick off a TFS2013 team build via a PostBuildEvent -

Image
i'm trying kick off team build when team build finishes, i've added .csproj of project being built: <propertygroup condition=" $(isdesktopbuild) == 'false' "> <postbuildevent> <command> cmd /c "c:\program files (x86)\microsoft visual studio 12.0\common7\ide\tfsbuild.exe" start /collection:http://server/collectionname /builddefinition:\builddefinitionname </command> </postbuildevent> i've tried without cmd /c , doesn't help. tried without command /command around it, same error no matter option choose. if copy , paste command dos window works fine. error is: c:\program files (x86)\msbuild\12.0\bin\microsoft.common.currentversion.targets (4548): command "<command xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> cmd /c "c:\program files (x86)\microsoft visual studio 12.0\common7\ide\tfsbuild.exe" start /collection:server/collection /builddefinition:\b

SELinux missing oracleasm contexts -

preface...selinux not area of expertise...nor oracle. nevertheless have issue solve. seems file , executable contexts missing selinux implementation , use input on problem. i had set selinux permissive create asm disks, infosec requires sel running. if reboot, disks cannot come online because sel blocks them. the oracleasm contexts missing context file, come from? [root@hostname files]# cat /etc/selinux/targeted/contexts/files/file_contexts|grep oracle /opt/(.*/)?oracle/(.*/)?libnnz.*\.so -- system_u:object_r:textrel_shlib_t:s0 /usr/lib(64)?/nagios/plugins/check_oracle -- system_u:object_r:nagios_services_plugin_exec_t:s0 /usr/lib/oracle(64)?/.*/lib/libclntsh\.so(\.[^/]*)* system_u:object_r:textrel_shlib_t:s0 /usr/lib/oracle/.*/lib/libnnz.*\.so -- system_u:object_r:textrel_shlib_t:s0 /usr/lib/oracle/.*/lib/libnnz10\.so -- system_u:object_r:textrel_shlib_t:s0 /usr/lib/oracle/xe/apps(/.*)? system_u:object_r:bin_t:s0 log info: [root

Flutter.io - Is it possible to deep link to Android and iOS in Flutter? -

if it's possible, easy implementation or tough one? i had difficulty getting clear idea in flutter.io's documentation. you can use platform channel this. shouldn't tough. need add handlers in native code , redirect urls via channels flutter code. example ios: @implementation appdelegate - (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions { [generatedpluginregistrant registerwithregistry:self]; flutterviewcontroller *controller = (flutterviewcontroller*)self.window.rootviewcontroller; self.urlchannel = [fluttermethodchannel methodchannelwithname:@"com.myproject/url" binarymessenger:controller]; return [super application:application didfinishlaunchingwithoptions:launchoptions]; } - (bool)application:(uiapplication *)app openurl:(nsurl *)url options:(nsdictionary<uiapplicationopenurloptionskey,id> *)options{ [self.urlchannel invokemethod:@"openurl"

javascript - Plotly: How to highlight the line (change width of the line) on mouse hover? -

i highlight line (change width of line) on mouse hover event, guys highcharts do. please check https://www.highcharts.com/stock/demo/compare is possible that? link question on plotly web site - https://community.plot.ly/t/how-to-highlight-the-line-change-width-of-line-on-mouse-over/5128

ios - Use of NSFetchedResultsController in Clean Architecture -

i've searched answer without luck. question pretty same answer isn't clear (at least me!): which place nsfetchedresultscontroller in viper architecture? the nsfetchedresultscontroller seems useful approach ios apps examples i've seen place @ viewcontroller layer - @ least, vc becomes delegate. in clean architecture/viper, model layer disconnected view layer , can't figure out how nsfrc used in such architecture. answer above question implies interactor should delegate doesn't make sense - managed objects surfaced interactor, rather ponsos. perhaps don't understand enough yet, (a) have place in clean architecture; , (b) if does, wants right swift implementation pattern? this did in end. nsfetchedresultscontroller (nfrc)needs approached in 2 ways - fetching data, i.e. executing query, , notifications of changes managedobject (mo)set via delegate calls. fetching data not fire delegate calls. so, return results of running fetch, i.e. annfrc.fe

How do I make the STDIN in the Array stop? (PERL) -

this question has answer here: perl script not print <stdin> multiple times 3 answers my @array not stop taking in stdin... my @array = undef; while (@array = undef){ @array = <stdin>; (@array[x]=5){ @array = defined; } } as clarified, limit stdin 5 lines use warnings; use strict; use feature 'say'; @input; while (<stdin>) { chomp; push @input, $_; last if @input == 5; } @input; there other things comment on in posted code. while deal of cleared in detail in dave cross answer , i'd address business of context when reading filehandle. the "diamond" operator <> context-aware. i/o operators (perlop) if <filehandle> used in context looking list, list comprising input lines returned, 1 line per list element. it's easy grow rather large data space way, u

python - Dealing with large binary file (3 GB) in docker and Jenkins -

i'm using google model (binary file: around 3gb) in docker file , use jenkins build , deploy on production server. rest of code pulled bitbucket repo. an example line docker file download , unzip file. happens once command cached. from python:2.7.13-onbuild run mkdir -p /usr/src/app workdir /usr/src/app arg debian_frontend=noninteractive run apt-get update && apt-get install --assume-yes apt-utils run apt-get update && apt-get install -y curl run apt-get update && apt-get install -y unzip run curl -o - https://s3.amazonaws.com/dl4j-distribution/googlenews-vectors-negative300.bin.gz \ | gunzip > /usr/src/app/googlenews-vectors-negative300.bin everything works fine when build , run docker on local machine. however, when make patch-version push these changes production server through jenkins, build process fails @ end. setup, build , test phases works fine. however, post-build phase fails. (the build process pushes changes repo, , according log

How to use Command Object on Controller (Grails 2.3.11) for update? -

for example, have controller 'addresstestcontroller', , has function update accepts command object. addresstestcontroller { def update(addressupdatecommand cmd){} } class addressupdatecommand { string firstname string address } when 'firstname' not in body request, it's null. when has value null, it's null. how check if user wants value null? thanks afaik can't differ between empty , not submitted values in command. the difference be, default values should applied if value not submitted. class addressupdatecommand { string firstname = "firstname not submitted" string address }

python - Create Feature Using K-Nearest Neighbors -

i'm relatively new python , machine learning, i've been working on building out predictive model mortgage prices. i'm struggling using k-nearest neighbor algorithm create feature. here's how understand mechanics of want accomplish: i have 2 data files: mortgages sold , mortgages listed in both data files have same features (including lat/long). i want create column in mortgages listed represents median price of closely related homes in immediate area. i'll use methodology listed in 3 create columns 1-3 months, 4-6 months, 7-12 months. another column trend of 3 columns. i've found on knn imputation, doesn't seem i'm looking for. how go executing idea? there resources may have missed help? any guidance appreciated. thanks! so, understand, want fit knn model using mortgages sold data predict prices mortgages listed data. classical knn problem need find nearest features vectors in sold data each feature vector in listed data, ,

c++ - Is printing of a member pointer to an int defined -

suppose have code: #include <iostream> struct mine { int a; int b; }; int main() { int mine::* memberpointera = &mine::a; int mine::* memberpointerb = &mine::b; std::cout << memberpointera; std::cout << "\n"; std::cout << memberpointerb; } when run microsoft visual c++ (2015) i following output 1 1 the output expect more this: 1 2 so begs question: printing of member pointer defined behavior? there's defined conversion pointer bool . since member variable pointers not null , evaluate true , print 1 .

PHP: Deserializing a XML to an array -

a month ago asked how deserialize xml in c#, have same in php, can't make work correctly, xml format: <?xml version="1.0" encoding="utf-8" ?> <response uri="/api/" action="export"> <result> <rows> <row> <column name="name1">value1</column> <column name="name2">value2</column> </row> <row> <column name="name1">value1</column> <column name="name2">value2</column> </row> </rows> </result> </response> and here i'm trying do: $row = new simplexmlelement($xml); $json = json_encode($row); $array = json_decode($json,true); foreach($array["result"]["rows"]["row"] $row){ $array[$k] = [ 'name1' => $row["column&

Cache is changing the namespace path Symfony 2.7 -

i change directory different namespace , reason when cached it’s changing namespace path from this: "mb2\atrbundle\classes\payer\reports\sat"` to this: "mb2\atrbundle\classesayer\reports\sat"` i every ware in project misspell “classesayer” not find any can point me in right direction on error? thank you

javascript - How to refresh data in a promise chain? -

in following code, want achieve make return $http.get(newurl_3); call every 10 second , refresh data in last response. tried setinterval in different places not make work. it chains of promises in 5 steps , in total more 100+ line of code. not sure if putting whole thing in setinterval practice. $http.get(url).then(function(data) { // playing data , returning new promise return $http.get(newurl_1); }).then(function (data) { return $http.get(newurl_2); }).then(function (data) { return $http.get(newurl_3); }).then(function (data) { return $http.get(newurl_4); // call needs refreshed. }).then(function (data) { // creating data array ui. // needs refreshed every 10 second fetch updated data. $scope.ui_presentation_array = data... }) first, consider promise chain can written, follows: var promise = $http.get(url).then(function(data) { // playing data , returning new promise return $http.get(newurl_1); }).then(function (data

python - How to replace multiple values in a pandas dataframe? -

how can replace multiple values mapping in pandas dataframe? i have 1 column want replace following mapping. mapping apple=fruit tomato=vegetable steak=protein milk=dairy so column becomes. col1 -> col1 apple fruit apple fruit tomato vegtable steak protein milk dairy how can efficiently? just create dictionary mapping , call series.map . >>> d = {'apple': 'fruit', 'tomato': 'vegetable', 'steak': 'protein', 'milk': 'dairy'} >>> df.col1.map(d) 0 fruit 1 fruit 2 vegetable 3 protein 4 dairy name: col1, dtype: object

excel - How to "Find" looked up data -

so when have data looked table, example names using vlookup, when try use "find" function , specific name, fails yield result since it's vlookup formula in cell instead of value of data table. there anyway find original value want? once press ctrl+find, click on "options >>" button. , select "values" "look in" drop down. should able find value.

https - How to get full debug list for insecure warning in Chrome -

i've scoured web (and here) still can't find detailed information on how debug website in chrome reports insecure. no http/https errors in browser console used dev tools find http: function prove not exists cleared browser cache tried incognito mode other browsers report secure everything i've read exact scenario fixes time. not professional wait. i'm looking way see chrome thinks insecure can fix it. possible? i found answer. there hidden "security" tab in dev tools lists errors chrome sees. all had click 3 vertical dots in upper right corner of dev tools , choose "more tools" submenu , "security".

django - Node is not in primary or recovering state upon removal of instance from replication set -

i have 4 mongo instances in replication set, 1 of them obsolete , needs removed, when run rs.remove("hostname") django application instantly starts throwing node not in primary or recovering state upon removal of instance replication set until add instance in. this rs.status() rs_pimapi:primary> rs.status() { "set" : "rs_pimapi", "date" : isodate("2017-07-28t01:27:05.607z"), "mystate" : 1, "term" : numberlong(-1), "heartbeatintervalmillis" : numberlong(2000), "optimes" : { "lastcommittedoptime" : { "ts" : timestamp(1501205225, 1), "t" : numberlong(-1) }, "appliedoptime" : timestamp(1501205225, 1), "durableoptime" : timestamp(1501205222, 1) }, "members&qu

jquery - How to load field with ajax in index view on rails -

i have structure on views of class views/cards/index <% render @cards %> views/cards/_card <div class="col-md-4"> <p><%= card.name %></p> <p><a href="#" class="link-show-phone">show phone</a></p> <p><div id="show-phone-<%= card.id %>"></div></p> <p><a href="#" class="link-show-email">show email</a><p> <p><div id="show-email-<%= card.id %>"></div><p> </div> controllers/cards_controller def index @cards= card.all end def card_params params.require(:card).permit( :name, :phone, :email end i starting ajax , know best solution make requests using jquery , native rails resources. i example click on link <a href="#" class="link-show-email">show email</a> render field card.email , append <

Why should I unmount USB flash drive when prepare a USB installation of Proxmox? -

according official document of proxmox : make sure usb media not mounted , not contain important data. when making usb proxmox installation have make sure usb media not mounted on specific step. but why should unmount usb media? difference? as far know if usb mounted, dd return error stating disk/device in use. you'll have unmount usb disk first , use dd to create bootable usb disk proxmox .iso image. dd works @ block level , copies standard input standard output. in case standard input proxmox iso file , standard output usb disk. suppose issue man dd or read dd documentation more informations.

firebase C++ sdk on ios firebase::App::Create returns nullptr -

the below "helpful" messages logged underlying objective-c sdk: error: unable configure firebase services: neither name nor options can nil. <notice>: [2017.07.28-02.15.27:187][585] created firebase app: 0x0 <notice>: [firebase/core][i-cor000012] not locate configuration file: 'googleservice-info.plist'. of course, passing app name , options c++ api (and none of them nullptr): firebase::appoptions appoptions; const char* app_id = ... appoptions.set_app_id(app_id); const char* project_id = ... appoptions.set_project_id(project_id); const char* api_key = ... appoptions.set_api_key(api_key); const char* gcm_sender_id = ... appoptions.set_messaging_sender_id(gcm_sender_id); const char* database_url = ... appoptions.set_database_url(database_url); const char* storage_bucket = ... appoptions.set_storage_bucket(storage_bucket); firebase::app* appptr = firebase::app::create(appoptions, app_id); log("created firebase app %p", appptr);

ios - How to create custom uiview that button can be clicked inside uiview? -

Image
i tried create clicked scrollview button (at bottom): this code far: scview = uiscrollview(frame: cgrect(x: 0, y: view.frame.maxy-110, width: view.bounds.width, height: 110)) self.view.addsubview(scview) scview.backgroundcolor = uicolor.lightgray scview.translatesautoresizingmaskintoconstraints = false in 0 ... 10 { let mynewview=uiview(frame: cgrect(x: xoffset, y: cgfloat(buttonpadding), width: 200, height: 100)) mynewview.backgroundcolor=uicolor.white mynewview.layer.cornerradius=10 self.scview.addsubview(mynewview) let label = uilabel(frame: cgrect(x: xoffset, y: cgfloat(buttonpadding)+5, width: 150, height: 10)) label.center = cgpoint(x: 160, y: 285) label.textalignment = .left label.text = "i'am title label" label.textcolor = .black mynewview.addsubview(label) let ditancelabel = uilabel(frame: cgrect(x: xoffset, y: cgfloat(buttonpadding)+5, width: 50, h

c# - Xamarin forms - Multiple header on listview -

i using xamarin form(pcl) having 2 projects:android , ios i want listview multiple header don't want use third party eg: super group 1 _group 1 _item 1_1_0 _item 1_1_1 _group 2 _item 1_2_0 _item 1_2_1 super group 2 _group 1 _item 1_1_0 _item 1_1_1 _group 2 _item 1_2_0 _item 1_2_1 please achieve multiple header in listview you need nested grouped listview. need define grouped listview containing grouped listview. define list view grouped define list view in xaml <listview itemssource="{binding youritemlist}" isgroupingenabled="true" groupdisplaybinding="{binding key}" hasunevenrows="true"> check this forum of xamarin more info. can go through example james montemagno here . hope helps.

sql server - Hibernate - Dealing with field that is not primary key bot of identity type -

Image
it looks if possible have column increases values incrementally not primary key. table doesn't have primary key column. now need model table in our application uses hibernate. strategies dealing such table?

How to encrypt the password before on submit in wicket? -

now getting password user typed string in model, want encrypt password before on submit , set in model need decrypt encrypted password in server side? you can use https://github.com/brix/crypto-js encrypt password on client side , use same crypto algorithms @ server side java decrypt it. but don't see why need yourself. use https , there no need of such manual work.

PHP - Keep session up when database information is changed -

when user logs website session created "user id". when want go change account information can click button , redirected "developer_infoupdater.php" file. every time change information, session ends , logged out. want them stay logged in after change information. believe problem on "developerupload.php" file because checking if information current , if not redirect them logout page. , when changed destination logout different file, went file changed to. want user stay logged in after update account information. here code developer upload file <?php session_start(); try{ // new php data object $handler = new pdo('mysql:host=127.0.0.1;dbname=magicsever', 'root', ''); //attr_errmode set exception $handler->setattribute(pdo::attr_errmode, pdo::errmode_exception); }catch(pdoexception $e){ die("there error connecting database"); } //check if token used log in, there $token = $_session

python - Convolutional neural net testing accuracy stays constant after each epoch -

i see improving training accuracies after each iteration, testing accuracy stays fixed @ 0.7545 after each epoch. understand hitting ceiling on accuracy @ point don't understand why don't @ least see slight variations in accuracies (up or down). i'm training on 800 images total. things i've tried: - switch sgd optimizer. - start learning rate of 0.01 , reduce until 0.00000001. - remove regularization layers. #params dropout_prob = 0.2 activation_function = 'relu' loss_function = 'categorical_crossentropy' verbose_level = 1 convolutional_batches = 32 convolutional_epochs = 10 inp_shape = x_train.shape[1:] num_classes = 3 opt = sgd(lr=0.00001) opt2 = 'adam' def train_convolutional_neural(): y_train_cat = np_utils.to_categorical(y_train, 3) y_test_cat = np_utils.to_categorical(y_test, 3) model = sequential() model.add(conv2d(filters=16, kernel_size=(3, 3), input_shape=inp_shape)) model.add(conv2d(filters=32, kernel_si

Webservice import set field mapping in servicenow -

i have requirement import data via web service import set feature in servicenow. my request body nested json object, 1 of fields contain inner json, can further process data in transform script. however value in input row how becomes comma separated key=value has seen behavior? , if how disable it. thanks

scala - Creating nested columns in spark columns with multiple rows -

i trying create nested column in spark dataframe - a | b | [1,2, null] | [3, null, null] | [5,6,7] the printschema dataframe follows - |--a: string (nullable = true) |--b: struct (nullable = true) | |--x: long (nullable = true) | |--y: long (nullable = true) | |--z: long (nullable = true) i want dataframe nested - a | b | [[1,2,null],[3,null,null],[5,6,7]] and printschema should give same result before. i've tried take first row array of fields , concatenate remaining rows not working. can suggest how can desired results ? in advance.

ios - Tableview button.tag throw lldb -

Image
i don't know happen, set button.tag table row , when reach row > 1, throw lldb. works if button.tag <= 1 func tableview(_ tableview: uitableview, cellforrowat indexpath: indexpath) -> uitableviewcell { let cell = tableview.dequeuereusablecell(withidentifier: "cells")! uitableviewcell let alertbtn = cell.viewwithtag(1) as! uibutton; alertbtn.tag = indexpath.row alertbtn.addtarget(self, action: selector(("showalert:")), for: uicontrolevents.touchupinside) return cell } swift 3x... you replacing tag first tag items getting nil replace code ... func tableview(_ tableview: uitableview, cellforrowat indexpath: indexpath) -> uitableviewcell { let cell = tableview.dequeuereusablecell(withidentifier: "cells")! uitableviewcell let alertbtn = cell.viewwithtag(1) as! uibutton alertbtn.addtarget(self, action: #selcetor(showalert(sender:))), for: .touchupinside) return cell } func showalert(sender:uibutton) {

android - PhilJay/MPAndroidChart ploting server date in LineChart -

Image
i trying plot data server in linechart i tried converting server date long i not able show proper plotting. data server { "status_code": 200, "status": "success", "response": { "wws_level": 1, "current": 2.1, "target": 66, "logs": [ { "id": "22", "stats_id": "1", "user_id": "53", "log_of_on": "2017-07-27", "log_val": "6.00", "height": "5.8", "log_date": "27 july, 2017" } ] }, "message": "" } x-axis log_date": "27 july, 2017" y-axis "log_val": "6.00" my code arraylist<entry> e1 = new arraylist<entry>(); arraylist xaxislabel; linedataset d1;

multithreading - python multiprocessing handling an array of numbers concurrently -

i have list of number: a=[1,2,3,4,5,.....2000] i have square each number , update same array, instead of writing loop want using parallel processing. so squaring each number in array becomes process in itself. expected output=[1,3,9,16,25,........] how can achieve python multiprocessing library? already tried use threading library code not fast enough, plus threading library not using cores. you can use pool class multiprocessing module from multiprocessing import pool def f(x): return x*x if __name__ == '__main__': p = pool(5) print(p.map(f, [1, 2, 3])) #prints [1, 4, 9]

python - Speed up video playback from a networked device with camera or IP camera -

i'm trying stream video raspberry pi using flask api in python. may process individual frames on workstation. working fine far data delivery concerned. on client side process of reading frames introduces lag of 1-3 seconds undesirable in real time application. can view video playback in web browser without latency proves raspberry pi , network innocent . problem method of reading individual frames byte stream . thoughts eliminating latency in such application. below code client side application. complete source sample application can found here: https://github.com/shehzi-khan/video-streaming import cv2 import urllib import numpy np stream = urllib.urlopen('http://192.168.100.128:5000/video_feed') bytes = '' while true: bytes += stream.read(1024) = bytes.find(b'\xff\xd8') b = bytes.find(b'\xff\xd9') if != -1 , b != -1: jpg = bytes[a:b+2] bytes = bytes[b+2:] img = cv2.imdecode(np.fromstring(jpg, dtype

How to play video in ios swift -

i new ios programming, need stream video url unable stream video url using avplayer, using avplayer downloaded file able play.actual problem file format different example file name song.apa song.mp4 code: let avplayercontroller = avplayerviewcontroller() var avplayer:avplayer? override func viewdidload() { super.viewdidload() let movieurl = url.init(string: "http://techslides.com/demos/sample-videos/small.3gp") self.avplayer = avplayer.init(url: movieurl!) self.avplayercontroller.player = self.avplayer } override func didreceivememorywarning() { super.didreceivememorywarning() // dispose of resources can recreated. } @ibaction func playvideo(_ sender: any) { self.present(self.avplayercontroller, animated: true) { self.avplayercontroller.player?.play() } } in swift 3, try code playing video in project import uikit import avkit import avfoundation import mediaplayer import mobilecoreservices class videoplayerviewcon

Omnet++ (Castalia) -

there available castalia master file @ github. want castalia 3.2 can suggest me, find this. you can versions of castalia github repository. https://github.com/boulis/castalia/releases as always, recommended use latest version of castalia (found in github). not contains more features, fixes several bugs of older versions. @ changes.txt file see main bug fixes , features version 3.3 offers. can @ commit history find out (limited) changes since 3.3 released.

php - The validation not working after there is redirection in the form -

i'm trying validate , redirect page 2 variables(dates). validation going if don't redirect page. if use action = "pagingstatic.php" the validation not working. here code: <!doctype html> <html> <head> <title>Въвеждане на дата</title> <link rel="stylesheet" type="text/css" href="style.css"> <meta charset="utf-8"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> <?php // define variables , set empty values