Categories
CMS Mastering Development Wordpress

IF statement not working – Any suggestions?

So I have a function which counts the amount of customer orders. I want to show a congratulations modal that appears when a customer hits a specific amount of orders. All of my code is working fine, except when I add this part to the IF statement: || in_array($count, $the_digits) && isset( $_COOKIE[‘tier_advance’] ) && […]

Categories
Mastering Development

Data extraction using c#

I want to parse the pdf and extract the data like name address contact details using c# Pdf data parsing is done using pdfpig Can anyone suggest or help with data extraction ? How to extract the exact key value pair from available data.? Thanks in advance!! BajajAllianzGeneralInsuranceCompanyLtd.RegisteredandHeadOffice:GEPlaza,AirportRoad,Yerwada,PuneTranscriptofProposalforPrivateCar-PackagePolicyDearRAJINDERKUMARGUPTA,Wewishtoinformyouthatthecontractunderpolicynumber’OG-17-1104-1801-00011267’hasbeenfinalizedbasedontheinformationanddeclarationgivenbyyou,thetranscriptwhereofismentionedbelow.Youarerequestedtoreconfirmthesame.Incaseofanydisagreementorobjectionoranychangeswithrespecttoinformationmentionedbelow,werequestyoutopleaserevertbackwithinaperiodof15daysfromdateofyourreceiptofthis,failingwhichitwillbedeemedthatyouaresatisfiedwiththecorrectnessofthedetailsmentionedbelow.Kindlynotethatasthecontentsanddeclarationscontainedinthistranscriptisthebasisonwhichwehaveissuedthepolicytoyou,weadviseyoutopleaseensurethatyouhaveprovided/disclosedandornotwithheldanymaterialfacts/informationanddeclarations,asPolicybecomesVoidabinitioifmaterialfactsarenotprovided/disclosedandorwithheldandinsuchcasenoclaim,ifany,willbeconsideredbyusapartfromforfeitureofthepremium.Detailsprovidedbyyou:A.Proposerdetails1.ProposerName:RAJINDERKUMARGUPTA2.ProposerAddress:NEARPIPALCHOWK,ASSANDH,,KARNAL,HARYANA-1320393.ProposerMobileNumber:4.ProposerResidentialNumber:NA5.Proposere-mailid:NA6.ProposerProfession:NAB.VehicleDetailsRegistrationNumberMonth/YearofRegnVehicleMakeVehicleModelVehicleSubTypeCubicCapa-cityFuelTypeYearofMan-ufactureSeatingCa-pacityHR40A4511OCT/2004MARUTIALTOSTANDARD796Petrol20045EngineNumberChassisNumberVehicleIDV(inRs.)ElectricalAccessoriesIDV(inRs.)Non-ElectricalAccessoriesIDV(inRs.)CNG/LPGUnit(Extrafitted)IDV(inRs.)TotalIDV(inRs.)0109910973478100000081000C.Coverageopted1.PeriodofInsurance:From20-OCT-201600:01(Hrs)To19-OCT-2017Midnight2.IsyourvehiclefittedwithexternalLPG/CNGkit:No.3.ElectricalAccessoriescoverOpted(IfApplicable):No.4.Non-ElectricalAccessoriescoverOpted(IfApplicable)::No.5.IsVoluntaryExcessopted:No.Amountofvoluntaryexcessopted:Rs.NA.6.WhetherPAcoverisoptedforowner-driver:Yes.7.Isanyadditionalcompulsorydeductibleimposedandagreedupon:No.Amountofadditionalcompulsorydeductibleimposed:NA.8.Whethergeographicalareaextensionisopted:No.DetailsofCountriestowhichgeographicalareaextensioncoverisgiven:NA.9.IsLLtopersonforPaiddriver/Operation/Maintenanceopted:Yes.10.WhetherPAcoverisoptedforpaiddriverotherthanownerdriver:No.SumInsuredforPaidDriver:Rs.NA.11.WhetherPAcoverisoptedforpassengers:No.SumInsuredperPassenger:Rs.NA.12.IsTPPDrestrictedtostatutorylimitofRs.6000?:No.13.PreExistingdamagesinthevehicle:CostofRepair/ReplacementtowardsthedamagedpartsnoticedduringtheinspectionofyourvehiclepriortoenrolmentunderthispolicyasperInspectionreportreferencenumber2016-02305432dulysignedbyyouoryourrepresentativeaswellasthephotographsshallbeexcludedintheeventofanyfutureclaims.14.PremiumforLiabilitycoverage,quotedandagreeduponis:Rs.2205.15.PremiumforODcoverage,quotedandagreeduponis:Rs.861.16.TotalPremium(excludingServiceTaxandEducationCess)forLiabilityandODcoverages,quotedandagreeduponis:Rs.306617.NCB(NoClaimBonus)claimedbyyouandgrantedbyusbasedonyourdeclarationofnoclaimduringyourpreviouspreviouspolicy:-50%.18.Aboutthelastinsurancecompany(i)InsuranceProvider:IFFCOTokioGeneralInsuranceCompanyLimited..(ii)PreviousPolicyNo:1-3S5LBHC,PreviousPolicyExpiryDate:01-SEP-1619.WhetheryourvehicleisHypothecatedandifsothedetailsofPledgeewhosenameisregisteredbyus:No.NameofPledgee:NA.20.AddonCover(s)opted:No.Planname:NAPleasenoteCoverNoteNo.DY1303078914/19-OCT-201610:20issuedtoyoubasingontheaboveinformation.IncaseofDisagreementorobjectionoranychangeswithrespecttoinformationandcontentsmentionedhereinabove,pleasecontactourtollfreenumber&registeryourobjections/changes/disagreementtothecontentsofthistranscriptoryoumayalsosendusemailorwrittencorrespondenceatthefollowingdetailswithinaperiodof15daysfromdateofyourreceiptofthistranscriptalongwithPolicy:I/WeherebyunconditionallyallowtheCompanytoshareallmy/ourinformationbeingcollectedinthisproposalformorthroughtelephonic/email/web-inputsmeansorothermeans,asupdatedfromtimetotimewithingroupentities.TollfreeNumber:1800-22-5858,1800-102-5858,1800-209-5858Emailaddress:customercare@bajajallianz.co.inWebsite:www.bajajallianz.comContactourpolicyservicingbranchat:BlockNo-4,7thFloor,DLFTowers,,15,ShivajiMarg,,-,NewDelhi-110015PH:011-66278000. I want to extract the ProposerName

Categories
Mastering Development

SQL check if group is continuous when ordered and return broken groups

I am trying to find a way to list rows, that are breaking continuous groups of records. I say groups, because we could use GROUP BY to list values of groups (but that is not applied, we need particular rows). Sample data: CREATE TABLE Test (ID INT, NNO INT, DIDX INT, SIDX INT); — Valid […]

Categories
Mastering Development

NumPy: Is there a way to perform ‘shifting’ on a ndarray?

Original array: array([[ 8, 9, 10, 11], [12, 13, 14, 15]]) With offset = 2 the result would be: array([[ 10, 11, 12, 13], [14, 15, 0, 0]]) With offset = -2: array([[ 0, 0, 8, 9], [10, 11, 12, 13]]) Is there a way to do this other than creating multiple slices and concatenating […]

Categories
Mastering Development

EasyApache 4 Frozen on Loading profiles

Cpanel – Centos 7.8 Update Running dcrpm provides this error message: 2020-07-08 14:21:51,147 ERROR [rpmutil.kill_spinning_rpm_query_processes]: Found stale rpm process: (7042) /usr/bin/rpm -q –nodigest –nosignature –queryforma 2020-07-08 14:21:51,505 ERROR [dcrpm.run]: DB needs recovery 2020-07-08 14:21:55,982 WARNING [rpmutil.verify_tables]: Skipping table ‘Obsolet ename’, blacklisted yum commands dont return anything and rebuilding the RPM database doesn’t seem to change […]

Categories
Database Development

What is wrong with this mysql INSERT statement?

I have table: Book: – id:(int) primary key, autoincrement, not null, – title:(varchar) not null, – price: (decimal) not null and Artical: – id:(int) primary key, autoincrement, not null, – title:(varchar) not null, – price: (decimal) not null, – book_id:(int) foreign key referencing book I already have couple of books in Book table while Artical […]

Categories
Mastering Development

How to Un-Sort The legends in the graph in R?

I am not an expert in R. I am having an issue, the legends are sorted alphabetically. I cannot arrange them manually because I have 87 patients and each patient has 300 days and the status (category) changes every day so i want to plot the graph exactly like it has in the source. ggplot(data […]

Categories
Mastering Development

Why D3 adds element outside of the body

I am trying to add elements inside svg using the D3 data enter then append function. D3 adds circles outside of the body. I am unable to figure out how to bring circles inside svg. Sample HTML: <html> <script src=’https://d3js.org/d3.v5.min.js’></script> <body> <svg width=500 height=500></svg> </body> <script> var data = [4,8,15,16,23,42]; var svgContainer = d3.select(‘body’).selectAll(‘svg’); svgContainer.data(data).enter().append("circle"); […]

Categories
Mastering Development System & Network

Run crontab every 15 minutes + at specific time in one line?

In short words I need to do that in one line: 0,15,30,45 * * * * my_command 50,55 23 * * * my_command I want to run some command every 15 minutes + two extra times before midnight. Is it possible to do this in one crontab’s line?

Categories
Mastering Development

cannot arrange numbers into shape (n,n) matrix

I have the following code that generates a fractal image, the problem is how to reconstruct numbers to be a matrix. from PIL import Image from pylab import * from numpy import NaN import numpy as np import matplotlib.pyplot as plt def julia(C): X = arange(-1.5, 1.5, 0.05) Y = arange(-1.5, 1.5, 0.05) pixel = […]