Posts by vcatafesta • 77 points
5 posts
-
0
votes4
answers1289
viewsA: How to write a Datetimepicker to the database
just swap Convert.Todatetime(dtpData.Databindings) for dtpData.Value.Date private void button1_Click(object sender, EventArgs e) { DAL acesso = new DAL(); try {…
-
1
votes5
answers1698
viewsA: How can I ask the user for confirmation in a bash file?
Using read, as function: #!/usr/bin/bash true=1 false=0 confok(){ read -p "$1 [S/n]" [[ ${REPLY^} == "" ]] && return $true [[ ${REPLY^} == N ]] && return $false || return $true }…
-
4
votes0
answers46
viewsQ: How to iterate a recursive array without redundancy?
I have in certain directory thousands of software package files, which in turn has versions, as for example: /var/cache/fetch/archives/python-3.5.0-1-x86_64.chi.zst…
-
0
votes2
answers141
viewsQ: How to group substrings in condition and return them with BASH_REMATCH
I need to split a file-named string, in 5 parts, as an example below: #!/usr/bin/env bash str="python-zope-proxy-4.3.5-1-x86_64.chi.zst" pkg_re='(.+)-[^-]+-[0-9]+-([^.]+)\.chi.zst*' [[ $str =~…
-
0
votes2
answers3219
viewsA: C++ - Size of an array pointer
Anyway it becomes useless to pass the matrix by reference and still pass the number of elements of it in which simply could pass the number of elements by another parameter. The ideal would be for…