Laravel checkbox state after failed validation

PHP
There are many many questions here on SO about how to properly persist checkbox fields in Laravel after form submission ( example, example, example ...
1 year ago

python: plot a bar using matplotlib using a dictionary

Python
Is there any way to plot a bar plot using matplotlib using data directly from a dict? My dict looks like this: D = {u'Label1':26, u'Label2': 17, u...
1 year ago

Laravel : Overriding route for specific route in voyager

PHP
I am trying to override a route for creating a row. (posting, not viewing) http://lsapp.dev/admin/cpu-speed/create In web.php I modified Route::g...
1 year ago

Can't pass my credentials to AWS PHP SDK

PHP
I installed AWS PHP SDK and am trying to use SES. My problem is that it's (apparently) trying to read ~/.aws/credentials no matter what I do. I curren...
1 year ago

SVM - How can I vectorize a kernalized gram matrix?

Python
I implemented a support vector machine in python using the cvxopt qp solver where I need to compute a gram matrix of two vectors with a kernel functio...
1 year ago

Filtering Distinct and Ordered Data

Python
I'm trying to create a messaging App where user can see the list of people who messaged him & also whom he messaged, so that he can click on their...
1 year ago

how to add email address to mailchimp list using api call in php

PHP
i am newbie in mailchimp. just now i have created account and got api key. i have gone through their api for adding email address to the list but didn...
1 year ago

How to run two cakephp 2.7 project on single server

PHP
I want to run two different cack php project on single server.
1 year ago

Get Wordpress Child Theme Path in Wordpress

PHP
I have a parent and child theme. In my child theme I declared a variable CHILD_DIR so I can add custom JS and CSS files to the my child theme's folder...
1 year ago

How to detect emoji as unicode in Perl?

Perl
i have text file that contain emoji unicode caracter for exemple
1 year ago

Add a meta box and display on single product pages custom tabs of Woocommece

PHP
Need to display a custom fields in the related products on a single product page. I would like to add a meta box to the Add New Product fields and d...
1 year ago

Perl regex hash to match string

Perl
Right now I have the following code... %strings = ( 'a' => 'x', 'b0' => 'y', 'b1' => 'y', 'b2' => ...
1 year ago

Mark latest/largest entry

PHP
I have a table with documents and want to list them. I would like the latest entry to be red. How can I do that? $q = "SELECT * FROM documents WHERE ...
1 year ago

Perl script giving un predictable results

Perl
I am very new to Perl. I wrote a script to display user name from Linux passwd file. It displays list of user name but then it also display user ids ...
1 year ago

What does a single ampersand mean in a PHP conditional statement?

PHP
The following code uses a single & in a conditional check. What does the single ampersand mean there? if( $some_array_or_other_var & SOME_CON...
1 year ago

Issues with connecting with apple APNS using perl

Perl
I am using a library(Net::APNS::Persistent) that uses Net::SSLeay. This library helps to communicate with Apples APNS servers. I found if I send any ...
1 year ago

How does the '\b' character in perl work?

Perl
According to my research the '\b' character used in perl print statements should act like a "backspace", that is, moving the cursor one character back...
1 year ago

Generate all combinations of up to N digits, including repeating digits, in Perl

Perl
What's the best way to generate all combinations of 1 to N digits, where digits could be repeated in the combination? E.g, given array 0..2, the resul...
1 year ago

Perl script does not output STDOUT to file when run from cron

Perl
Fairly new to Perl. I have a Perl script on a Linux machine, which has own logfile. Logfile name can change, dependent on data the script is working o...
1 year ago

Reduce array to anonymous hash code

Perl
Is there anyway to do something like this in perl (convert array hash and use it in one line)? sub func{ #from this my %args = @_; print $args{tes...
1 year ago

how to get rid of `Wide character in print at`?

Perl
I have file /tmp/xxx with next content: 00000000 D0 BA D0 B8 │ D1 80 D0 B8 │ D0 BB D0 B8 │ D0 BA к и р и л и к When I read content of file and ...
1 year ago

Use of uninitialized values in an list

Perl
I load some variables from HTML and want to check in my CGI script if they are initialized. Quickly I find out, I can not put uninitialized values to ...
1 year ago

Replace multiple lines in text file

Perl
I have text files containing the text below (amongst other text) DIFF_COEFF= 1.000e+07,1.000e+07,1.000e+07,1.000e+07, 1.000e+07,1.000e+07,1.000e+07...
1 year ago

Convert historical german local time record to UTC in JavaScript

Node.js
I need to convert German local time records, without zone info, i.e., var data = [ "2017-12-02 20:27:02", "2017-12-02 20:50:00" ] to UTC record...
1 year ago

Access LocalStorage value in ejs file

Node.js
I am trying to conditionally display some html where I want to check the value passed from my server, against my local storage value. I can't figure o...
1 year ago