Community Member
Member Avatar
Featured xrj 139 Replied To a Post in Regex to exclude a sub-directory
Topic by EvolutionFallen in Software Development
Of course if you're not coding in VBasic like me, most probably you'll have to escape the slash /. So the pattern becomes `collections\/(?!\/|shirts|tea|[\w]+\/products)` Reply by xrj
Member Avatar
Featured xrj 139 Replied To a Post in Regex to exclude a sub-directory
Topic by EvolutionFallen in Software Development
Assuming products (if present) is after the second / character like in
collections/shirts/products/tee-shirt,
`collections(/(?!/|shirts|tea|[\w]+/products))` seems to work. Reply by xrj
Member Avatar
Featured xrj 139 Replied To a Post in Regex to exclude a sub-directory
Topic by EvolutionFallen in Software Development
Try `collections\/col(\d{2,}|[^23])(?!\/products)`, because (\d{2,}|[^23]) will allow 2 or more numbers (as in col22, col21) or 1 number other than 2 or 3 (col1, col4, col5 but not col2 nor col3). Reply by xrj
Member Avatar
Featured xrj 139 Began Watching Regex to exclude a sub-directory
Hello,
I'm hoping for some help with a regex that has me stumped. My skill with regex is rather rudimentary.
To start, here are a couple of example URLs, and whether I want to match them or not:

collection/col1 // MATCH
collection/col2 // FAIL
collection/col1/products/pro1 // FAIL

My criteria:
* … Topic by EvolutionFallen in Software Development
Member Avatar
Topic by Divinedar_1 in Software Development
Of course, I meant the following (equal to 1):

`dic(mid(ws.Name,3) & arr(i,1)) = 1 ' prepend the year `
or

`dic(arr(i,1) & mid(ws.Name,3)) = 1 ' postfix the year ` Reply by xrj
Member Avatar
Topic by Divinedar_1 in Software Development
Assuming 'lr' is the last populated row it could be `lr = .UsedRange.rows.count` instead of .cells.find(...
In any case you could change line #21 to:
`dic(mid(ws.Name,3) & arr(i,1)) ' prepend the year '`
or
`dic(arr(i,1) & mid(ws.Name,3)) ' postfix the year '`
depending on the sort preference
in this manner … Reply by xrj
Member Avatar
Ok I have a workbook that have 5 worksheets for a 5 year span. On each of the worksheets are there is a list of countries that make up the combobox (which works perfectly). On my userform I have a frame on the userform that represent each worksheet.

**My problem … Topic by Divinedar_1 in Software Development
Member Avatar
xrj 139 Replied To a Post in ATM machine
Topic by Krisrei in Programming
I'm not sure if each time can be a withdraw of 1 unit, but in that case, calling anotherTransct() from menu(), then menu() from anotherTransact() and repeating this same process enough times, there could be a stack overflow. Reply by xrj
Member Avatar
xrj 139 Began Watching ATM machine
Hey guys! help me out, i'm really out of ideas, how can i save the datas i inputed to have a rotation of value , like the computation in the withdraw, when i 1st use the withdraw or deposit, it computes, yes but when the 2nd time i use it, … Topic by Krisrei in Programming
Member Avatar
xrj 139 Replied To a Post in Calculating Entropy Question (C++)
Topic by Mike_51 in Software Development
Remove the extra `Entropy` from line #48 to: `cout << "The Entropy is: \t" << e << " Kj/(Kg.K)" << endl;` Reply by xrj
Member Avatar
xrj 139 Began Watching Calculating Entropy Question (C++)
Hello, all.

I am trying to calculate entropy, and I cannot get the calculations correct, or match the results with the assigned if-statements. I get a number that differentiates a bit from the answer that I want. So far, this is my code:



#include <iostream>
using namespace std;
float Entropy(float … Topic by Mike_51 in Software Development
Member Avatar
Here I present a WebSite containing just Default.aspx.
Current snippet code has to do with coloring text in an input field of a web page. The input field is an editable DIV HTML element.
While the user writes, there is a partial post (an XMLHttpRequest) to the server. Then the … Topic by xrj in Software Development
Member Avatar
Here I present a WebSite containing just Default.aspx.
Current snippet code has to do with coloring text in an input field of a web page. The input field is an editable DIV HTML element.
While the user writes, there is a partial post (an XMLHttpRequest) to the server. Then the … First Post in Topic by xrj in Software Development
Member Avatar
Here I present a WebSite containing just Default.aspx.
Current snippet code has to do with coloring text in an input field of a web page. The input field is an editable DIV HTML element.
While the user writes, there is a partial post (an XMLHttpRequest) to the server. Then the … Topic by xrj in Software Development
Member Avatar
xrj 139 Replied To a Post in Table with Angular
Topic by davy_yg in Web Development
Type in Google:

w3schools customers.php
The first link appeared to have:

{ "records":[ {"Name":"Alfreds Futterkiste","City":"Berlin","Country":"Germany"}, {"Name":"Ana Trujillo Emparedados y helados","City":"México D.F.","Country":"Mexico"}, {"Name":"Antonio Moreno Taquería","City":"México D.F.","Country":"Mexico"}, {"Name":"Around the Horn","City":"London","Country":"UK"}, {"Name":"B's Beverages","City":"London","Country":"UK"}, {"Name":"Berglunds snabbköp","City":"Luleå","Country":"Sweden"}, {"Name":"Blauer See Delikatessen","City":"Mannheim","Country":"Germany"}, {"Name":"Blondel père et fils","City":"Strasbourg","Country":"France"}, {"Name":"Bólido Comidas preparadas","City":"Madrid","Country":"Spain"}, {"Name":"Bon app'","City":"Marseille","Country":"France"}, {"Name":"Bottom-Dollar Marketse","City":"Tsawassen","Country":"Canada"}, {"Name":"Cactus Comidas para llevar","City":"Buenos … Reply by xrj
Member Avatar
xrj 139 Began Watching Table with Angular

Hello,

I am trying to follow the following tutorials:

https://www.w3schools.com/angular/angular_tables.asp

<div ng-app="myApp" ng-controller="customersCtrl">

<table>
<tr ng-repeat="x in names">
<td>{{ x.Name }}</td>
<td>{{ x.Country }}</td>
</tr>
</table>

</div>

<script>
var app = angular.module('myApp', []);
app.controller('customersCtrl', function($scope, $http) {
$http.get("customers.php")
.then(function (response) {$scope.names = response.data.records;});
});
</script>

It produces a customer table. … Topic by davy_yg in Web Development
Member Avatar
xrj 139 Began Watching Function Not Working
Dear Friends,

Good Day,

I am facing an issue in one of the functions the code is given below if someone can help on this actually this function is supposed to check the work ordewr number if it's nulll then it is suppose to take default value as 4999 and … Topic by Naveed_786 in Software Development
Member Avatar
xrj 139 Replied To a Post in Function Not Working
Topic by Naveed_786 in Software Development
Try the following

If retVal IsNot DBNull.Value Then
retVal += 1
Else
retVal = 4999
End If Reply by xrj
Member Avatar
xrj 139 Replied To a Post in Notice: Undefined index: username in line 72
Topic by Subashan in Web Development
Try changing line #11 to:

$query = "SELECT username FROM user_details WHERE username='"+$username+"'"; Reply by xrj
Member Avatar

<body class="bg-dark"> <div class="container"> <div class="card card-login mx-auto mt-5"> <div class="card-header">Change Password</div> <div class="card-body"> <form method="post" action="change-password.php"> <div class="form-group"> <label for="username">Username</label> <input class="form-control" id="username" type="text" name="username" aria-describedby="nameHelp" placeholder="Enter username" required> </div> <div class="form-group"> <label for="New Password">New Password</label> <input class="form-control" id="newpass" type="text" name="newpass" placeholder="Enter new password" required> </div> <div class="form-group"> <label … Topic by Subashan in Web Development
Member Avatar
xrj 139 Replied To a Post in Authentication is required for relay
Topic by Blueie in Web Development
If you want to be sure 100 percent, why not set a flag pending confirmation while sending an email to the user to confirm the address? Reply by xrj
Member Avatar
xrj 139 Began Watching Authentication is required for relay
Hello

I have a Web page here: http://www.dimadayoub.net/forgot.aspx for users who have forgotten their password.

When I type in the email address of a user who I know exists as an entry in the MS Access database, I get the following
error:

**Mailbox unavailable. The server response was: Authentication is … Topic by Blueie in Web Development
Member Avatar
xrj 139 Replied To a Post in I failed this code challenge design
Topic by Tom_33 in Software Development
I'm not a Visual Basic advocate, I just use VBasic and like it because I code with it. Here is a 'workaround' to generate a sequence of integers and iterate through the sequence:

Module Module1
Sub Main()
Dim oRange As New Range(1, 100)
For Each r In oRange
Console.WriteLine(r.ToString)
Next … Reply by xrj
Member Avatar
xrj 139 Replied To a Post in I failed this code challenge design
Topic by Tom_33 in Software Development
Perhaps, array can do the work of Java's IntStream. For instance, to square a sequence of numbers:

Sub Main()
Dim arr() As Int32 = {2, 5, 6, 8, 3}
Dim square = arr.Select(Function(x) x ^ 2)
For i As Int32 = 0 To square.Count - 1
Console.WriteLine(square(i).ToString)
Next
Console.ReadLine()
End … Reply by xrj
Member Avatar
xrj 139 Replied To a Post in I failed this code challenge design
Topic by Tom_33 in Software Development
I am almost new to lambda expressions, but thanks to you, I could write the same code in VB.Net:

Module Module1

Dim rules As New List(Of Func(Of Int32, String)) From {
Function(x) IIf(x Mod 15 = 0, "BAZ", ""),
Function(x) IIf(x Mod 5 = 0, "BAR", ""),
Function(x) IIf(x Mod … Reply by xrj
Member Avatar
xrj 139 Began Watching I failed this code challenge design
I failed this coding challenge because my solution "does not scale for new divisors and iterations"

I think it is actually a design (pattern) question, and would very much appreciate if anyone can describe a good high level solution (eg class relationships).

Problem:
Write a program that will iterate though … Topic by Tom_33 in Software Development
Member Avatar
Topic by Arnold_7 in Programming
Your language uses "," as decimal separator and "." as thousand separator and that is why instead of retrieving 1/4 (=0.25), `CDbl` is getting 25. Use `double.parse` instead, setting the NumberFormat you need:


Dim ni As Globalization.NumberFormatInfo = Globalization.CultureInfo.CurrentCulture.NumberFormat.Clone
ni.NumberDecimalSeparator = "."
tara = Double.Parse(lblindicador2.Text, ni)
PB = Double.Parse(lblindicador.Text, ni) Reply by xrj
Member Avatar
Ingreso una operación donde ingreso 0.25 pero me da por respuesta 25.0 , por lo tanto no puedo guardarlo en la base de datos

Private Sub btningresar_Click(sender As Object, e As EventArgs) Handles btningresar.Click
tara = CDbl(LblIndicador2.Text)
PB = CDbl(lblindicador.Text)
'Calcular el peso:
PN = Convert.ToDouble(PB - tara) Topic by Arnold_7 in Programming
Member Avatar
xrj 139 Replied To a Post in VB.net Error: cmd.ExecuteNonQuery
Topic by maharaskal in Software Development
What an old thread, isn't it? Reply by xrj
Member Avatar
xrj 139 Began Watching VB.net Error: cmd.ExecuteNonQuery
Hi Guys,

im facing problem at cmd.ExecuteNonQuery()
kindly correct me wer is the mistake? n how to correct?

Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
Dim sqlinsert As String
' We use the INSERT statement which tells our program to add the information
' from … Topic by maharaskal in Software Development