Enhancing water pressure in our home using Solar Energy
#DIY Solar project enhancing water pressure in our home#khartoum pic.twitter.com/owIniJ5JRi
— Mohammed Mahgoub (@mmahgoub) December 26, 2019
Use Flutters StatefulBuilder to update state of a ModalBottomSheet
You can use Flutter's StatefulBuilder to wrap your ModalBottomSheet as follows:
showModalBottomSheet(
context: context,
builder: (context) {
return StatefulBuilder(
builder: (BuildContext context, StateSetter setState /*You can rename this!*/) {
return Container(
height: heightOfModalBottomSheet,
child: RaisedButton(onPressed: () {
setState(() {
heightOfModalBottomSheet += 10;
});
}),
);
});
});
Please note that the new setState will override your main widget setState but sure you can just rename it so you would be able to set state of your parent widget and the modal's
showModalBottomSheet(
context: context,
builder: (context) {
return StatefulBuilder(
builder: (BuildContext context, StateSetter setState /*You can rename this!*/) {
return Container(
height: heightOfModalBottomSheet,
child: RaisedButton(onPressed: () {
setState(() {
heightOfModalBottomSheet += 10;
});
}),
);
});
});
This was originally posted as an answer to a question on Stackoverflow but I think it's worth sharing here also!
تحويل أرقام المبالغ المالية إلى كلمات عربية مكتوبة (التفقيط)
قمت مؤخرا بنشر اسكربت على npm لتحويل أرقام المبالغ المالية إلى كلمات عربية مكتوبة أو ما يسمى بالتفقيط للأستخدام مع تطبيقات nodejs.
للتنزيل:
npm install tafgeetjs
للأستخدام:
Tafgeet = require('tafgeetjs');
var stringText = new Tafgeet('556563.20', 'SDG').parse();
لمعلومات أكثر راجع رابط github
Ionic 2 + Parse Server: Login with Google Plus
I am working on a hybrid mobile app using Ionic and Parse Server as a back-end and for the past three days I’ve been trying to implement Google login with the native Google Plus plugin. It was a rough ride!
Error 10
“The application is misconfigured. This error is not recoverable and will be treated as fatal. The developer should look at the logs after this to determine more actionable information.” -Google Common API Documentation
If you are facing error 10 with the native Google Plus plugin you should check your certificate's configuration and make sure your APK is signed. In my case I was using Ionic cloud service to build my project, for some strange reason the downloaded APK from Ionic wasn’t signed. I had to build and sign my project locally using `ionic cordova build android`
command, I was still having the same problem (Unable to sign the APK)! Then I had to change keystore password to a new one, the old password had special characters and I am not quite sure if this was the problem.
Parse Server
After I get rid of error 10 I needed to enable social login using Google in Parse Server. However, The documentation is really lacking in the regard, they show you how to login using Facebook and Twitter but no instructions whatsoever about Google. Although Google login is enabled by default in Parse.
In Ionic and after you get the payload from Google Plus plugin you will need to create a new object with the following format:
let authData;
this.googlePlus.login({}).then( res => {
authData = { authData:{id: res.userId, access_token:res.accessToken,id_token: res.idToken}};
let user = new this.Parse.User();
return user._linkWith('google', authData);
});
Then in the back-end Parse Server should be able to pass authData to Google API to make sure they are valid.
Entrepreneurship Thrives amid Challenges
This article is originaly written for Andariya back in April 2015
Cut off from the world
Here is an interesting fact; the Internet was commercially introduced in Sudan in 1996, just one year before American president Bill Clinton imposed sanctions on the government of Sudan (in November 1997). The sanctions prevented the use of new technologies produced by American and many international companies, and forbade any financial relations between American and Sudanese banks.
While internet-based services were booming in the U.S, they were brutally shut down before they properly got underway in Sudan; we were cut off from that boom in just a year! With this disconnect, Sudanese people have largely been in the dark about the growing importance of internet products and services, and how they can improve daily lives. How would they? Sudanese businesses had no chance of creating a success story for internet driven businesses. Neither were they able to replicate the powerful experiences breaking through internationally, due to the severe lack of standard internet infrastructure, such as access to payment gateways.
The struggle
By the time the telecommunications industry began exercising considerable effect on communities and businesses, mobile phones were becoming common. Similarly, cheap dial-up internet connections raised eyebrows about the potential and impact of the internet on businesses. This curiosity sparked the creation of Softwex. As a small web development agency, we struggled to do the simple task of registering domain names and setting up websites and email accounts for our clients. At that time, if someone needed to register a domain, they had to have a credit card (Visa or MasterCard) or a Paypal account- which we did not have access to with Sudanese bank accounts. Paying the necessary fees was a continuous struggle, as domain and website fees tend to require annual reactivation fees.
Opportunity to bring value
During our quest to make things work, and because we continued to accumulate experience in the internet sphere, we challenged ourselves to solve this problem once and for all. As a business and as individuals we suffered and saw others suffer tremendously from this lack of access to international web services. We saw an opportunity to solve a disabling challenge that affects people living or doing business in Sudan, and to add value to people’s online transactions while sustaining ourselves as a business.
Doing it a little bit different
We had to look out of the box. Until 2011, all hosting companies or web hosting service re-sellers worked in the typical retailer way; people had to walk into technology company offices and request a domain name. Due to inefficiencies, customers usually got their responses days later- and it wasn’t cheap either. We needed to prove that a Sudanese internet-based service could be run holistically and efficiently. It may seem easy, but we had to conquer tough challenges, which many software engineers faced in the past, but were unable to solve. First, we had to develop our online service and try to find a solution for the payment issue.
Reflecting on this task, we settled on finding the simplest solutions that would work, because if we set out to build the ultimate payment solution for a complicated matrix like Sudan, we would be insane with an unrealistic goal. The navigation of the policies and roadblocks is an enormous task requiring resources we did not have at hand; financial, human and networks within the banking sector. As a startup, we could not imagine having the budget or the patience to deal with the looming regulatory madness. Instead we kept it “KISS” (Keep it simple, stupid). We were inspired by the standard telecommunication companies’ scratch-off cards, used by many in Sudan to top-off their phones with credit. We developed and printed our own scratch-off cards and used our friends and business networks to help us with the distribution. We called the service iHost.
Since the launch of “iHost” our company has been growing steadily, and our customer base went from tens to hundreds. We also provided more than a thousand new web hosting and domain registration services and became pioneers in reselling web hosting. Our customers loved our scratch-off cards and they still prefer them over the newly introduced online payment solutions; such as EBS’s payment gateway which supports 27 banks and Bitcoin digital money.
Victory
Bringing our innovative online domain registration and web hosting service to the local market on the 5th of September 2011 was a victory. Watching the tech community’s reactions was thrilling, as it prompted us to continue improving the service. It also brought us a new investor. This victory was against the sanctions and it broke us out of the cage that American foreign policies put us in. Now every Sudanese- whether a business owner or just a college student- is able to make their voice heard through the creation of a website. Reflecting on when I was college student in 1999, the ability to buy a domain with the Sudanese Pound was just a dream, but now it is a reality for this generation. Softwex is now the top company in terms of market share, clinching 30.4% in the first quarter of 2015.
Even after the U.S eased its sanctions on Sudan by lifting some restrictions on technology, people are still unable to register domain names or benefit from web hosting services provided by a global or U.S company, because they’re restricted from paying for those services.
Apps and online stores
People call us entrepreneurs; we’re not so sure! We are just a team driven by what we love doing and motivated by the possibilities of creating great web and mobile services for our people. As a company, we always strive to bring value to the services we build and communities we serve. By October 2013, we were the first company in Sudan to implement the newly introduced online payment solution by EBS, and the first to accept Bitcoin payments. We are also using our experience and knowledge to work on a new mobile application, which attempts to dissect and help solve a part of Khartoum’s transportation problem. We’re satisfied by the prototype, but still have some technical and non-technical problems to solve before releasing the application.
At the end of 2014, we introduced ElBiruni, an online store that sells Sudanese books to help Sudan based publishers get more exposure on the global market. We collaborated with shipping companies like DHL and Aramex to integrate with their shipping platform, streamlining the shipping process and reducing the chance of human errors.
That was yet another venture where we challenged ourselves to explore new web and mobile technologies, never afraid to try new resources. The real reward from all this exploration and testing is our customer feedback. When a new customer sends us a message filled with excitement, about how we have helped them avoid the agony and struggle of asking people outside Sudan for help, these messages literally bring tears to our eyes and refuel our energy to push forward with better web solutions tailored to the Sudanese people and market.
Update: Since the article has been witten we had to pull the plug off Elbiruni.com