Search Results

Search found 2210 results on 89 pages for 'stupid phil'.

Page 56/89 | < Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >

  • My AES encryption/decryption functions don't work with random ivecs

    - by Brendan Long
    I was bored and wrote a wrapper around openSSL to do AES encryption with less work. If I do it like this: http://pastebin.com/V1eqz4jp (ivec = 0) Everything works fine, but the default ivec is all 0's, which has some security problems. Since I'm passing the data back as a string anyway, I figured, why not generate a random ivec and stick it to the front, the take it back off when I decrypt the string? For some reason it doesn't work though. With random ivec: http://pastebin.com/MkDBFcn6 Well actually, it almost works. It seems to decrypt the middle of the string, but not the beginning or end: String is: 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF Encrypting.. ???l%%1u???B! ?????`pN)?????[l????{?Q???2?/?H??y"?=Z?Cu????l%%1u???B! Decrypting.. String is: ?%???G*?5J?0??0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF!-e????V?5 I honestly have no idea what's going wrong. Maybe some stupid mistake, or maybe I'm missing something about AES?

    Read the article

  • Avoid multiple autocomplete calls by wrapping it with SetTimeOut

    - by pixelboy
    Here's my issue : using an autocomplete jQuery plugin, I'd like to avoid multiple ajax requests when user strikes his keynoard by surrounding the $('#query1').autocomplete({ serviceUrl:'/actions/autocomplete?population=salon', minChars:3, maxHeight:300, width:200, clearCache:true, onSelect: function(suggestions,data){ $(".btn1").attr("href", "${pageContext.request.contextPath}/actions/espaceClients?participantId=" + data) } }); with something like var search = false; $('#query1, #query2, #query3').keyup(function(){ if (!search){ search = true; } if (search) { search = false; autocompleteThem(); } }); A you can see, above code is stupid, but it kinda shows what i'm trying to do. In simple words, if user dosen't type anything else in a certain period of time, then you can call autocomplete. I hope i'm being clear, as my brains are a mess...

    Read the article

  • Grouping DLL's for use in Executable

    - by Peter Turner
    Is there a way to group a bunch of DLL's and still use them at run time (not zipped up). Sorry this question sounds terse and stupid, but I'm not sure what more to ask. I'll explain the situation though: We've had two standalone Windows Applications and now one of our Applications has swelled to such ungainly proportions that the other application cannot run outside of the scope of the first app. We want to maintain some of the encapsulation we had while letting the smaller program in on some of the bigger program's features. There is no problem in running the application, other than we don't want to send out all the 20-30 DLL's that the smaller project has.

    Read the article

  • MATLAB - Delete elements of binary files without loading entire file

    - by Doresoom
    This may be a stupid question, but Google and MATLAB documentation have failed me. I have a rather large binary file (10 GB) that I need to open and delete the last forty million bytes or so. Is there a way to do this without reading the entire file to memory in chunks and printing it out to a new file? It took 6 hours to generate the file, so I'm cringing at the thought of re-reading the whole thing. EDIT: The file is 14,440,000,000 bytes in size. I need to chop it to 14,400,000,000.

    Read the article

  • c++ undefined references with static library

    - by stupid_idiot
    hi guys i'm trying to make a static library from a class but when trying to use it i always get errors with undefined references on anything. the way i proceeded was creating the object file like g++ -c myClass.cpp -o myClass.o and then packing it with ar rcs myClass.lib myClass.o there is something i'm obviously missing generaly with this.. i bet it's something with symbols.. thx for any advices, i know it's most probably something i could find out if reading some tutorial so sorry if bothering with stupid stuff again :) edit: myClass.h: class myClass{ public: myClass(); void function(); }; myClass.cpp: #include "myClass.h" myClass::myClass(){} void myClass::function(){} program using the class: #include "myClass.h" int main(){ myClass mc; mc.function(); return 0; } finally i compile it like this: g++ -o main.exe -L. -l myClass main.cpp

    Read the article

  • Object of class mysqli_result could not be converted to string

    - by Joann
    I asked Google to help me I got no luck. :-( Here's the particular code that generates the error: $this->conn->query("UPDATE tz_members SET confirm='yes' WHERE usr='".$uname."'"); The whole function is the following: function update_confirm_field($code) { $uname = $this->conn->query("SELECT usr FROM tz_members WHERE confirm='".$code."'"); $this->conn->query("UPDATE tz_members SET confirm='yes' WHERE usr='".$uname."'"); } Forgive me if I have missed something stupid. Can anyone tell me what's causing the problem please???

    Read the article

  • What does static linking against a library actually do?

    - by Salgar
    Say I had a library called libfoo which contained a class, a few static variables, possibly something with 'C' linkage, and a few other functions. Now I have a main program which looks like this: int main() { return 5+5; } When I compile and link this, I link against libfoo. Will this have any effect? Will my executable increase in size? If so, why? Do the static variables or their addresses get copied into my executable? Apologies if there is a similar question to this or if I'm being particularly stupid in any way.

    Read the article

  • Corporate Environment [closed]

    - by aloneguid
    How do you guys live in corporate environment? Especially talk to each other (developer to developer). I find it extremely hard as any question goes to "please book a meeting for that". Sometimes I get a chance to ask sb sth on the kitchen but that's it. Booked meetings are just stupidest thing ever, 'cos people talk about nothing specific and you have to wait days for them to happen. Weekly "scrums" are even more stupid as they usually take about 10 mins and you could do the same in 1 minute by email, no useful info or communication et all. All that leads to zero understanding of the product, no connection to customers, development in own isolated cubible, throwing out most of your code because that's not what was needed and you never know what the product is really aimed to do. Sad :(

    Read the article

  • How do I modify the -encoding argument to javac in the Android Ant build system

    - by Paul Butcher
    Apologies if this is a stupid question - I'm an Android and Ant newbie. I have utf8 encoded source files that I need to compile with the Android Ant build system. By default, the encoding is set to ascii. I'd be very grateful for a pointer to whatever I need to do to let the build system know that my files are utf8. Incidentally, it works fine if I build in Eclipse, but I need to build from the command line. Thanks!

    Read the article

  • Why does my Eclipse crash all the time?

    - by Marcel
    Somehow stupid question, I have to admit - hope it won't cost me too many points. To make it clear: I would also be happy if you can help me find the reason for the crashes. I wouldn't expect a precise answer. However, I don't see why my Eclipse is crashing (freezing) all the time. Mostly when I save a file. For some reason, crashes seem to increase lately... I use Eclipse Helios (Version: 3.6.1) and java version "1.6.0_20" (OpenJDK Runtime Environment (IcedTea6 1.9.2) (6b20-1.9.2-0ubuntu2) OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)) on Ubuntu 10.10 (64-Bit). Thank you!

    Read the article

  • Excel Spreadsheet - Best way to perform an Oracle Query on a cell

    - by Jamie
    Hi there, I have an Excel Spreadsheeet. There is a cell containing a concatenated name and surname (don't ask why), for example: Cell A2 BLOGGSJOE On this cell, I would like to run the following SQL and output it to cell A3, A4 and A5 SELECT i.id, i.forename, i.surname FROM individual i WHERE UPPER(REPLACE('" & A2 & "', ' ', '')) = UPPER(REPLACE(i.surname|| i.forename, ' ', '')) AND NVL(i.ind_efface, 'N') = 'N' Any idea how I could perform an oracle query on each cell and return the result? I have enabled an oracle datasource connection in Excel, just not sure what to do now. Is this a stupid approach, and can you recommend a better more proficient way? Thanks muchly! I lack the necessary experience in this type of thing! :-) EDIT: I am aware that I could just write a simple ruby/php/python/whatever script to loop through the excel spreadsheet (or csv file), and then perform the query etc. but i thought there might be a quick way in excel itself.

    Read the article

  • looping through an object (tree)

    - by Val
    Is there a way (in jquery or javascript) to loop through each object and it's children and gandchildren and so on. if so... can i also read their name? example foo :{ bar:'', child:{ grand:{ greatgrand: { //and so on } } } } so the loop should do something like this... loop start if(nameof == 'child'){ //do something } if(nameof == 'bar'){ //do something } if(nameof =='grand'){ //do something } loop end I know this is stupid code but i tried to make it understandable :) btw this is for a jquery UI, as i am clueless how to go on about this. thanks

    Read the article

  • Unstyled web page in IE6. Not FOUC

    - by Illes Peter
    I have a very interesting issue with one of the websites I created. It renders fine in Safari, Chrome, Opera, FF, IE7&8 but IE6 does not seem to recognize my stylesheet. I'm not using @import for loading, so it's not a case a FOUC. The website is using Wordpress but never had an issue like this before with WP. I might be missing out on something stupid here, can find the problem though. Any help, suggestion would be very much appreciated. The website is: http://www.magashegyiturak.ro

    Read the article

  • NSURLConnection shown as leaking in instruments

    - by Gyozo Kudor
    Hello another stupid question regarding leaks and also NSURLConnection. How do i release it? Is it enough if i release in the following 2 methods? (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error (void)connectionDidFinishLoading:(NSURLConnection *)connection Because in instruments it shows me the line where I alloc my connection as the source of leaking. OK I don't get it. After the following code my urlConnection has a retain count of 2. WTF? NSURLConnection *urlConnection = [[NSURLConnection alloc] initWithRequest: urlRequest delegate: self]; This is the line that instruments points me to. I find this very weird.

    Read the article

  • C++ vtable resolving with virtual inheritance

    - by Tomas Cokis
    I was curious about C++ and virtual inheritance - in particular, the way that vtable conflicts are resolved between bass and child classes. I won't pretend to understand the specifics on how they work, but what I've gleamed so far is that their is a small delay caused by using virtual functions due to that resolution. My question then is if the base class is blank - ie, its virtual functions are defined as: virtual void doStuff() = 0; Does this mean that the resolution is not necessary, because there's only one set of functions to pick from? Forgive me if this is an stupid question - as I said, I don't understand how vtables work so I don't really know any better.

    Read the article

  • In PHP is faster to get a value from an if statement or from an array?

    - by Vittorio Vittori
    Maybe this is a stupid question but what is faster? <?php function getCss1 ($id = 0) { if ($id == 1) { return 'red'; } else if ($id == 2) { return 'yellow'; } else if ($id == 3) { return 'green'; } else if ($id == 4) { return 'blue'; } else if ($id == 5) { return 'orange'; } else { return 'grey'; } } function getCss2 ($id = 0) { $css[] = 'grey'; $css[] = 'red'; $css[] = 'yellow'; $css[] = 'green'; $css[] = 'blue'; $css[] = 'orange'; return $css[$id]; } echo getCss1(3); echo getCss2(3); ?> I suspect is faster the if statement but I prefere to ask!

    Read the article

  • Getting child elements that are related to a parent in same table

    - by Madawar
    I have the following database schema class posts(Base): __tablename__ = 'xposts' id = Column(Integer, primary_key=True) class Comments(Base): __tablename__ = 'comments' id = Column(Integer, primary_key=True) comment_parent_id=Column(Integer,unique=True) #comment_id fetches comment of a comment ie the comment_parent_id comment_id=Column(Integer,default=None) comment_text=Column(String(200)) Values in database are 1 12 NULL Hello First comment 2 NULL 12 First Sub comment I want to fetch all Comments and sub comments of a post using sqlalchemy and have this so far qry=session.query(Comments).filter(Comments.comment_parent_id!=None) print qry.count() Is there a way i can fetch the all the subcomments of a comment in a query i have tried outerjoin on the same table(comments) and it seemed stupid and it failed.

    Read the article

  • Where is a Web Development Career fueled by Passion? [closed]

    - by JMC Creative
    Quick Background Since learning basic html 5 years ago, I've become completely obsessed with the technology, the logic, and the thrill of solving problems involved with building websites. I am still stuck at a thoroughly non-programming type job, but would really like to move into the field of web programming/design. I have no educational background in the field (was trained as a fine artist and tutor), but in the past few years have progressed fully self-taught (and self-motivated) from html to css to php, mysql, jquery, and am now building rich web applications. The Question How can I prove to a company that even though I have no education, I have a passion to learn whatever is thrown my way? ...That essentially I would come at every issue with not only knowledge, but with a passionate desire to solve it, whether that means tackling a new language or debugging code for hours at a time? p.s. Sorry for the stupid title.

    Read the article

  • Create Access databases programatically through vb.net

    - by user87225
    Let me preface this by saying that I know this is a stupid way to go about this, but it needs to be handled in this way. I need to make an application that from a master database creates a number of access database files (tables of a larger db), then these are manually given to users who fill in data, the database files are emailed back to a user who, through the application, combines them again. The only part of this that I am unsure about is problematically creating the access db's. I have read that through Microsoft Jet OLE DB Provider and Microsoft ADO Ext I can create them (the tables and data), but I also need forms. I have yet to start writing anything and this is away from my area of work, so any insight/links would be much appreciated. Also, I would hope to be able to write this in the free express version of visual studio. Are there components needed that would prevent me from this? Thanks.

    Read the article

  • C++ STL map.find() not finding my stuff

    - by Joe
    Hello, I have constructed a map and loaded it with data. If I iterate over all the elements I see they are all valid. However, the find method doesn't find my item. I'm sure it's something stupid I am doing. Here is snippet: // definitions // I am inserting a person class and using the firstname as the key typedef std::map<char*,Person *> mapType; mapType _myMap; mapType::iterator _mapIter; ... Person *pers = new Person(FirstName, LastName, Address, Phone); _myMap.insert(make_pair(pers->firstName, pers); ... ...later.... _mapIter = _myMap.find(firstName); // returns map.end _mapIter = _myMap.find("joe"); // returns map.end and I have no idea why :(

    Read the article

  • Incrmenting a Cookies with PHP (Beginner Question)

    - by BandonRandon
    Hello, I have used sessions before but never cookies. I would like to use cookies for two reasons: 1) it's something new to learn 2) I would like to have the cookie expire in an hour or so (i know in the code example it expires in 40 sec) I am trying to write a basic if statement that if($counter=="1") { //do this second } elseif ($counter >="2") { //do this every time after the first and second } else {// this is the first action as counter is zero } Here is the code I'm using to set the cookie: // if cookie doesnt exsist, set the default if(!isset($_COOKIE["counter_cookie"])) { $counter = setcookie("counter_cookie", 0 ,time()+40); } // increment it $counter++; // save it setcookie("counter_cookie", $counter,time()+40); $counter = $_COOKIE["counter_cookie"]; The problem is that the counter will be set from 0 to 1 but won't be set from 1 to 2 and so on. Any help would be great I know this is a really simple stupid question :| Thanks!

    Read the article

  • noob iPhone "count" frustrations!?!?!

    - by codemonkey
    Okay, I know I must be doing something incredibly stupid here. Here's the sample code (which, when executed within a viewDidLoad block silently crashes... no error output to debug console). NSMutableArray *bs = [NSMutableArray arrayWithCapacity:10]; [bs addObject:[NSNumber numberWithInteger: 2]]; NSLog(@"%@", [bs count]); [bs release]; What am I missing? Oh... and in case anyone is wondering, this code is just me trying to figure out why I can't get the count of an NSMutableArray that actually matters somewhere else in the program.

    Read the article

  • Rolling back or re-creating the master branch in git?

    - by Matthew Savage
    I have a git repo which has a few branches - there's the master branch, which is our stable working version, and then there is a development/staging branch which we're doing new work in. Unfortunately it would appear that without thinking I was a bit overzealous with rebasing and have pulled all of the staging code into Master over a period of time (about 80 commits... yes, I know, stupid, clumsy, poor code-man-ship etc....). Due to this it makes it very hard for me to do minor fixes on the current version of our app (a rails application) and push out the changes without also pushing out the 'staged' new features which we don't yet want to release. I am wondering if it is possible to do the following: Determine the last 'trunk' commit Take all commits from that point onward and move them into a separate branch, more or less rolling back the changes Start using the branches like they were made for. Unfortunately, though, I'm still continually learning about git, so I'm a bit confused about what to really do here. Thanks!

    Read the article

  • Convince teammates to follow standards

    - by folone
    There's always one or two guys, who think, they are great programmers, and they don't need any literature/specifications/etc. They usually write awful code, that makes you want to hurt them. They catch and suppress Throwable's, return null's, concatenate String's in large loops, do other stupid stuff. So the question is — How do I make such a person follow best practices and specifications? He does not listen (cause he's the best programmer), team lead does not give a damn ("It actually works, so why changing it?.."), and I'm actually tired of rewriting that awful code on my own. What do I do? What would you do?

    Read the article

  • what this `^` mean here in solr

    - by Rahul Mehta
    I am confuse her but i want to clear my doubt. I think it is stupid question but i want to know. Use a TokenFilter that outputs two tokens (one original and one lowercased) for each input token. For queries, the client would need to expand any search terms containing upper case characters to two terms, one lowercased and one original. The original search term may be given a boost, although it may not be necessary given that a match on both terms will produce a higher score. text:NeXT ==> (text:NeXT^10 OR text:next) what this ^ mean here . http://wiki.apache.org/solr/SolrRelevancyCookbook#Relevancy_and_Case_Matching

    Read the article

< Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >