i have app list , email models many many association. want users able add many emails lists @ once, have function in controller split emails custom textfield in new list form "emails" array. i want validation error if it's blank added custom validation on field in lists model: class list < applicationrecord has_and_belongs_to_many :emails #tried adding ", validates: false" here too, didn't work #custom attr_accessor :emails validates :emails, presence: true end it works great, except when try associate existing email list (in case user entered 1 in db), validation error. oddly, can prevent validation error when associating net new emails lists "(validation: false)" seen below, not when email exists already, if add save function , append "validation: false". part of controller in question is: emails.each |email| if email.where(email: email).blank? db_email = email.new( email: email ) db_email...
i trying perform pe base relocation , whole concept, data structures, method , why doing not problem that. days have been trying code work whatever keep getting undefined/wrong relocation types in variable called relocationtype(obviously) , have feeling might getting wrong offsets aswell allthought when checked debugger few bytes off, regardless cause crash. i should inform of relocation types correct, , either image_rel_absolute or image_rel_based_highlow 1 expect, after few loops finds wrong values. not have clue happening, suspect pbaserelocation might few bytes of reason after while. here relocation function: int fixrelocs(dword imagebase, pimage_nt_headers ntheaders, image_base_relocation *reloc, unsigned int size) { pimage_base_relocation pbaserelocation; image_data_directory datadir; pword list; dword delta; dword count; dword *patchaddr; unsigned char* dest; unsigned char* base = (unsigned char*)imagebase; bool ndelta = false; datadir = (image_data_directory)ntheader...
Comments
Post a Comment