Search Results

Search found 17953 results on 719 pages for 'someone like you'.

Page 47/719 | < Previous Page | 43 44 45 46 47 48 49 50 51 52 53 54  | Next Page >

  • SQL query INSERT not working inserting values into my DB.

    - by Aiden Ryan
    Hello, I'm trying to insert registration data into a database but my php code isn't inserting the values into the DB although I'm not getting any errors either, can someone help me? this is the code i'm currently using: $connect = mysql_connect("localhost","myusername","mypassword"); mysql_select_db("application"); $queryreg = mysql_query('INSERT INTO users("username","password","email","date") VALUES("$username","$password","$email","$date")'); die ("You Have Been Registered."); I just need to add the username password email and date into the fields i have specified but it won't work, please someone help!

    Read the article

  • Either .each do or .all isn't working how I think it should

    - by user1299656
    So whenever someone rates a shop, I want the Shop model to calculate its new average rating and store that in the database (instead of calculating the average every time someone looks at it). So I wrote the segment of code that follows, and it doesn't work. The loop always iterates exactly once, no matter how many shop_ratings in the database exist that have the shop's id as their shop_id. I played around with it a bit and found that every time a new rating is submitted the function is called successfully, but it only runs the loop once and sets the average to what the first rating was. I don't know if the "query" that sets the ratings variable is wrong or if it's the loop that's wrong. class Shop < ActiveRecord::Base has_many :shop_ratings attr_accessible :name, :latitude, :longitude validates_presence_of :name validates_presence_of :latitude validates_presence_of :longitude def distance_to(lat, long) return (self.longitude - long) + (self.latitude - lat) end def find_average total = 0 count = 0 ratings = ShopRating.all(:conditions => {:shop_id => id}) ratings.each do |submission| total = total + submission.rating count = count + 1 end update_attribute :average_rating, total/count end end

    Read the article

  • CustomError not working properly

    - by IrfanRaza
    Hello friends, I am using following setting for customError. < customErrors mode="On" defaultRedirect="GenericErrorPage.aspx" < error statusCode="403" redirect="NoAccess.aspx" / < error statusCode="404" redirect="FileNotFound.aspx" / < /customErrors I have a folder "Admin" having access to administrators role. When someone other than administrators tries to access the pages inside admin folder, it is redirected to login page. My expectation is to display "NoAccess.aspx". Whats wrong with this code? Or is there other meaning to statusCode=403. Could someone provide help on this. Thanks for sharing your valuable time.

    Read the article

  • Facebook email Permission, oath2, doesnt work?

    - by Mathias Eklöf
    since the new Auth Dialog from Facebook (for my App & homepage), I cannot get the dialog to show that my homepage/app needs the users email when connection to my homepage/app. In the Auth-section of my app I've added "email" to the User & Friend Permissions. Also I've added it to the referal when someone clicks the "Login with facebook"-button. When someone clicks the Facebook-button, he/she redirects to a page which has the PHP-code with Facebook SDK PHP (latest). Here's how I generate the send-to-url for the dialog: $login_url = $facebook-getLoginUrl(array('req_perms' = 'email,publish_stream')); header("Location: ".$login_url); But when the Dialog pops up, the only permission request it does is "basic information". I need to request the Email. Am I stupid or is it a bug somehow? I've also recreated the App.

    Read the article

  • How long can a hash left out in the open be considered safe?

    - by Xeoncross
    If I were to leave a SHA2 family hash out on my website - how long would it be considered safe? How long would I have before I could be sure that someone would find a collision for it and know what was hashed? I know that the amount of time would be based on the computational power of the one seeking to break it. It would also depend on the string length, but I'm curious just how secure hashes are. Since many of us run web-servers we constantly have to be prepared for the day when someone might make it all the way to the database which stores the user hashes. So, move the server security out of the way and then what do you have? This is a slightly theoretical area for many of the people I have talked with, so I would love to actually have some more information about average expectations for cracking.

    Read the article

  • How to undo SQL changes using installer

    - by Sunil Agarwal
    I have installer to install procedures, scripts, views, etc in SQL server 2005/2008. Now I want to add a condition in the installer like if there is any error while installing, I want to undo all the changes done in SQL server. I tried to store the procedures, views, etc which I am changing while installing and reverting them back if I get any error. But am not able to do it the way I want. Can someone guide me if he had done the same thing? To specify I am using WIX installer. Also if someone has tried SMO, it will be of great help.

    Read the article

  • Rails - inheritance hierarchy of classes where an subtipe can play two roles

    - by Miquel
    I need to model Owners and Rentees in an application, so you have stuff that is always owned by someone and can be rented for someone else. I first approached this problem with Single Table Inheritance because both types of person will share all attributes, so you would have a model called Person associated to a table people with Owner and Rentee inheriting from Person. The problem is that Single type inheritance discerns subtypes using a field type and therefore a record in the table can represent either an Owner or a Rentee but not both at the same time, while in the real context you can have an Owner which is renting something from another Owner and therefore that person is at the same time an Owner and a Rentee. How would you approach this problem? Would you use separated tables fro owners and rentees? Is there any other type of table inheritance in Rails?

    Read the article

  • C++ Multithreaded server help

    - by kisplit
    Hello all, I'm working on a multithreaded server in c++ using boost-asio. Currently a design problem I'm running into deals with erasing a connection. I have a single server instance which holds a vector of connection objects. These connections receive commands which I parse. One command in particular deals with sending data to ALL connections in my vector. Now when a connection disconnects I'm currently erasing this connection from the vector and calling the destructor. It seems like I'm going to run into problems when someone 'SendAll' at the same time someone 'Disconnect'. Could anyone recommend a better design or just point me in the right direction? Any help greatly appreciated. Thanks

    Read the article

  • Trouble shooting openGL text textures not showing up correctly cross platform

    - by Michael Minerva
    I have been tasked with solving a problem that is outside of my domain of knowledge and I was hoping I could get some troubleshooting advice from someone more experienced with openGL (I have very little experience with openGL). We are working on a cross platform application that is implemented in a common lisp implementation called ccl. In this application we have a need to display some 3D objects that display text. On the mac, all of the text displays fine but on the PC instead of displaying the text it displays some other texture. At first I thought that maybe the wrong texture was just being referenced so I tried changing the texture number but none of the textures in the list appeared to be the text (or if it was the texture was distorted and did not look like text). I know this problem is very vague and I am not looking for someone to post a solution, but I was wondering if people could suggest places I might look to try and get a handle on this issue.

    Read the article

  • Does deleting temporary symlinks interrupt current downloads/access to that symlink?

    - by Joe
    I am using symlinks generated in PHP. They are generated when someone requests a download, and I want them to expire at the end of each day. The problem is, what if someone starts downloading a symlink 1 minute before the end of the day and then I delete the symlink while they are downloading it... My question is, to your knowledge will that individual downloading the symlink, right before I delete it, still be able to "download" the file? I am not worried about "resumable download" capability.. but will it make their download stop or break in some way?

    Read the article

  • C++ Translation Phase Confusion

    - by blakecl
    Can someone explain why the following doesn't work? int main() // Tried on several recent C++ '03 compilers. { #define FOO L const wchar_t* const foo = FOO"bar"; // Will error out with something like: "identifier 'L' is undefined." #undef FOO } I thought that preprocessing was done in an earlier translation phase than string literal operations and general token translation. Wouldn't the compiler be more or less seeing this: int main() { const wchar_t* const foo = L"bar"; } It would be great if someone could cite an explanation from the standard.

    Read the article

  • VS 2008 - Procedure to ship C#/WPF solution to ensure compatibility

    - by Bill
    I am attempting to collaborate on a C#/WPF project with another developer remotely via e-mail; and although the code compiles perfectly when it leaves, my collaborator has not been able to compile the code on his side. We are both using VS 2008 Version 9. This is the first time trying to work with someone else on an application and I was hoping that someone would advise me if there are any suggestions to obtain and ensure compatibility between the two of us? Additionally, is there a recommended procedure to prepare the solution for shipment (ie. just zip up the solution folder? export the application? etc.)? Thanks very much.

    Read the article

  • Is there a good (standalone) PHPDoc parser class or function in PHP?

    - by Kris
    Hi folks, I'm looking for some method of converting a PHP Docblock (as used for generating documentation by tools like Doxygen) into a structure I can inspect in PHP. For example, I want to parse the following lines: /** * Multiply two values * @CHECKME * * @author someone * @created eons ago * * @param integer $x * @param integer $x * * @return integer */ function multiply($x, $y) { return $x * $y; } Into something similar to: array( 'author' = 'someone' ,'created' = 'eons ago' ,'param' = array( 'integer $x' ,'integer $y' ) ,'_flags' = array( '@CHECKME' ) ); I explicitly cannot use PEAR or any such library, it has to be relatively standalone. Any given solution that is better than using a bunch of regexes after stripping away comment outline would be awesome.

    Read the article

  • C# app that uses Excel Interop, easy switch between 2003 2007?

    - by user320781
    I have an app written that just does really basic I/O on a spreadsheet. Read in a bunch of cells, do some sorting, and dump the output back into another spreadsheet. Works great on my machine. I have Office 2003 installed. When it runs on someone elses machine with 2007, it bombs, presumably due to the different versions of the Interop assemblies. I was hoping someone knew a way to dynamically change which/where the assembly is loaded from depending on the office version (getting the office version is easy from the registry). Sifting thru the rest of the internet, i didnt see anything to indicate that was possible :( . I tried installing the 2007 PIAs, but when i try to add a reference, they dont show up and i have no idea where to browse for them (they arent in the c:\windows\assemblies\; maybe the install didnt work). Am I going to have to get a machine with 2007 installed to build on every time i need to make updates?

    Read the article

  • Is there anything like Zope Page Templates for Ruby on Rails?

    - by dan
    I have a Ruby on Rails app that I built myself, but which needs a redesign by a professional designer. I know most designers just give you Photoshop mockups and slices, but I would like to hire someone to implement the design as well, which means rewriting the css style sheets and the erb and haml templates. The problem is that I want someone else to implement the redesign without exposing my business logic code to the redesign implementer. Also, I wish there was a way to allow a designer to implement a redesign on a Ruby on Rails site without having to know anything about Ruby on Rails. Are either of these scenarios possible using any combination of software tools? I guess I'm looking for something like Zope Page Templates, but for Ruby on Rails. http://quintagroup.com/cms/zpthttp://quintagroup.com/cms/zpt

    Read the article

  • Retrieving content of a txt file from URL to Android

    - by eightx2
    I would like to be able to retrieve contents of a .txt file from the internet, and load it in an EditText. I tried using the code on this page: Reading Text File From Server on Android It didn't work, as you might have guessed. I've read on numerous sites about this type of problem, but I can't get anything to work. Someone suggested AndroidHttpClient (http://developer.android.com/reference/android/net/http/AndroidHttpClient.html), but I simply can't find any examples with this. As I'm a newbie in Android programming, I would love if someone could please give me a small example.

    Read the article

  • how to convert server datetime to client machine datetime for the website.

    - by Shailendra
    I have datetime fieldI have datetime field into the database which stores the universal time i.e. UTC time. I want to show the datetime at the client machine in clients time zone and format. Example: Someone from US updated the database field for a site and it is stored into the UTC format. Someone from India goes and sees the site . What i want is that the person from India sees the time in IST or from Australia sees in his local machines time format not the server time format and zone. Whats the best way to do this ?? Please paste code snippet if you have. Thanx in advance!

    Read the article

  • iPhone:(Three20)Unselect (Unhiglight) TTTabItem dynamically?

    - by user187532
    Hello friends, I have four TabBarItem (TTTabItem) in a TabBar (TTTabBar). In one case, i want to remove the TabBarItem selection from any of the four TabBarItems (TTTabItem) . i.e., the complete TabBar will not show any TabBarItems selected. Can i achieve it? I tried the following, [_tabBar1 setSelectedTabItem:nil]; But it is crashing. Could someone guide me to resolve this? I need help urgently. (OR) If we clicked on one TabBarItem(TTTabItem), then again clicking on same TabBarItem(TTTabItem) will not call/execute anything right. Can i make it always clicking on a TabBarItem, should call "(void)tabBar: (UITabBar *)tabBar didSelectItem:(UITabBarItem *)item" (or) any other relevant system functions? I need your helps urgently, could someone guide me for my issue? Thank you.

    Read the article

< Previous Page | 43 44 45 46 47 48 49 50 51 52 53 54  | Next Page >