|
Here's one that should be challenging enough for you: study Jing Lu's ReoScript implementation and how he integrates it into the ReoGrid spreadsheet in a way the script can interact with run-time C# object instances.
Note: at one point, Jing made ReoGrid closed source; a year or so later, he changed it back to open-source.
ReoGrid : [^], [^]; also on github. ReoScript : [^], [^]
Then create a DSL<=>C# generator driven by your parsers.
@jing-lu
cheers, Bill
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali
|
|
|
|
|
That's not a bad idea. I'll check it out
Real programmers use butterflies
|
|
|
|
|
Alex Maitland could definitely do with a hand on the CEFSharp project.
He's been struggling a lot to keep up with issues and such like lately since he became a dad for the second time
I help where I can, but I'm run off my feet at the moment with other stuff, so I'm sure any volunteers to help get through the issue backlog would be greatly appreciated.
|
|
|
|
|
Ever happened to you that everything worked just fine for you, you take a back up, make changes and it refuses to work as it is intended to?
I am currently working on a Flutter app, which worked just perfectly! I committed the recent changes,
$ git log -1
commit 6441c90ee1c010362eb81740184fb50d900b46a1 (HEAD -> master, gitlab/master)
Author: Afzaal Ahmad Zeeshan <my-email@example.com>
Date: Thu Jan 30 02:49:38 2020 +0500
Contacts and lists now showing the phone numbers are showing too.
The "past me" is telling me that database integration worked and SQLite receives all the records from the device for app usage. That is where I paused the development last night and committed the changes. Today I just resumed the development, and voila. The most basic of the code happens to not work.
var contacts = await ContactsService.getContacts();
if(contacts.length == 0) {
print("[INFO] Device does not have any contacts.");
return;
}
print("[INFO] Loaded ${contacts.length} contacts, attempting to save...");
var database = await $FloorAppDatabase.databaseBuilder(MyApp.dbName).build();
List<Recipient> newContacts = [];
contacts.forEach((contact) async {
var _contact = await database.recipientDao.findRecipientById(contact.identifier);
if(_contact == null) {
newContacts.add(Recipient(contact.identifier, contact.displayName));
}
});
if(newContacts.length > 0) {
await database.recipientDao.insertAllRecipients(newContacts);
print("[INFO] Added ${newContacts.length} contacts.");
}
The code attempts to save the contacts from a device to a device-only database. The _contact is always null , newContacts always gets a new element for contact (since there is no record in the database). But as soon as it hits the if(newContacts.length > 0) { line, the length of the array drops to zero.
There isn't any closure (Dart is JavaScript of Google) in action, awaits are applied just fine to pause the execution at IO-bound tasks, but still, it simply refuses to work.
Interesting thing is that this is the same code I committed last night!
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Then maybe a more suitable name than "Flutter" would be "Stutter"
|
|
|
|
|
Afzaal Ahmad Zeeshan wrote: Ever happened to you that everything worked just fine for you, you take a back up, make changes and it refuses to work as it is intended to?
Today after lunch. Very annoying.
Afzaal Ahmad Zeeshan wrote: Interesting thing is that this is the same code I committed last night!
I feel your pain.
My code hasn't changed but now it fails to build.
There's a transform script working on the app.config and the transform script (created by another dev) is failing all of a sudden.
So, now instead of focusing on my code I have to figure out why the transform script is failing.
I'm fixing the _hammer_ so I can nail the boards together. argh!!
|
|
|
|
|
Quote: So, now instead of focusing on my code I have to figure out why the transform script is failing. True, such as a code-block it is. I have personally felt that among all the open-source frameworks, Flutter has the most open issues on GitHub. And these issues are not going anywhere.
Issues · flutter/flutter · GitHub
Even if I don't mess up with anything, Google would update something and it just wouldn't work.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Just flag it: "Won't fix: works on my machine sometimes".
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
contacts.forEach((contact) async {
var _contact = await database.recipientDao.findRecipientById(contact.identifier);
if(_contact == null) {
newContacts.add(Recipient(contact.identifier, contact.displayName));
}
});
if(newContacts.length > 0) {
Never used Dart before, but everything in my being is telling me that looks dangerous if forEach isn't a blocking function. Some quick googling tells me you may want to try Future.forEach.
|
|
|
|
|
Yep, you're right. What I am thinking about this is something like:
Future<void> processContacts(List<Contact> contacts) async {
for (var contact in contacts) {
if(await database.recipientDao.findRecipientById(contact.identifier) == null) {
}
}
} Future.forEach follows the similar approach to call the function that returns a Future , and await on it internally.
Who knows, if I change the code to this approach, the problem goes away.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
I don't know enough about Dart to say. It depends on what you're looking to accomplish. If you want sequential but non-blocking processing of the list, yea I think it should work as long as you await on that function.
EDIT: Removed a sentence, been reading up on asynchronous stuff in Dart and it's the same as C# where it doesn't allow await inside of a non-async function.
|
|
|
|
|
Afzaal Ahmad Zeeshan wrote: Interesting thing is that this is the same code I committed last night!
The fact that it didn't work before and did work now would seriously concern me.
Whoops I understood your post backward
Anyway, what I would consider is that your environment changed. See if there were any other commits or changes to the server?
Real programmers use butterflies
|
|
|
|
|
Quote: what I would consider is that your environment changed Nope, it is all same.
The file is just 50 lines of code and using the tip of Jon, I am considering a rewrite for this service, most probably that would spot any bugs if there are in my code.
A big problem with Flutter is that it too often requires a flutter clean to remove the clutter, most problems were solved that way, but not this.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
No, no, that won't do.
The usual complaint in the forum is that it worked yesterday, and nothing changed and it just stopped working.
You can't just admit you broke it like that.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Quote: is that it worked yesterday, and nothing changed and it just stopped working. Not yesterday, just one commit ago.
Nothing changed, restarted the emulators to try everything with fresh app installation and it stopped working. I did a hard reset on my Git, but still the same.
The take away is, always test the code from the beginning and then commit. Sadly, I did not have the tests written to verify these services (contacts storage and database) so this is what I need to work on.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Afzaal Ahmad Zeeshan wrote: Nothing changed Exactly what I wanted to hear
Yes, cherry picking, and not meant to be taken too seriously.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Any UEFI, TPM, Windows 10 wizards around? Maybe a link to a suggested Microsoft discussion forum...
All I'm trying to do is clone old disk drive to new SSD. I've done it in a disk duplicator, I've used multiple target SSDs, and tried multiple s/w packages - Macrium Reflect, AEOMI (or whatever), Acronis 2020. Nothing yields a bootable UEFI disk.
My working theory is that when you install Windows 10, something is registered in the TPM module on the motherboard. Read about TPM. *try* and find info on how Windows 10 uses it. Anyway, I think the keys mismatch, and Windows 10 refuses to run. Updating some past posts on other sites, I came across this post:
Quote: It is recommended to put the new drive in the laptop first, and connect the old drive via USB. Otherwise you will may not be able to boot from the new cloned drive, as Acronis True Image will apply a bootability fix to the new disk and adjust the boot settings of the target drive to boot from USB. If the new disk is inside the laptop, the boot settings will be automatically adjusted to boot from internal disk. As such, hard disk bays cannot be used for target disks. For example, if you have a target hard disk (i.e. the new disk to which you clone, and from which you intend to boot the machine) in a bay, and not physically inside the laptop, the target hard disk will be unbootable after the cloning.
What irritates the heck out of me is that there is no "why" explanation. Why do I have to do it this way?
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
Given the amount of time you spent, wouldn't it be better to just repartition the new drive for UEFI and do a clean Windows install?
|
|
|
|
|
Sacrilege!
Actually my laptop is fine, thank goodness. But, think about what you are saying, and comments like yours piss me off. Please don't take that the wrong way, I mean it with no malice. This is what Microsoft, Dell, etc say all the time. wtf should I have to re-install an OS to upgrade a disk? Something is seriously off the rails.
For the record, this is a family IT support issue. In my research, it's a common plague, and now I want to know what the elephant is going on. It's the engineer in me.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
Quote: wtf should I have to re-install an OS to upgrade a disk Good luck with your approach! I have all the software tools to prep a new drive and once the drive is installed, it takes me less than 20 minutes to get Windows 10 activated, up and running. (That is before the updates start.)
|
|
|
|
|
I appreciate what you are saying. And I could go your route. But I'm trying to understand why it won't boot. It's amazing how little information is out there. Just lots of herky jerky do this and do that.
I'll be sure to follow this thread up.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
Quote: I'll be sure to follow this thread up. I look forward to it!
|
|
|
|
|
Hi,
Put your original hard drive back in and boot into Windows. Then open Windows Defender and navigate to the 'Device Security' tab and disable Secure Boot. You should also probably disable 'Fast Boot'. Go into the UEFI BIOS and disable 'Secure Boot' there too. Now clone the drive.
Then put the cloned drive into your workstation and it should boot. Go back and re-enable Secure Boot.
UEFI Spec is here[^].
Good luck,
-David Delaune
|
|
|
|
|
Well, damn!
I should have figured that out for myself.
Nice one.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Secure boot has caused me a lot of grief with windows updates.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|