Alix
Alix
Explore posts from servers
CDCloudflare Developers
Created by Alix on 9/12/2024 in #pages-help
building pages failed
18:30:12.333 Using v2 root directory strategy
18:30:12.359 Success: Finished cloning repository files
18:30:13.985 Checking for configuration in a wrangler.toml configuration file (BETA)
18:30:13.986
18:30:14.102 No wrangler.toml file found. Continuing.
18:30:14.250 Detected the following tools from environment: npm@9.6.7, nodejs@18.17.1
18:30:14.251 Installing project dependencies: npm clean-install --progress=false
18:30:15.502 npm ERR! code EBADENGINE
18:30:15.503 npm ERR! engine Unsupported engine
18:30:15.503 npm ERR! engine Not compatible with your version of node/npm: fxfactorynewsdashboard@0.0.1
18:30:15.503 npm ERR! notsup Not compatible with your version of node/npm: fxfactorynewsdashboard@0.0.1
18:30:15.503 npm ERR! notsup Required: {"node":">=18.18.0"}
18:30:15.504 npm ERR! notsup Actual: {"npm":"9.6.7","node":"v18.17.1"}
18:30:15.505
18:30:15.505 npm ERR! A complete log of this run can be found in: /opt/buildhome/.npm/_logs/2024-09-12T16_30_14_959Z-debug-0.log
18:30:15.515 Error: Exit with error code: 1
18:30:15.515 at ChildProcess.<anonymous> (/snapshot/dist/run-build.js)
18:30:15.515 at Object.onceWrapper (node:events:652:26)
18:30:15.515 at ChildProcess.emit (node:events:537:28)
18:30:15.515 at ChildProcess._handle.onexit (node:internal/child_process:291:12)
18:30:15.526 Failed: build command exited with code: 1
18:30:16.556 Failed: error occurred while running build command
18:30:12.333 Using v2 root directory strategy
18:30:12.359 Success: Finished cloning repository files
18:30:13.985 Checking for configuration in a wrangler.toml configuration file (BETA)
18:30:13.986
18:30:14.102 No wrangler.toml file found. Continuing.
18:30:14.250 Detected the following tools from environment: npm@9.6.7, nodejs@18.17.1
18:30:14.251 Installing project dependencies: npm clean-install --progress=false
18:30:15.502 npm ERR! code EBADENGINE
18:30:15.503 npm ERR! engine Unsupported engine
18:30:15.503 npm ERR! engine Not compatible with your version of node/npm: fxfactorynewsdashboard@0.0.1
18:30:15.503 npm ERR! notsup Not compatible with your version of node/npm: fxfactorynewsdashboard@0.0.1
18:30:15.503 npm ERR! notsup Required: {"node":">=18.18.0"}
18:30:15.504 npm ERR! notsup Actual: {"npm":"9.6.7","node":"v18.17.1"}
18:30:15.505
18:30:15.505 npm ERR! A complete log of this run can be found in: /opt/buildhome/.npm/_logs/2024-09-12T16_30_14_959Z-debug-0.log
18:30:15.515 Error: Exit with error code: 1
18:30:15.515 at ChildProcess.<anonymous> (/snapshot/dist/run-build.js)
18:30:15.515 at Object.onceWrapper (node:events:652:26)
18:30:15.515 at ChildProcess.emit (node:events:537:28)
18:30:15.515 at ChildProcess._handle.onexit (node:internal/child_process:291:12)
18:30:15.526 Failed: build command exited with code: 1
18:30:16.556 Failed: error occurred while running build command
17 replies
CC#
Created by Alix on 11/27/2023 in #help
await Shell.Current.GoToAsync($"///MainPage"); not working
When i try to await Shell.Current.GoToAsync($"///MainPage"); I am getting System.NullReferenceException: 'Object reference not set to an instance of an object.' Microsoft.Maui.Controls.Shell.Current.get returned null.
6 replies
CC#
Created by Alix on 11/13/2023 in #help
error about datareader
When trying to insert some fake clients into my database i am getting this error Error DBConnectThere is already an open DataReader associated with this Connection which must be closed first. when i search for this error i get redirect to the sdk code. So does this mean that there is a bug in the sdk or am i doing something wrong??
c#
private void AddFakeClient()
{
string clientName = GenerateRandomClientName();
string clientEmail = GenerateRandomClientEmail();
string clientCompany = GenerateRandomClientCompany();
Debug.WriteLine("opening create db");

using (DBConnect db = new DBConnect())
{
MySqlDataReader userRow = null;

try
{
db.Open();
Debug.WriteLine("opening create query");
string selectQuery = "SELECT id, username FROM users";
userRow = db.ExecuteReader(selectQuery);

var Session = Application.Current.Resources;

if (Session["username"] != null && Session["id"] != null)
{
username = Session["username"].ToString();
foreignid = Session["id"].ToString();
}
else
{
Debug.WriteLine("Session username or id is null.");
return;
}

if (userRow.HasRows)
{
while (userRow.Read())
{
string userId = userRow["id"].ToString();
string userName = userRow["username"].ToString();
string insertQuery = "INSERT INTO clients (Client, email, Company, foreignid) VALUES ('" +
clientName + "', '" + clientEmail +
"', '" + clientCompany + "', '" + foreignid + "')";
db.ExecuteNonQuery(insertQuery);
}
}
else
{
DisplayAlert("Error", "Account not detectable.", "OK");
}
}
catch (Exception ex)
{
DisplayAlert("Error", $"{ ex.Message }", "OK");
}
finally
{
Debug.WriteLine("closing create query");
userRow?.Close();
Debug.WriteLine("closing create db");
db.Close();
}
}
}
c#
private void AddFakeClient()
{
string clientName = GenerateRandomClientName();
string clientEmail = GenerateRandomClientEmail();
string clientCompany = GenerateRandomClientCompany();
Debug.WriteLine("opening create db");

using (DBConnect db = new DBConnect())
{
MySqlDataReader userRow = null;

try
{
db.Open();
Debug.WriteLine("opening create query");
string selectQuery = "SELECT id, username FROM users";
userRow = db.ExecuteReader(selectQuery);

var Session = Application.Current.Resources;

if (Session["username"] != null && Session["id"] != null)
{
username = Session["username"].ToString();
foreignid = Session["id"].ToString();
}
else
{
Debug.WriteLine("Session username or id is null.");
return;
}

if (userRow.HasRows)
{
while (userRow.Read())
{
string userId = userRow["id"].ToString();
string userName = userRow["username"].ToString();
string insertQuery = "INSERT INTO clients (Client, email, Company, foreignid) VALUES ('" +
clientName + "', '" + clientEmail +
"', '" + clientCompany + "', '" + foreignid + "')";
db.ExecuteNonQuery(insertQuery);
}
}
else
{
DisplayAlert("Error", "Account not detectable.", "OK");
}
}
catch (Exception ex)
{
DisplayAlert("Error", $"{ ex.Message }", "OK");
}
finally
{
Debug.WriteLine("closing create query");
userRow?.Close();
Debug.WriteLine("closing create db");
db.Close();
}
}
}
`
16 replies
CC#
Created by Alix on 9/24/2023 in #help
❔ replace oldblockscollection with new blockscollection
hey since my sorting is finished i want to make it work in my ui
private void SortBlocks(object sender, RoutedEventArgs e)
{
int currentBlockCount = blocksCollection.Count;

if (currentBlockCount > 0)
{
for (int i = 0; i < currentBlockCount; i++)
{
var block = blocksCollection[i];
Console.WriteLine($"i ={i}");

Console.WriteLine(((SolidColorBrush)block.Background).Color.ToString());
for (int j = i + 1; j < currentBlockCount; j++)
{
var blockinner = blocksCollection[j];
if (((SolidColorBrush)blockinner.Background).Color == ((SolidColorBrush)block.Background).Color)
{
if (blockinner == blocksCollection[i + 1])
{
break;
}
else
{
List<TextBlock> blocks = new List<TextBlock>();
for (int k = i + 1; k < j; k++)
{
blocks.Add(blocksCollection[k]);
}
blocksCollection[i + 1] = blocksCollection[i];
int m = 0;
for (int l = i + 2; l < j + 1; l++)
{
blocksCollection[l] = blocksCollection[m];
m++;
}
}
}
}
}
}
else
{
MessageBox.Show("No blocks to sort.");
}
}
private void SortBlocks(object sender, RoutedEventArgs e)
{
int currentBlockCount = blocksCollection.Count;

if (currentBlockCount > 0)
{
for (int i = 0; i < currentBlockCount; i++)
{
var block = blocksCollection[i];
Console.WriteLine($"i ={i}");

Console.WriteLine(((SolidColorBrush)block.Background).Color.ToString());
for (int j = i + 1; j < currentBlockCount; j++)
{
var blockinner = blocksCollection[j];
if (((SolidColorBrush)blockinner.Background).Color == ((SolidColorBrush)block.Background).Color)
{
if (blockinner == blocksCollection[i + 1])
{
break;
}
else
{
List<TextBlock> blocks = new List<TextBlock>();
for (int k = i + 1; k < j; k++)
{
blocks.Add(blocksCollection[k]);
}
blocksCollection[i + 1] = blocksCollection[i];
int m = 0;
for (int l = i + 2; l < j + 1; l++)
{
blocksCollection[l] = blocksCollection[m];
m++;
}
}
}
}
}
}
else
{
MessageBox.Show("No blocks to sort.");
}
}
35 replies
CC#
Created by Alix on 9/18/2023 in #help
❔ update observeral collection into ui
No description
18 replies