Categories
Mastering Development

SNOWFLAKE: Invalid argument types for function ‘IFF’: (VARCHAR(16777216), VARCHAR(16777216), VARCHAR(16777216)) At Statement.execute snowflake

I am running a stored procedure in snowflake and the code compilation is failing with Execution error in store procedure SP_POPULATE_SYS_AUDIT_DATA_BMC: SQL compilation error: error line 6 at position 2,776 Invalid argument types for function ‘IFF’: (VARCHAR(16777216), VARCHAR(16777216), VARCHAR(16777216)) At Statement.execute, line 150 position 61 below is the code snippet where the error occurs v_sql_3 […]

Categories
Database Development

How to exclude data if another column is null?

This SQL query returns a column called "organisation_names" however the data is coming from a column called organisation_users and I would like to exclude "organisation_names" if… organisation_users.delete_at === null otherwise return the column Considering the SQL query below, got any ideas? I was considering adding column: GROUP_CONCAT(CONCAT(organisation_users.deleted_at)) as organisation_users_deleted_at Then excluding it on the query […]

Categories
Mastering Development

Expected Expression before ‘LPCVOID’ in C?

I want to get ImageBase for a Process, so i can edit its contents later. this is my code : HANDLE hFile = CreateFile("0x2.exe", GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); // get file size DWORD dwFileSize = GetFileSize(hFile, NULL); // decrypt and obtain decrypted bytes LPVOID lpFileBytes = Crypt(hFile, dwFileSize); CloseHandle(hFile); free(lpFileBytes); //execute file // […]

Categories
Development Python

How do I make a Python Program demonstrating Zipf’s Law?

Zipf’s law is a pattern found in many real-life affairs, a very common occurrence of Zipf’s law is in passages of text, where the most commonly used word is twice in number of the second most common word. I’ve been learning about dictionaries in Python and attempted to do this myself, and am confused about […]

Categories
Development

Hive Distinct Query takes time when we have more files

Table Structure – hive> desc table1; OK col1 string col2 string col3 string col4 bigint col5 string Time taken: 0.454 seconds, Fetched: 5 row(s); NUmber of underlying files – [user@localhost ~]$ hadoop fs -ls /user/hive/warehouse/database.db/table | wc -l 58822 [user@localhost ~]$ Distinct Query – select distinct concat(col1,’~’,col2,’~’,col3) from vn_req_tab; Total records – ~2M Above query […]

Categories
Development

when i delete the value from input field the span don’t be cleared using html and javascript

i want to automatize span value with my input field but it done one time only put in your mind that i want to validate the input field before send it to server //javascript code…… function valid(){ var username=document.getElementById(‘name’).value; var refusesymbol= [‘<‘,’>’,’@’,’.’,’,’,’\”‘,’\”,’\?’,’\\’,’\/’,’\*’,’\+’,’\-‘,’\-‘,’\_’,'(‘,’)’,'{‘,’}’,’$’,’#’,’!’,’^’,’&’,’|’,’~’,,’\;’]; for(var i=0;i<refusesymbol.length;i++) { if(username.includes(refusesymbol[i])) { document.getElementById(‘sname’).innerHTML=”invalid”; return false; } else { document.getElementById(‘sname’).innerHRTML=”valid”; } […]