Hi all, I'm a very early user of Daniweb, and after a long break, and I'm hoping to participate a bit more in this forum again. I'm here specifically for some advice before starting a new project of mine. I'm an experienced C++ / Win32 developer, but seem to be having trouble coming up with a good way of encoding AVI videos, or animated GIFs (or both!), in such a way that they will be quick to load and watch on my website. I don't really care about the final video output type, as long as I can upload them …

Member Avatar
Member Avatar
+0 forum 1

I have two questions does its possible to encrypt get parameter same like the passwords are? If NO whats the best method to do it i have simple parameter `articleID=1`, i want to encrypt the number which user is not able to see it or hack it so should look something like this `articleID=jt8asd9HG43u52Jh1jk94X`

Member Avatar
Member Avatar
-1 forum 6

Hello , today I was developing a short url system and I created this class to help me encode / decode integer (id) to small string. That way for example “Ac” means 3674 . Because I believe that it may be helpful to others too I share it here. Notice that in the constructing string each char can be present only once. Example of usage: $numCode = new Model_Utils_Numcode("4fFiV8kRTvm5MPNDcyO1dg7lr20Qtn3X6pKLZUqaEsxCwubGYIzhSWJojHeA9B"); $num = 3674; $encoded = $numCode->encode($num); echo "<br/> $num encoded = $encoded"; // 3674 encoded = Ac echo "<br/> $encoded decoded = ".$numCode->decode($encoded); // Ac decoded = 3674 Class: class Model_Utils_Numcode …

Member Avatar
Member Avatar
+2 forum 5

**Read title.** username = base64.b64encode(username)+'\n' This is what I thought would have worked, but it comes up with an error, "TypeError: can't concat bytes to str", meaning that I cannot add +'\n' to the end of the code. If there is anyway anyone knows how to write the byte of base64.b64encode(username) to a file line by line, please help!

Member Avatar
Member Avatar
+0 forum 2

Oh boy They ust be tired of me now. My trouble: I have two ArrayLists of custom classes. ``ArrayList<Subject>` **a**` ``ArrayList<Student>` **b**` Within those custom classes are other custom classes which themselves have primitive data types as well as an ArrayList of other custom classes. It's a big circus going on. How do I XMLEncode those two ArrayLists, **a** and **b**, so that all the information within them branching all the way down, is saved? (Also, is it possible to save both of these to the same file please?)

Member Avatar
Member Avatar
+0 forum 4

Hey, Which good program for encode/decode php script.

Member Avatar
Member Avatar
+0 forum 1

How can i encrypt the php code so that i can block the re-editing of files.I have tried some, but not working thanks in advance

Member Avatar
Member Avatar
+0 forum 1

The goal of my assignment is to create a program that takes a string of words and encodes or decodes the string using a simple substitution cypher. I've gotten a decent amount done but I am stuck at the part where I actually have to encrypt and decrypt using the offset that the user has input. This is what I have, can anybody lend a hand? #include <stdio.h> int main () { #include <stdio.h> int main () { char alpha[26] = "abcdefghijklmnop"; char ALPHA[26] = "ABCDEFGHIJKLMNOP"; char*encrypt(char*str,int offset); char*decrypt(char*str,int offset); int option; int offset; char str; char toencode(int alpha, int …

Member Avatar
Member Avatar
+0 forum 1

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

Hey, I am trying to make a C++ scrit that decodes and encodes tenis polar (search it on Google if you don't know what it is). After some testing, I found out my application stops after the strcpy. Any help? The code is below. Thanks! #include <iostream> #include <cstring> #include <string> using namespace std; void encode(string str); int main() { string scode; cout << "Code: "; cin >> scode; encode(scode); } void encode(string str) { char * ccode, * ncode = new char [str.size()+1]; int str_size = str.size()+1; strcpy (ccode, str.c_str()); for (int i=0; i!=str_size; i++) { if (ccode[i]=='t') { …

Member Avatar
Member Avatar
+0 forum 18

hi, i'm passing a content in a div tag to a url. url looks like [ICODE]index.php?content=texttext &amp; text text[/ICODE] .. so on. when i'm trying to display this string, php only displays content up to &amp; it stops at '&' how can i stop this? i need to change this string so php will recognize it. thanks in advance.

Member Avatar
+0 forum 0

[b]C# text encoder / decoder[/b] [i][u]Please note that I'm not a professional developer and I might make simple mistakes because of that, I'm also dutch, and 14 years old, so please keep that in mind before you reply. thank you C:[/i][/u] My brother came up with an idea to encode and decode text with a username and a password... When you encode something you have to decode it with the same username and password again, otherwise it will give you a very strange character text. We're going to use this for our website, and I thought it might be nice …

Member Avatar
Member Avatar
+0 forum 1

I am trying to do this simple encoding program for class. It is supposed to encode it using the ASCII chart and some slight modding of the number. Then it should be written to a file 'encryptedmessage.txt' for later reading by a decoder later. My issue is I dont know how to add newMessage so I can write it to file. I can't use the for loop in the output file. Any help would be appreciated. i tried searching but everything I found was actually more complex then what we are into as of now. Thank you for taking the …

Member Avatar
Member Avatar
+0 forum 11

i am trying to implement ceaser's cipher in the generic sense by rotating the digits by integer n.i am trying to find out the pairs of these from a file containing words. this what i've done so far, [CODE] from string import * d = dict() l = [] for i in range(ord('a'),ord('z')+1): d[i] = chr(i) def rotate_word(word,n): global l for i in range(0,len(word)): k = ord(word[i]) + n if k > ord('z'): k %= ord('z') elif k < ord('a'): k = k % ord('a') + ord('z') - ord('a') + 1 l.append(chr(k)) return "".join(l) wordlist = [] c_wordlist = [] …

Member Avatar
Member Avatar
+0 forum 11

Hi i have a lot of ANSI encoded files in the same folder with different extensions and i want to convert all this files into utf-8 encoded files so how can i do this in c# [I][B]Thank you [/B][/I]

Member Avatar
Member Avatar
+0 forum 1

hi i want to hide my php code. i don't want any other to view my code and copy it. So is there a way to do this?

Member Avatar
Member Avatar
+0 forum 4

does anybody know to decode this url: [URL="http://frodo.wi.mit.edu/primer3/"]http://frodo.wi.mit.edu/primer3/[/URL] [ICODE]<form action="/cgi-bin/primer3-web-cgi-bin-0.4.0/primer3_results.cgi" method="post" enctype="x-www-form-urlencoded"> [/ICODE] i tried this: [ICODE] [url]http://frodo.wi.mit.edu/cgi-bin/primer3-web-cgi-bin-0.4.0/primer3_results.cgi?PRIMER_MISPRIMING_LIBRARY=&SEQUENCE=CATTAAAAGAAATATGCTTGCAATTAAAAAAAAAAAAAGCCAACTATTTCTGAGGCCAGTCTCGGTGTCCAGGAGTCTTCAAGGCAA&MUST_XLATE_PICK_LEFT=1&MUST_XLATE_PICK_HYB_PROBE=&MUST_XLATE_PICK_RIGHT=1&PRIMER_LEFT_INPUT=&PRIMER_INTERNAL_OLIGO_INPUT=&PRIMER_RIGHT_INPUT=&PRIMER_SEQUENCE_ID=&EXCLUDED_REGION=&PRIMER_PRODUCT_SIZE_RANGE=150-250+100-300+301-400+401-500+501-600+601-700+701-850+851-1000&PRIMER_NUM_RETURN=5&PRIMER_MAX_END_STABILITY=9.0&PRIMER_MAX_MISPRIMING=12.00&PRIMER_PAIR_MAX_MISPRIMING=24.00&PRIMER_MAX_TEMPLATE_MISPRIMING=12.00&PRIMER_PAIR_MAX_TEMPLATE_MISPRIMING=24.00&PRIMER_MIN_SIZE=18&PRIMER_OPT_SIZE=20&PRIMER_MAX_SIZE=27&PRIMER_MIN_TM=57.0&PRIMER_OPT_TM=60.0&PRIMER_MAX_TM=63.0&PRIMER_MAX_DIFF_TM=100.0&PRIMER_TM_SANTALUCIA=1&PRIMER_PRODUCT_MIN_TM=&PRIMER_PRODUCT_OPT_TM=&PRIMER_PRODUCT_MAX_TM=&PRIMER_MIN_GC=20.0&PRIMER_OPT_GC_PERCENT=&PRIMER_MAX_GC=80.0&PRIMER_SELF_ANY=8.00&PRIMER_SELF_END=3.00&PRIMER_NUM_NS_ACCEPTED=0&PRIMER_MAX_POLY_X=5&PRIMER_INSIDE_PENALTY=&PRIMER_OUTSIDE_PENALTY=&PRIMER_FIRST_BASE_INDEX=1&PRIMER_GC_CLAMP=0&PRIMER_SALT_CONC=50.0&PRIMER_SALT_CORRECTIONS=0&PRIMER_DIVALENT_CONC=0.0&PRIMER_DNTP_CONC=0.0&PRIMER_DNA_CONC=50.0&PRIMER_LIBERAL_BAS=1&MUST_XLATE_PRINT_INPUT=1&PRIMER_LIB_AMBIGUITY_CODES_CONSENSUS=0&PRIMER_LOWERCASE_MASKING=1&PRIMER_SEQUENCE_QUALITY=+&PRIMER_MIN_QUALITY=0&PRIMER_MIN_END_QUALITY=0&PRIMER_QUALITY_RANGE_MIN=0&PRIMER_QUALITY_RANGE_MAX=100&PRIMER_WT_TM_LT=1.0&PRIMER_WT_TM_GT=1.0&PRIMER_WT_SIZE_LT=1.0&PRIMER_WT_SIZE_GT=1.0&PRIMER_WT_GC_PERCENT_LT=0.0&PRIMER_WT_GC_PERCENT_GT=0.0&PRIMER_WT_COMPL_ANY=0.0&PRIMER_WT_COMPL_END=0.0&PRIMER_WT_NUM_NS=0.0&PRIMER_WT_REP_SIM=0.0&PRIMER_WT_SEQ_QUAL=0.0&PRIMER_WT_END_QUAL=0.0&PRIMER_WT_POS_PENALTY=0.0&PRIMER_WT_END_STABILITY=0.0&PRIMER_WT_TEMPLATE_MISPRIMING=0.0&PRIMER_PAIR_WT_PRODUCT_SIZE_LT=0.0&PRIMER_PAIR_WT_PRODUCT_SIZE_GT=0.0&PRIMER_PAIR_WT_PRODUCT_TM_LT=0.0&PRIMER_PAIR_WT_PRODUCT_TM_GT=0.0&PRIMER_PAIR_WT_DIFF_TM=0.0&PRIMER_PAIR_WT_COMPL_ANY=0.0&PRIMER_PAIR_WT_COMPL_END=0.0&PRIMER_PAIR_WT_REP_SIM=0.0&PRIMER_PAIR_WT_PR_PENALTY=1.0&PRIMER_PAIR_WT_IO_PENALTY=0.0&PRIMER_PAIR_WT_TEMPLATE_MISPRIMING=0.0&PRIMER_INTERNAL_OLIGO_EXCLUDED_REGION=&PRIMER_INTERNAL_OLIGO_MIN_SIZE=18&PRIMER_INTERNAL_OLIGO_OPT_SIZE=20&PRIMER_INTERNAL_OLIGO_MAX_SIZE=27&PRIMER_INTERNAL_OLIGO_MIN_TM=57.0&PRIMER_INTERNAL_OLIGO_OPT_TM=60.0&PRIMER_INTERNAL_OLIGO_MAX_TM=63.0&PRIMER_INTERNAL_OLIGO_MIN_GC=20.0&PRIMER_INTERNAL_OLIGO_OPT_GC_PERCENT=&PRIMER_INTERNAL_OLIGO_MAX_GC=80.0&PRIMER_INTERNAL_OLIGO_SELF_ANY=12.00&PRIMER_INTERNAL_OLIGO_SELF_END=12.00&PRIMER_INTERNAL_OLIGO_NUM_NS=0&PRIMER_INTERNAL_OLIGO_MAX_POLY_X=5&PRIMER_INTERNAL_OLIGO_MISHYB_LIBRARY=&PRIMER_INTERNAL_OLIGO_MAX_MISHYB=12.00&PRIMER_INTERNAL_OLIGO_MIN_QUALITY=0&PRIMER_INTERNAL_OLIGO_SALT_CONC=50.0&PRIMER_INTERNAL_OLIGO_DNA_CONC=50.0&PRIMER_INTERNAL_OLIGO_DIVALENT_CONC=0.0&PRIMER_INTERNAL_OLIGO_DNTP_CONC=0.0&PRIMER_IO_WT_TM_LT=1.0&PRIMER_IO_WT_TM_GT=1.0&PRIMER_IO_WT_SIZE_LT=1.0&PRIMER_IO_WT_SIZE_GT=1.0&PRIMER_IO_WT_GC_PERCENT_LT=0.0&PRIMER_IO_WT_GC_PERCENT_GT=0.0&PRIMER_IO_WT_COMPL_ANY=0.0&PRIMER_IO_WT_NUM_NS=0.0&PRIMER_IO_WT_REP_SIM=0.0&PRIMER_IO_WT_SEQ_QUAL=0.0[/url] [/ICODE] apparently it doesnt work :( i'm trying to use it for my jsp project any help would be appreciated :) thanks

Member Avatar
Member Avatar
+0 forum 2

right now my php script is vulnerable to anyone putting in a random member_id into the url and having it excute sucessfully how can I encrypt the id="id#" in the url, so a guest is unable to type in there own id in the posted id retrieved through the url? [QUOTE]echo "<td><a href='perfectrecords.php?id=" . $row->id . "'>Edit</a></td>";[/QUOTE] [CODE]<?php function html_encode($var) { return htmlentities($var, ENT_QUOTES, 'UTF-8') ; } require_once('auth.php'); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>My interns</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> </head> <body> <h1> My Interns</h1> <p><b>View All</b> | <a href="../Copy/view-paginated.php">View Paginated</a></p> <?php // connect to the …

Member Avatar
Member Avatar
+0 forum 2

Ok, so i have a log in and a register script. Today i put a md5() encoding mechanism on it so it encodes the password when it is sent to the database. Now, how do i encode all of the passwords that were already inside the database? if anybody could help i would be extremely appreciative

Member Avatar
Member Avatar
+0 forum 7

[B]Context[/B] I'm retrieving data from Google Analytics (via the python-googleanalytics library, as Google's API is way too complex for me right now) and putting that data into a table using an HTML library. Python experience: very low. [B]Problem[/B] I have this: [u'string', u'string'] [integer] [u'string', u'string'] [integer] [u'string', u'string'] [integer] [u'string', u'string'] [integer] [u'string', u'string'] [integer] The strings end up in a table column together and the integers in a table column. That's what I want. However, I don't want it to show any of the punctuation marks or the unicode u, just the bare strings and integers, but still …

Member Avatar
Member Avatar
+0 forum 3

Hy. I am trying to encode a ASN1 structure with DER , but i get a parse error. My in text is : 304913214D617374657220646520736563757269746174656120696E666F726D6174696569301E170D3039313030313030303030305A170D3130303331353030303030305A020103010101 and the code is this: [CODE]include <openssl/asn1.h> #include <stdio.h> #include<conio.h> #include <string.h> #include <iostream> #include <fstream> #pragma comment( lib, "libeay32.lib" ) using namespace std; int main() { unsigned char buffer[150]; BIO * outfile; FILE* intext = fopen("bla.txt", "rb" ); outfile=BIO_new_file("out.txt","w+"); if (intext!=NULL) { fread(buffer, 150, 1, intext); fclose(intext); ASN1_parse(outfile,buffer,150,0); } else printf("error"); BIO_free(outfile); return 0; }[/CODE]

Member Avatar
Member Avatar
+0 forum 2

Hey DaniWeb, I'm having a tough time with this piece of code: [CODE]string encrypt(string e) { for( int i=0; e[i] != '\0'; ++i ){ ++e[i]; if(e[i] == "{") { e[i] = "0"; } if(e[i] == ":") { e[i] = "a" } return e; }[/CODE] It should "encrypt" the string, using only alpha-numeric characters, as in z+1 = {, so z is converted to 0, and 9+1 = :, so 9 is converted to a. The error I get is [icode]49 C:\Dev-Cpp\files\ver1\main.cpp: ISO C++ forbids comparison between pointer and integer [/icode] Can anybody help me with this? Thanks!

Member Avatar
Member Avatar
+0 forum 9

I new to Python and I'm trying to make this script work, I made this in php, but I'd like to know how to do it in python... I'm trying to encode a file with base64 and then decode and write the binary data to a file. [CODE=Python]import base64 binaryfile = open("original.mp3").read() file = open("out.txt", "w") file.write(binaryfile) file.close() base64.encode(open("out.txt"), open("out.b64", "w")) base64.decode(open("out.b64"), open("out.mp3", "w")) print "original:", repr(binaryfile) print "encoded message:", repr(open("out.b64").read()) print "decoded message:", repr(open("out.txt").read()) raw_input("\nPress ENTER to exit")[/CODE] can someone tell me what I'm doing wrong and tell me the proper way to do what I'm looking for

Member Avatar
Member Avatar
+0 forum 1

Hello, In my application I transfer a lot of images from server to client. The problem is the size of the image, so I tried to encode it using [URL="http://objectplanet.com/pngencoder/"]this encoder[/URL] - objectplanet png encoder. The problem is nothing seems to happen, image size is the same. [CODE] //img is a BufferedImage object PngEncoder pngenc; ByteArrayOutputStream baos = new ByteArrayOutputStream(); pngenc.setCompression(PngEncoder.COLOR_GRAYSCALE_ALPHA);//this doesn't seem to work pngenc.encode(img, baos);//write encoded image to stream... not working? baos.flush(); [/CODE] Does anybody knows why is not compressing the image? ...and is PNG the best transfer option? (for speed)

Member Avatar
Member Avatar
+0 forum 2

Hi and I am looking for a compression mechonism that can compress text (just letters and numbers) into binary or all weird symbols. Does anybody know of any good php/mysql codes as I can't get any to work.

Member Avatar
Member Avatar
+0 forum 9

The End.