April 22, 2022 in Hindi, Technology
April 22, 2022 in Hindi, Technology
April 17, 2022 in News, Technology - 1
एप्पल इस साल सितंबर में अपनी आईफोन 4 सीरीज लॉन्च कर सकती है।
इस रिपोर्ट में पता चला है कि एप्पल आईफोन 4 के साथ सैटलाइट कम्युनिकेशन कनेक्टिविटी दे सकती है।
इसकी मदद से उपभोक्ता सिम का नेटवर्क ना आने पर भी कॉल और मैसेज कर सकेंगे खासकर इमरजेंसी के समय यह फीचर उपभोक्ताओं के लिए काफी मददगार साबित होगा।
April 7, 2022 in Technology, Tips and Tricks
App types cannot be changed. If your app needs products, permissions, or features that are unavailable to its current type you must create a new app with a different type instead.
March 28, 2022 in Technology, Tips and Tricks
Here is an explanation of the crontab format.
# 1. Entry: Minute when the process will be started [0-60]
# 2. Entry: Hour when the process will be started [0-23]
# 3. Entry: Day of the month when the process will be started [1-28/29/30/31]
# 4. Entry: Month of the year when the process will be started [1-12]
# 5. Entry: Weekday when the process will be started [0-6] [0 is Sunday]
#
# all x min = */x
So according to this your 5 8 * * 0 would run 8:05 every Sunday.
30 18 * * * curl URL >/dev/null 2>&1
30 18 * * * curl URL >/dev/null 2>&1
30 18 * 1 * curl URL >/dev/null 2>&1
30 18 * * 1 curl URL >/dev/null 2>&1
Position 1 for minutes, allowed values are 1-60
position 2 for hours, allowed values are 1-24
position 3 for day of month ,allowed values are 1-31
position 4 for month ,allowed values are 1-12
position 5 for day of week ,allowed values are 1-7 or and the day starts at Monday.
crontab -e for edit or add cron/scheduled job
crontab -l for show list
March 28, 2022 in Laravel, Php, Technology, Tips and Tricks
Access-Control-Allow-Origin https://mydomain.com/
added a new middleware
<?php
namespace App\Http\Middleware;
use Closure;
class VerifyAPIAccess
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
if (
!(App::environment('local'))
&& (
!$request->header('access-token')
|| $request->header('access-token') !== env('APP_API_TOKEN')
)
) {
return response()->json(['Message' => 'You do not access to this api.'], 403);
}
return $next($request);
}
}
and then added to my route
Route::group([
'middleware' => [
VerifyAPIAccess::class,
'throttle:60,1'
]
], function () {
// list some routes
});
you could also restrict access by adding throttling which would stop someone from hammering your API, with token or not.
There are probably many approaches. A simple but effective one would be sessions. You can save the user in a session. This way you can also count his Api accesses. As soon as they are larger than allowed, you can block their requests. You also write the block in the session. But pay attention to the session duration. It must be long enough.
But the user with bad intentions can get a new session. To avoid this, you can also put his IP on an internal blacklist for a day.
Note: But an open api is always a point of attack.
Things tried:
passport to protect my routes and then use passport’s CreateFreshApiToken middleware. Protection works fine, unauthorized users are not able to access the routes, however I don’t get laravel_token in my cookies and therefore I can’t get access to that route if I’m not logged in.You cannot stop people from trying to access of publicly visible API. You need to secure the API and only respond to those with the proper access privileges.
March 28, 2022 in Laravel, Php, Technology, Tips and Tricks
I stumbled upon the same problem today and did some debugging. When registering the /login route, Fortify applies the Illuminate\Routing\Middleware\ThrottleRequests:login middleware to it. This means, for every request to that route, the ThrottleRequests middleware will call the RateLimiter instance for that specified key. Apparently, Fortify doesn’t register a RateLimiter for the login key.
Due to the missing key in the $limiters property of the RateLimiter instance, the ThrottleRequests middleware uses its default fallback, which doesn’t handle the edge case “there SHOULD be a rate limiter for that key, but there isn’t.” really well. The $maxAttempts variable is set to 0 and will result in flaky rate limiting behaviour.
I feel like this is a bug in Fortify, because rate limiting is also happening in the \Laravel\Fortify\Actions\EnsureLoginIsNotThrottled action, which is invoked in the \Laravel\Fortify\Http\Controllers\AuthenticatedSessionController controller. I didn’t check this on a fresh Laravel installation, though, so I don’t want to jump to conclusions here.
Anyway, long story short: As a workaround, you can simply register a rate limiter for the “login” key in some of your providers, e. g. AppServiceProvider or AuthServiceProvider:
public function boot()
{
RateLimiter::for("login", function () {
Limit::perMinute(5);
});
}
Edit: I just realized that the rate limiter for the “login” key is indeed provided by Fortify within the FortifyServiceProvider class. If you happen to have a problem similar to the one discussed above, make sure that you added the FortifyServiceProvider class to your providers array in the config/app.php.

source : stackoverflow
March 28, 2022 in Laravel, Technology, Tips and Tricks
When injecting a model ID to a route or controller action, you will often query the database to retrieve the model that corresponds to that ID. Laravel route model binding provides a convenient way to automatically inject the model instances directly into your routes. For example, instead of injecting a user’s ID, you can inject the entire User model instance that matches the given ID.
Laravel automatically resolves Eloquent models defined in routes or controller actions whose type-hinted variable names match a route segment name. For example:
use App\Models\User;
Route::get('/users/{user}', function (User $user) {
return $user->email;
});
Since the $user variable is type-hinted as the App\Models\User Eloquent model and the variable name matches the {user} URI segment, Laravel will automatically inject the model instance that has an ID matching the corresponding value from the request URI. If a matching model instance is not found in the database, a 404 HTTP response will automatically be generated.
Of course, implicit binding is also possible when using controller methods. Again, note the {user} URI segment matches the $user variable in the controller which contains an App\Models\User type-hint:
use App\Http\Controllers\UserController;
use App\Models\User;
// Route definition...
Route::get('/users/{user}', [UserController::class, 'show']);
// Controller method definition...
public function show(User $user)
{
return view('user.profile', ['user' => $user]);
}
March 19, 2022 in Technology
Arduino UNO is the widely used microcontroller board for developing different kind of projects and prototypes. This small development board has all the features of its native IC Atmega328p with additional features. This comes with on board programmer cp2102, so no need to connect external programmer. Arduino Uno board has 12V DC barrel jack which can accept upto 12V but use it for 9V Max. It has onboard LEDs to indicate power. The IC Atmega328p is removable, so if the Atmega IC is not working then it can be replaced with another one.
Arduino Uno Specifications:
March 17, 2022 in News, Only Happened In India, Technology
बिना इंटरनेट वाले सामान्य फोन से भी अब पैसे हस्तांतरित हो सकेंगे। भारतीय रिजर्व बैंक ने मंगलवार को देश के 40 करोड़ फीचर फोन उपयोगकर्ताओं को डिजिटल भुगतान की सौगात देते हुए यूपीआई 123 प सेवा शुरू की।
इस मौके पर रिजर्व बैंक के गवर्नर शक्तिकांत दास ने कहा कि अब तक यूपीआई की सेवा में मुख्य रूप से स्मार्ट फोन पर ही उपलब्ध है, जिसके चलते निचले तबके के लोग इनका इस्तेमाल नहीं कर पा रहे थे।
उन्होंने कहा कि वित्त वर्ष 2021 से 2022 में अब तक यूपीआई लेनदेन क्षेत्र लाख करोड रुपए तक पहुंच गया है, जबकि पिछले वित्त वर्ष में यह आंकड़ा 4100000 करोड रुपए था। आरबीआई के डिप्टी गवर्नर रविशंकर ने कहा कि नई सेवा यूपीआई 123 पे में चार तकनीक अपनाई गई है।
इसमें आईवीआर, आप जैसे कार्य नजदीक से आवाज के आधार पर भुगतान और मिस्ड कॉल का तरीका शामिल है।
इस तरह से किया जा सकता है भुगतान
आईवीआर
इंटरएक्टिव वॉइस रिस्पांस के तहत उपयोगकर्ता को एक खास नंबर पर कॉल करके भुगतान करने की सुविधा मिलेगी। नंबर एनपीसीआई की ओर से उपलब्ध कराया जाएगा।
ध्वनि
फीचर फोन धारक ध्वनि आधारित भुगतान कर सकेंगे। इसमें किसी भी उपकरण पर संपर्क रहित, ऑफलाइन और निकटता डाटा संचार को सक्षम करने के लिए ध्वनि तरंगों का उपयोग होता है।
ऐप
इसके तहत फीचर फोन में यूपीआई भुगतान के लिए एक ऐप इंस्टॉल किया जाएगा। इस एप से स्कैन एंड पेमेंट फीचर को छोड़कर सभी प्रकार के लेनदेन किए जा सकेंगे।
मिस्ड कॉल
इसमें भुगतान प्राप्त करने वाले के नंबर पर मिस्ड कॉल देनी होगी। इसके बाद भुगतान के लिए वापस कॉल आएगी। इस कॉल पर भुगतान करने वाले को यूपीआई पिन स्थापित करना होगा।
जानिए क्या होता है फीचर फोन
फीचर फोन को सामान्य मोबाइल फोन भी कहा जाता है। इस फोन में सिर्फ कॉल करने कॉल रिसीव करने मैसेज भेजने और प्राप्त करने की सुविधा होती है। एक अनुमान के अनुसार आज भी देश की बड़ी आबादी फीचर फोन का इस्तेमाल करती है।
पेरू में 1000 साल पुरानी मम्मी की खोज
पेरू में 1000 साल पुरानी मम्मी के कुछ ऐसे अवशेष मिले हैं जिनसे पता चलता है कि उस समय वहां पर बच्चों की बलि दी जाती थी। यह एक पुरुष की मम्मी बताई जा रही है।
दरअसल लीमा से बाहर काजारमारकिला शहर में सदियों पुरानी एक मम्मी मिली। यह मम्मी घुटने को मोड़ कर लेटी हुई थी। इस मम्मी के मिलने की खबर पूरी दुनिया में चर्चा का विषय बन गई थी। जब यह मम्मी मिली तब यह माना जा रहा था कि मौत के समय इस पुरुष की उम्र करीब 18 से 22 साल के बीच रही होगी लेकिन बाद में जांच करके पता चला कि जब इसकी मम्मी बनाई गई तब यह करीब 35 साल का था। आरके लॉजिस्टिक मम्मी का नाम जब बेलो रखा है। बताया गया कि जब वे लोग के आसपास खनन का काम जारी था। इस बीच 8 बच्चों के अवशेष मिले जो अंतिम संस्कार की विधियों के तहत गोरे और रस्सियों में लिपटे हुए थे। इसके अलावा 12 बच्चों के कंकाल भी मिले हैं।
राजस्थान के एक शख्स ने चांद पर खरीदा प्लॉट
धरती पर घर बनाने के लिए जमीन खरीदना हर किसी का ख्वाब हो सकता है, लेकिन अगर चांद पर जमीन खरीदी जाए तो उसकी चर्चा होना लाजमी है। राजस्थान के झुंझुनू जिले के एक शख्स ने चांद पर 14 एकड़ जमीन खरीदी है।
व्यवसाई ओमप्रकाश जांगिड़ चांद पर इससे पहले 2012 में भी जमीन खरीदी थी जो 3 एकड़ थी। यह 3 एकड़ जमीन से ऑफ़ मस को भी मेथी। सी ऑफ मॉस्को वी में ही दिवंगत अभिनेता सुशांत राजपूत की जमीन भी है। इसके बाद उन्होंने 11 एकड़ जमीन 2018 में खरीदी थी, जिनके कागजात हाल ही में उन्हें मिले हैं। ओमप्रकाश ने बताया कि वह और उनका बेटा अभिलाष 2012 में अमेरिका में थे, उस समय यूएस में भूमि इंटरनेशनल लूनर लेंस से चांद पर जमीन खरीदी जा रही थी। इसी समय उन्होंने आवेदन किया था।
March 17, 2022 in Only Happened In India, Technology
पटरी पर सामने खड़े इंजन से 300 मीटर पहले लगी ऑटोमेटिक ब्रेक
दक्षिण मध्य रेलवे के लोको पायलट जी एच प्रसाद को शुक्रवार का दिन जीवन भर याद रहेगा।
वह ट्रेन के इंजन में रेल मंत्री अश्विनी वैष्णव और रेलवे के वरिष्ठ अधिकारियों को बिठाकर 100 किलोमीटर प्रति घंटे की रफ्तार पर हैदराबाद से मुंबई रेलवे मार्ग पर तेजी से बढ़े जा रहे थे।
मगर जिस पटरी पर यह ट्रेन चल रही थी उसी पर गलागुड्डा सेक्शन के पास एक दूसरी ट्रेन का इंजन खड़ा था। पर लोको पायलट को ब्रेक नहीं लगाने के निर्देश हैं। दूसरी ट्रेन के इंजन से 300 मीटर पहले ही कवच प्रणाली में इस ट्रेन में ऑटोमेटिक ब्रेक लगा दी। यह देख कर लोको पायलट की जान में जान आई। उनके मुंह से निकला ट्रेन की टक्कर नहीं हुई, यानी कवच सफल रहा।
हादसे रोकने में मदद मिलेगी
टेलीकॉम इंजीनियर प्रिया ने रेल मंत्री से कहा कि यह प्रणाली 60,000 से अधिक लोको पायलट के लिए एक तोहफा है। अश्विनी वैष्णव ने बताया कि प्रधानमंत्री नरेंद्र मोदी के आत्मनिर्भर भारत अभियान के तहत कवच तकनीक का विकास किया गया है। यह तकनीक ट्रेन की टक्कर होने की घटनाएं रोकेगी। इस प्रणाली के तहत रेलवे क्रॉसिंग पर ऑटोमेटिक हरण बजेगा वेस्टेड कम होगी इंजन के भीतर ही 2 से 3 किलोमीटर सिग्नल को देखा जा सकेगा।
यूरोपियन तकनीक से सस्ती है यह प्रणाली
यूरोपियन तकनीक में एक से डेढ़ करोड़ रुपए प्रति किलोमीटर के खर्च आता है कोमा जबकि कवच में 40 से 50 लाख रुपए प्रति किलो मीटर का खर्च आएगा। 180 किलोमीटर की रफ्तार पर कवच सफल रहा।
कवच की विशेषताएं