Community Member
Member Avatar
Topic by josh_4 in Programming
What do you mean by a "slow" machine? Anyway verify the path of the images. If the images are not found there will not be no message unless you add a line after line number 95, for example `If i = -1 AndAlso not IO.File.Exists(path) Then msgbox("file not found: "+path) Reply by xrj
Member Avatar
Topic by JModak in Software Development
Or you can change current's thread date pattern:

Dim newCulture As System.Globalization.CultureInfo =
System.Threading.Thread.CurrentThread.CurrentCulture.Clone()
newCulture.DateTimeFormat.ShortDatePattern = "dd-MM-yyyy"
newCulture.DateTimeFormat.DateSeparator = "-"
System.Threading.Thread.CurrentThread.CurrentCulture = newCulture
Dim sDate As String = Now.ToString Reply by xrj
Member Avatar
Topic by JModak in Software Development
Take a look [here](https://docs.microsoft.com/es-es/dotnet/standard/base-types/custom-date-and-time-format-strings)

Dim dt As DateTime = Now
Dim sDate As String = dt.ToString("yyyy-MM-dd") Reply by xrj
Member Avatar
hello sir
how can I get my system short date format in a label in vb. net. I try this code :

Label1.Text = System.Globalization.CultureInfo.CurrentUICulture.DateTimeFormat.ShortDatePattern()

but show wrong data. all time show "M/d/yyyy" format.

I change it(to "dd/MM/yyyy") manually and by coding result is same("M/d/yyyy") please help me.....


For Change … Topic by JModak in Software Development
Member Avatar
xrj 148 Replied To a Post in Illegal start of expression in my toString
Topic by Abdullah_21 in Software Development
It has to do with the algorithm. The usual method for parsing mathematical expressions is the shunting yard algorithm. You may consider reading it's description [here](https://en.wikipedia.org/wiki/Shunting-yard_algorithm). Reply by xrj
Member Avatar
xrj 148 Replied To a Post in Illegal start of expression in my toString
Topic by Abdullah_21 in Software Development
The code is throwing no error. Seems as if you haven't compiled the new code. You should execute "javac" from the command prompt, have you? Reply by xrj
Member Avatar
xrj 148 Replied To a Post in Illegal start of expression in my toString
Topic by Abdullah_21 in Software Development
You are right @JamesCherill, that's the same feeling I'm getting: copy and paste. Reply by xrj
Member Avatar
xrj 148 Replied To a Post in Illegal start of expression in my toString
Topic by Abdullah_21 in Software Development
If you set the code as I send it to you, you won't have that problem with none of those examples. Reply by xrj
Member Avatar
xrj 148 Replied To a Post in Illegal start of expression in my toString
Topic by Abdullah_21 in Software Development
You just have to proceed similarly as for the "+" and "-" operators. Now, the code is:


import java.util.ArrayList;
import java.util.Scanner;
import static java.lang.Integer.*;
import static java.lang.System.*;

public class ExpressionSolver
{
int answer;
String expString;
ArrayList<String> exp;
public ExpressionSolver(String s)
{
setExpression(s);
}

public void setExpression(String s)
{
expString = … Reply by xrj
Member Avatar
xrj 148 Replied To a Post in Illegal start of expression in my toString
Topic by Abdullah_21 in Software Development
I've only take a look to addition and substraction and made some modifications. I hope you understand it and leave up to you the other operators.

import java.util.ArrayList;
import java.util.Scanner;
import static java.lang.Integer.*;
import static java.lang.System.*;

public class ExpressionSolver
{
int answer;
String expString;
ArrayList<String> exp;
public ExpressionSolver(String s)
{ … Reply by xrj
Member Avatar
Hello everyone,

I am having trouble with my program its solving expressions and when I compile it I get a "Illegal start of expresson" line in my output. I am using Jgrasp as my softwear. May I ask to reveiw my code and see on what I did wrong? I … Topic by Abdullah_21 in Software Development
Member Avatar
Featured xrj 148 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 148 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 148 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 148 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 148 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 148 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 148 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 148 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 148 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 148 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 148 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 148 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 148 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