Tag Archives: hash

Google Adsence ads are blocked if utm_hash query parameter is added to url

Questions: if I i load my page without any parameter then google ads are shown. Even with utm_source and utm_medium query parameters ads are shoing up but when i add utm_hash to the prameter ads are blocked. example.com/?utm_source=fb&utm_medium=social ads are showing up. example.com/?utm_source=fb&utm_medium=social&utm_hash=abcde ads are not showing up. I am using google analytics and adsense… Read More »

Need to get same SHA256 hash in android like CryptoJS SHA256 when choose an image or file

Questions: (Can not believe no one have answer of this question) When I upload an image on an online website which is using cryptoJS SHA256 like proofofexistence.org website And, It gives me hex: c0c39041d9d292486719e59c59a40469f9caff214395ee6ac503f3f4b5ba61af And I want to get this same hash in android but not able to get it. Can anyone help me out… Read More »

Collision resolution in Java HashMap

Questions: Java HashMap uses put method to insert the K/V pair in HashMap. Lets say I have used put method and now HashMap<Integer, Integer> has one entry with key as 10 and value as 17. If I insert 10,20 in this HashMap it simply replaces the the previous entry with this entry due to collision… Read More »

convert hashtag into url

Questions: i have a problem with converting hashtag into url link, i have this code $string = “hi i don’t #care about this #هاش”; $text = preg_replace(‘/(\#)([^\s]+)/’, ‘ <a href=”‘.SITE_URL.’/tag/$2″>#$2</a> ‘, $string); echo $text; it work fine with both language Arabic and English but when i have a comma on my string it’s give me… Read More »

HashMaps and Lists

Questions: I’ve made a function that reads in a text file and counts the frequency of words by using a hashmap. I’ve then found the out difficulty of making a function that sorts a hashmap… So after some research, i’ve found some code that sorts the hashmap by using sets and lists. However, the output… Read More »

Getting StackOVerflow error while parsing HashMap

Questions: Below is my Map structure. { 016559339 = java.lang.Exception: STOPPED~MakerActivity~, 016559338 = java.lang.Exception: STOPPED~MakerActivity~, makerScreenShotMap = { 016559339 = Path1, 016559338 = Path2, 016559337 = Path3 }, 016559337 = java.lang.Exception: STOPPED~MakerActivity~, failedSerialNoList = [016559337, 016559338, 016559339] } When i use it on jsonlint.com it gives me error Error: Parse error on line 1: {… Read More »

Java String HashCode of n digits?

Questions: I’m trying to get an ID from a String in Java, and I thought I would use hashcode (Yeah, two strings can have the same hashcode but I can live with that small probability). I want this ID to have a max of 4 digits. Is that possible? This is the String default hashCode… Read More »

How to exclude fields in equals and hashcode from jsonSchema2Pojo generated files in java

Questions: “Below is json schema to generate a java file and my requirement is to exclude pageIndex, resolutionList and fieldsToBeHighlighted fields from equals and hashcode json generated code. I have tried to add excludedFromEqualsAndHashCode field in schema but still all fields are considered in equals and hashcode.” { “type”: “object”, “javaType”: “com.test.santhosh.ErrorField”, “properties”: { “fieldName”:… Read More »

How to generate a 64bit Murmur hash v2 in PHP 7.2?

Questions: I’ve got a MySQL database that has some Murmur2 hashes (as unsigned 64bit ints) that were generated with the Percona UDF that comes with the Percona strand of MySQL database found here https://github.com/percona/build-test/blob/master/plugin/percona-udf/murmur_udf.cc My problem is that now I need to generate these same hashes on the PHP side, but I can’t seem to… Read More »