Laravel get current date using carbon with format without delimeter

I want to format my date to be like this yyyyMMddHHmmss Here is my currentcode $now = Carbon::now()->toString(); $format=’yyyyMMddHHmmss’; //$parsed = Carbon::parse($now); $formatted = Carbon::parse($now); //$x = strtotime($now); dd($formatted); I got a date like this Carbon\Carbon @1580189543 {#223 ▼ date: 2020-01-28 13:32:23.0 +08:00 } If I modify my code like this $formatted = Carbon::parse($now,$format); dd($formatted);…

Details

Kafka setup java exe path issue on Ubuntu

Trying to setup Kafka on Ubuntu 18.04. Used the kafka_2.11-2.1.1.tgz. Have jdk8, JAVA_HOME etc all fine. $JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java java -version openjdk version “1.8.0_232” Set and started Kafka systemd[1]: Started kafka.service. When I issue my first test command kafka-topics.sh –create –zookeeper localhost:2181 –replication-factor 1 –partitions 1 –topic TutorialTopic /home/kafka/kafka/bin/kafka-run-class.sh: line 306: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java/bin/java: Not a directory As…

Details

Reverse for ‘blog_detail’ with no arguments not found. 1 pattern(s) tried: [‘blog/(?P

Reverse for ‘blog_detail’ with no arguments not found. Reverse for ‘blog_detail’ with no arguments not found. 1 pattern(s) tried: [‘blog/(?P[0-9]+)$’] models.py class Blog(models.Model): author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) title = models.CharField(max_length=80) slug = models.SlugField(max_length=80, unique=True, db_index=True, blank=True, null=True) description = models.TextField(max_length=1080, blank=True, null=True) image = models.ImageField(upload_to=’blog/’) tags = models.CharField(max_length=30, blank=True, null=True) category2 = models.CharField(max_length=50, blank=True, null=True)…

Details

Issue in disposing Stream objects for asp.net mvc application?

I have asp.net mvc application which has file upload functionality. While uploading the file, I am performing few validations on the uploaded content before moving it to database and file system location. Here goes my code: [HttpPost] [ValidateAntiForgeryToken] public ActionResult AddImage([Bind(Include = “image,ImageName,ImageType,CountryId,Keyword,Source,Copyright,Description”)] CreateImageViewModel model) { if (!this.ModelState.IsValid) { return View(“Images”); } if (model !=…

Details

TYPO3: Session Storage use $GLOBALS[‘TSFE’]->fe_user->setKey in Service (AuthService) Class

Iam using TYPO3 10.2 and try to store some session data in my Ext/Classes/Service/AuthService but the $GLOBALS[‘TSFE’]->fe_user array is empty. I inject some Classes by dependencies in my AuthService and use following services.yaml services: _defaults: autowire: true autoconfigure: true public: false Vendor\Ext\: resource: ‘../Classes/*’ Vendor\Ext\Service\AuthService: public: true Already tried $GLOBALS[‘TSFE’]->fe_user->setKey(“ses”, “key”, $value); $GLOBALS[‘TSFE’]->fe_user->storeSessionData(); This results…

Details