Hello, I have been searching around the net looking for solutions to my problem, but none have worked. My issue is that when i redirect using: <meta http-equiv="Refresh" content="0; url=<?php echo $URL; ?>"> The hash tag part of URL gets removed by IE. So example.com/sample#foo will just load as example.com/sample. This happens in all version of IE and appears to be a bug, but the question is how do I get around this issue? Here is the redirect page template for wordpress that I am using: <?php /* Template Name: Redirect */ ?> <?php if (have_posts()) : the_post(); ?> <?php …

Member Avatar
Member Avatar
+0 forum 5

Hi all, This is my array of hash [{"gate_pass_type_id"=>2, "tag"=>0, "total"=>2000}, {"gate_pass_type_id"=>125, "tag"=>0, "total"=>300}, {"gate_pass_type_id"=>661, "tag"=>0, "total"=>750}, {"gate_pass_type_id"=>661, "tag"=>2, "total"=>100}] I want to convert it into [2 => { "0"=> 2000}, 125=> {"0"=>300}, 661=>{"0" =>750, "2"=>100}] Is any simple way without using so much loops

Member Avatar
Member Avatar
+0 forum 2

I am a member of another forum and forgot my password, so I clicked the "Forgot password" link and was told "fill this form out and we'll send you your lost password" or words to that effect. It occurred to me that I had never seen language like this and I figured that this was bad security. Normally you are sent a link to RESET your password. You are NOT sent your OLD password that you forgot. I've never been responsible for authenticating user's passwords, but my understanding is that you are not supposed to store the password on the …

Member Avatar
Member Avatar
+0 forum 5

Don't you just get sick of hash algorithms constantly been brute forced or even cracked. Well here is an algorithm I have created in my spare time to help out the little guy who just wants a secure hash. This hashing algorithm uses many different techniques including ones used in sha1 to prevent a reversal algorithm and uses a lot of math to help reduce the speed of brute forcing the algorithm. An example of the brute force done on common algorithms today is like I myself have got a website to brute force sha1, sha256, sha512, md4 and md5. …

Member Avatar
Member Avatar
+1 forum 3

guys, I am implementing hash function in below code snippet but unfortunetly getting segmentation fault. Could you please help me to understand that what went wrong in this implementation. #include<stdio.h> #include<string.h> #include<stdlib.h> unsigned long hash(char** str ) { unsigned long hash_val = 5381; unsigned long sum=0; char* val ; int i,j; for ( j=0;j<9;j++) { val=malloc(strlen(str[j])+1); memset(val,'\0',strlen(str[j])+1); strcpy(val,str[j]); for (i=0;val[i]!='\0';i++ ) { sum=sum+val[i]; } printf("%ld",sum); return sum; } } int main() { int i; char *str[9]={"mohan","ramesh","mohan","ramesh","cat","act","manish","vashsh","dfjdsj"}; unsigned long key; for(i=0;i<9;i++) { key= hash(str[i]); printf("\nkey[%ld]:val[%s]",key,str[i]); } return 1; }

Member Avatar
Member Avatar
+0 forum 3

Hi Daniwebbers, can someone help me How to figure out the depth of a dynamic hash (hash of hashes) in perl. If it has consistent structure, we can traverse through while/foreach and find out the depth. Could anyone point me the right and best way to figure it out. my %hash1 = ( name => { first => "John", last => "branham", middle => "visa", }, address => { park => "cubbon", doorno => "4/6", other => { division => "division", city => "Cincinati", state => "Ohio", country => { cont => "NA", code => "USA", pin => "51123", }, …

Member Avatar
Member Avatar
+0 forum 3

Using .Net's SHA1 Crypto Service to compare hashes between a user's password and their stored hashed password. Simplez =0)

Member Avatar
+0 forum 0

Hi All, thought I'd pass on a (very) simple password class which is built on the new `password_hash()` and `password_verify()` functions. You will need php 5.5.0+ in order to get this to work. If you're thinking of modifying this and using it in a production site, please check that your host has 5.5.0+, as many do not. To be honest there's not much going on beyond the two functions mentioned, but it can be modified easily to change any validation rules. [VERSION 1.1 with improved validation and rehashing](https://www.daniweb.com/web-development/php/threads/485519/a-simple-password-hash-and-verify-class#post2125105) (as suggested by veedeoo and ~s.o.s~) Comments, improvements etc. most welcome.

Member Avatar
Member Avatar
+8 forum 9

Sup everyone, Does anyone have any recommended tutorials/sites for Hash maps? I'm planning to use it to create and link "locations" in a basic text-based game but i've looked around and there seems to be a lot of description on hashmaps but not much tutorial/examples for them. Any sort of guide will be greatly appreciated. Cheers,

Member Avatar
Member Avatar
+0 forum 4

Hello Daniweb, I'm rebuilding a Flash-based website in PHP/HTML maintaining the same MySQL database. My problem now is, the user passwords are hashed of course - I need to use the same hash in the new application for old users to be able to still log in. But since the Flash-based application is compiled and I don't know what method was used, I'm kinda lost. Maybe there is no easy way to recognize the hashing method, but hoping someone knows more than me I am posting this asking for your suggestion. When I create a dummy user with password '**123456789**' …

Member Avatar
Member Avatar
+0 forum 2

**How do passwords work?** What a password isn't, or at least really shouldn't be, is some kind of secret word or phrase that is simply compared against a table of usernames in a login database. Such plaintext systems are about as secure as a chocolate padlock on a furnace door. Even a login system whereby those passwords are encrypted isn't much better, although many people assume they are safe as houses. Breaches across the years have proven how insecure any system which relies purely on reversible algorithm encryption really is. The user logs in and enters a password, this triggers …

Member Avatar
Member Avatar
+1 forum 11

Hello to all, HAving a hash where its keys are associated with arrays like below: myHash = {"A"=>["HYU"], "B"=>["TU6"], "C"=>["11", "09","88","2"], "D"=>["01", "11"]} Each key represent one header and the arrays elements represent the values for each header. How to print each key in different column separated by comma "," and below each header print all the values of corresponding array. Since some arrays have more elements, for the arrays that have less elements print blank like below. A,B,C,D HYU,TU6,11,1 ,,9,11 ,,8, ,,2, Thanks in advance for any help.

Member Avatar
Member Avatar
+0 forum 4

Hello to all, I have a ruby script with a very long hash with more than 300 associations. The script looks like below: #!/usr/bin/env ruby Array_A = [] myHash = { "x1" => "2", "x2" => "0", "x3" => "1", . . . "X350" => "1" } myHash.keys.each do |z| Array_A << "This is key " + z end puts myHash.values.join("|") puts Array_A.join("|") But since the hash is very large, for reading purposes I'd like to put the hash at the end of the script and the each.do loop and puts command first, something like below. Is there a way …

Member Avatar
Member Avatar
+0 forum 8

Hello, I'm a first timer here but I've kind of exhausted all my options for help on this program so this is my last resort... Anyhow, I'm constructing a hash table given a hash table class header file from my textbook. I'm working on the Driver.cpp file and here's what's going on: 1) First I read in a text file called symbols.txt. This file is a combination of variables and numbers. (The file is shown below) 2) I then store these pairs of strings/ints as Symbols (part of my Symbol struct) in a vector of Symbol objects. 3) Then I …

Member Avatar
+0 forum 0

We use hashes a lot in our URIs to jump people around to a specific place on the page. For example (www.example.com#part1 and www.example.com#part2). However, we have a static fixed header at the top of the page, and so if it tries to jump you down, it ends up plopping what you need to see in a place that's covered by the static header. Is it possible to use javascript (preferably jQuery) to intercept all hash jumps and add 100px to wherever it's going to take you?

Member Avatar
Member Avatar
+0 forum 3

Hello. I'm trying to set up a private section of my website for testing and I'm having a problem where my .htaccess / .htpasswd protection always rejects my password. I've set permissions to 604 on both files as recommended by my web host and both files reside in the same subfolder. At first I tried setting the password in the .htpasswd file from OS X's Terminal using the htaccess command. When that didn't work I hashed it using an online tool to generate the hash. It hashed differently but still doesn't work. I'm uploading via Fetch (FTP). If anyone has …

Member Avatar
Member Avatar
+0 forum 8

My professor gave us an assignment that I am not entirely sure how to start correctly. She gave us 2 java classes as well to use. Any assistance would be greatly appreciated... So basically, two things need to be done. I need to create two more classes, ExternalHashing and IndexHashTable...and I have some work so far but I am not sure how to edit it to make it work for this assignment. I already have some of it...but I had done a previous assignment and used basically that, but I am not sure how to edit it to make it …

Member Avatar
Member Avatar
+0 forum 3

I'm making a full-screen slider with [maximage][1] & [cycle][2] that (so far) does the following: - Compares a given URL hash against each slide's ID and loads a match, if found, - Appends the first slide's ID to the address bar as a hash, if none is specified, - Replaces, rather than appends, a history entry when browsing through the slides, as well as updating the location hash. Here's the main bulk of code... jQ(function(){ // Globals var s, slideIDs = {}; // Populate slides object jQ('#slides').children('div').each(function(i) { s = jQ(this).attr('id').replace(/\ /g, '-'); slideIDs[s] = i; }); // Find slide …

Member Avatar
Member Avatar
+0 forum 11

I was just wondering if someone could maybe set me on the right track or tell me exactly how to do what I am about to ask. I have a bunch of answers in a notepad file, such as TFTABCD (going downwards, a letter per line), how can I make a program of some sort to take those answers and insert them into a webpage, such as an ExamView page? T F T A B C D These answers need to be directly inserted in order.

Member Avatar
Member Avatar
+0 forum 4

Hi, I'm after some thoughts and opinions regarding the navigation/behaviour of a portion of a site I'm working on. The site is a shop, which is built with the Big Cartel framework, and is my first attempt at using more than just a couple of lines of javascript - or rather, jQuery. ## What I have so far... ## The main idea behind the store is that you browse via a full-screen slider; each slide comprising a window-sized image and small amount of text i.e. the product name and price. The shop has a number of "categories" and each category …

Member Avatar
Member Avatar
+1 forum 2

I have the following script: $(function () { var tabContainers = $('div.tabs > div'); tabContainers.hide().filter(':first').show(); $(window).bind('hashchange', function () { var hash = window.location.hash || '[b][b]#[/b][/b]first'; tabContainers.hide(); tabContainers.filter(hash).show(); $('div.tabs ul.tabNavigation a').removeClass('selected'); $('a[hash=' + hash + ']').addClass('selected'); }); $(window).trigger( "hashchange" ); }); <div class="tabs"> <ul class="tabNavigation"> <a href="#first" class="selected">First</a> <a href="#second" class="">Second</a> <a href="#third" class="">Third</a> </ul> <div id="first" style="display: block;"> <h2>First</h2> </div> <div id="second" style="display: none;"> <h2>Second</h2> </div> <div id="third" style="display: none;"> <h2>Third</h2> </div> </div> How do i replace [b]#[/b] with [b]?[/b], so that it would be http://site.com/?first

Member Avatar
Member Avatar
+0 forum 3

Traceback (most recent call last): File "C:/python files/USACO/crazy/crazy.py", line 87, in <module> grid.plot(x,y,"F") File "C:/python files/USACO/crazy\grid.py", line 63, in plot self.g[(x,y)] = replace TypeError: unhashable type: 'list' You see, I'm hashing a string with the key bing a tuple. This is using my own 2d grid data structure.

Member Avatar
Member Avatar
+0 forum 3

I have links like, #**#/Home**, **#/About** how to remove **#/** using .htaccess I have other RewriteRules and they all work fine URL's are displayed like **localhost/site/#/Home**

Member Avatar
Member Avatar
+0 forum 2

I need to encode the sending messages/data(not MD5)and then they will be decoded on the other side. Codes have to be in android libraries not in java. Is there any code or information that may help me around internet? Thx all for your help.

Member Avatar
Member Avatar
+0 forum 1

Hello, I'm doing some word counts in Perl and have a problem with the following one. I want to use two subroutines count and show and do a word count on two lines of an array at the same time I've got two problems with it. 1) when using print at the end of the loop in the count subroutine, I get 1 just 1 trying 1 figure 1 this 1 out 1 cant 2 figure 1 how but I think, I should get 1 just 1 trying 1 this 1 out 1 cant 2 figure 1 how in some …

Member Avatar
Member Avatar
+0 forum 4

Review for a final and I had a question... You are give a hash function h(x) = x%11 and the size of the hash table is 11. The inputs are 4371,1323,6173,4199,4344,9679,1989. What would the resulting hash table be using quadratic probing. Would I start with 4371 and then do the following (h(x)+i^2)%size = location ? h(x) = 4371mod11 = 4 size = 11 i = ??? Not sure thanks for any help (the book is confusing me even more ).

Member Avatar
Member Avatar
+0 forum 3

This is a topic we didn't cover in class so I am lost on what is going on, any pointers would be greatly appreciated: ~Given the following numbers ... 25 72 122 ... and given the following hashing function ... hashvalue := (i*i) mod 97 ... and using Linear Probing, where are the locations where the numbers will end up?

Member Avatar
+0 forum 0

I created a hashing method to make a=1, b=2, c=3...etc. To me it doesn't seem too efficient. Does this look efficient or is there a recursive method or smaller method to do the same thing? /** * Changes String to int * @param key: String * @return (result % arraySize): int */ public int hashFunc (String key) { int result = 0; String inputString = key.toString().toLowerCase(); // changes String to lowercase char [] characters = inputString.toCharArray(); // makes String an Array for (int i = 0; i < characters.length; i++) // loop { char currentChar = characters[i]; // gets current …

Member Avatar
Member Avatar
+0 forum 7

I am making a project using hashtables. I have to use a linked list to handle duplicate hashcodes. The Objects that I am turning into hash tables are State objects with just a String name. I have debugged and tested my entire project and cannot figure out why it is not working. There is 25 State objects withing the txt file. The space available is 29 for the size of the hashtable and I am not able to change that. It is giving me a... Java Result: 1 Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at project5mitchell.HashTable.insert(HashTable.java:68) at project5mitchell.State_Controller.insert(State_Controller.java:84) …

Member Avatar
Member Avatar
+0 forum 12

Ok guys i have a few questions about implementing a gneric hash table using linear probing. Ok first, i need to make an entry class Entry<K,V> then An Entry <K,V> table array but since its gneric must initiatied elsewhere my question is how does the class entry work , from what i understand it will be like some sort of node with 2 fields of type K and V but i dont know how i will insert using entry then entering it in the table. This is what i have written so far. Am having trouble understanding it correctly, and …

Member Avatar
Member Avatar
+0 forum 5

The End.