Daily Archives

Articles indexed Monday December 27 2010

Page 6/30 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Cant get the child dir in django hosting (alwaysdata.com) .

    - by zjm1126
    this is my file : mysite templates homepage.html accounts a.html login_view.html i can get the homepage.html and accounts\a.html on 127.0.0.1:8000 but in http://zjm1126.alwaysdata.net , i can only get the homepage.html ,and cant get the account\a.html , this is my code : return render_to_response('accounts/login_view.html') and the accounts/login_view.html is : {% include "accounts\a.html" %} what can i do , thanks ,

    Read the article

  • retrieved upload images in php

    - by hunter
    i want to retrieve image from client (ipod) programmed in objective c i use the following code $TARGET_PATH = "pics/"; $image = $_FILES['photo']; $TARGET_PATH =$TARGET_PATH . basename( $_FILES['photo']['name']); $TARGET_PATH =$TARGET_PATH.".jpg"; if(file_exists($TARGET_PATH)) { $TARGET_PATH =$TARGET_PATH .uniqid() . ".jpg"; } if (move_uploaded_file($image['tmp_name'], $TARGET_PATH)) { $TARGET_PATH="http://www.".$_SERVER["SERVER_NAME"]."/abc/".$TARGET_PATH; echo $TARGET_PATH; echo "image upload successfully";} else{ echo "could not upload image"; } this code upload five to six images successfully and after that it gives me error i.e Notice: Undefined index: photo in /home/abc/public_html/abc.com/fish/mycatch_post.php on line 42 Notice: Undefined index: photo in /home/abc/public_html/abc.com/fish/mycatch_post.php on line 53 could not upload image

    Read the article

  • Prevent strings stored in memory from being read by other programs

    - by Roy
    Some programs like ProcessExplorer are able to read strings in memory (for example, my error message written in the code could be displayed easily, even though it is compiled already). Imagine if I have a password string "123456" allocated sequentially in memory. What if hackers are able to get hold of the password typed by the user? Is there anyway to prevent strings from being seen so clearly? Oh yes, also, if I hash the password and sent it from client to server to compare the stored database hash value, won't the hacker be able to store the same hash and replay it to gain access to the user account? Is there anyway to prevent replaying? Thank You!

    Read the article

  • How to implement multi relationship in MS SQL?

    - by Ethan
    I’m trying to design a database to use with ASP.net MVC application. Here is the scenario: There are three entities and users can post their comments for each of these different entities. I just wonder how just put one table for Comments and link all other entities to it. Obviously, Comments table needs 3 references (foreign key) to those tables but as you know these foreign keys can’t be null and just one of them can be filled for each row. Is there any better way than implementing three different tables for each entity’s comments? Cheers Ethan

    Read the article

  • Override jQuery functions

    - by MotionGrafika
    Is there way to override jQuery's core functions ? Say I wanted to add an alert(this.length) in size: function() Instead of adding it in the source size: function() { alert(this.length) return this.length; }, I was wondering if it would be possible to do something like this : if (console) { console.log("Size of div = " + $("div").size()); var oSize = jQuery.fn.size; jQuery.fn.size = function() { alert(this.length); // Now go back to jQuery's original size() return oSize(this); } console.log("Size of div = " + $("div").size()); }

    Read the article

  • CLLOcationManager will work correctly in iphone sdk?

    - by Mikhail Naimy
    hi, I am using the code which is in the URL stackoverflow.but I have done database operation in that method(didEnterRegionCLRegion ).Will it work correctly without opening the application (in background).I have given alert also.but it is not called.anyone who is experienced , help me in this matter?I am in India..will it give only correct GEO information only for AT&T service provider?Apple did not give any sample code for it?I have registered location in viewcontroller, i have to do the same in any Delegate methods?

    Read the article

  • At what level should security be implemented in a social network web application ?

    - by Rajkumar Gupta
    I am developing a social web application in php/mysql, I would like to hear your advice about what would be a better way to implement security. I am planning something like this:- At the presentation level, I restricting the user to see only those items/content he is eligible to see with the rights he is eligible & at the database level, whenever my data is read/ written or updated I verify that the person has rights to such interactions with that part of data. So for each action there is 2 layers of security one at the view level & another at the database level. Would double checking be much overhead ? ofcourse this handles only with the internal security issues ..

    Read the article

  • SQLite: does data type depend on the quotes?

    - by Septagram
    In SQLite, the datatype of a value is associated with the value itself, not with the column type. So suppose we have a table with an integer primary key "id" and an integer column "some_number". If I do a query like this: INSERT INTO mytable (id, some_number) VALUES (NULL, "1234") Will 123 be inserted as an integer or as string? What consequences it will have later for me, say, when I'm comparing it with other value like "234" (as a number 1234 234, as a string "1234" < "234", right?)?

    Read the article

  • Doing some downloading without blocking you app

    - by Code
    Hi guys, I'm working on my first app that's doing a few different web connections at once. My first screen is my Menu. And at the bottom of viewDidLoad of MenuViewController i call a method that gets and parses a .xml file that is located on my webserver. Also at the bottom of viewDidLoad i do FootballScores = [[FootBallScores alloc] init]; and FootballScores makes a connection to a html page which it loads into a string and then parses out data. Now since both of these are getting called at the bottom of viewDidLoad of the class thats is responsible for the main menu(first screen in the app) it means the app is kinda slow to load. What is the right way to do the above? Should i remove the 2 pieces of code from my viewDidLoad and replace with maybe dataGetterOne = [NSTimer scheduledTimerWithTimeInterval:1.000 target:self selector:@selector(xmlParser) userInfo:nil repeats:NO]; dataGetterTwo = [NSTimer scheduledTimerWithTimeInterval:2.000 target:self selector:@selector(htmlParser) userInfo:nil repeats:NO]; This would mean that the methods get called later on and the viewDidLoad gets to finish before the i try get the data from the web servers. Making 2 connections to we bservers a second apart to quick? Can the iphone handle having 2 connections open at once? I'm really unsure of anything bad/dangerous I am doing in regards to connections. Many Thanks -Code

    Read the article

  • error in creating my own Robot class in android..

    - by manju
    Hi All, I have decided to create my own Java's Robot class in android to take screen capture..i have written the source code of the robot class by my own but the problem is here, the following line in the code is throwing compilation error..saying "The method createRobot(Robot, GraphicsDevice) in the type ComponentFactory is not applicable for the arguments (Robot, GraphicsDevice)" peer = ((ComponentFactory)toolkit).createRobot(this, screen); Can anyone suggest me what would be the solution.... thanks..

    Read the article

  • Background image not getting vertically stretched in Chrome.

    - by KPL
    Hi all, The CSS - #header { overflow: hidden; background: url(images/header-bg.png) top repeat-x #FFFFFF; position: relative; border: none; display: block; height: 125px; width:100%; } The HTML - <div id="header"> <a href="http://localhost/" title="Dev" id="logo"><img src="images/logo.png" alt="" /></a> </div> This works good in Firefox - But not in Chrome :( - The image isn't being stretched vertically in Chrome. Help! Just a note, I'm on Linux.

    Read the article

  • Check the value from DBand pass it to next page

    - by user554176
    I have a field ,if user enters data it should go and check db if it is present it should redirect to next page. But here i m not sure whether it is checking the db but mysql query is correct. $ThirdPartyCategoryName =$_POST['ThirdPartyCategoryName']; $activate = mysql_query("SELECT * FROM `thirdpartycategorymaster` WHERE `delete` = 'y' "); if($activate=='y') { header("location:catact.php"); } else { //$activate=='NULL'; header("location:tp_home.php"); }

    Read the article

  • Arduino variable going blank after first pass.

    - by user541597
    I have an arduino sketch that takes a timet and when that timet is equal to the current time it sets the new timet to timet + 2. For example: char* convert(char* x, String y){ int hour; int minute; sscanf(x, "%d:%d", &hour, &minute); char buf[6]; if (y == "6"){ if (hour > 17){ hour = (hour+6)%24; snprintf(buf, 10, "%d:%d", hour, minute ); }else if (hour < 18){ //hour = hour + 6; minute = (minute + 2); snprintf(buf, 10, "%d:%d", hour, minute); } } if (y == "12"){ if (hour > 11){ hour = (hour+12)%24; snprintf(buf, 10, "%d:%d", hour, minute ); } else if (hour < 12){ hour = hour + 12; snprintf(buf, 10, "%d:%d", hour, minute); } } if (y == "24"){ hour = (hour+24)%24; snprintf(buf, 10, "%d:%d", hour, minute ); } return buf; } sketch starts for example at 1:00am timet is set to 1:02, at system time 1:02 timet == system time my loops looks like this: if (timet == currenttime){ timet = convert(timet) } From this now when ever I check the value of timet it should equal 1:04, however I am getting the correct value at the first run after the execution of convert however everytime after that my timet value is blank. I tried changing the code instead of using the if loop I only run the convert function when I send for example t through the serial monitor, this works fine and outputs the correct timet after the execution of the convert function, So I figured the problem is in the if loop... Any ideas?

    Read the article

  • Where does output of print in kernel go?

    - by apoorv020
    I am debugging a driver for linux (specifically ubuntu server 9.04), and there are several printf statements in the code. Where can I view the output of these statements? EDIT1: What i'm trying to do is write to kernel using the proc file-system. The print code is static int proc_fractel_config_write(struct file *file, const char *argbuf, unsigned long count, void *data) { printk(KERN_DEBUG "writing fractel config\n"); ... In kern.log when I see the following message when i try to overwrite the file /proc/net/madwifi/ath1/fractel_config (with varying time of course). [ 8671.924873] proc write [ 8671.924919] Any explainations?

    Read the article

  • Application Distribution

    - by FrozenWasteland
    I have a SDL app that compiles fine, and the images show up, but only if they are in the correct folder with the binary next to them, if the images are moved they wont show up next time the application is run. How can I make a complete binary that will allow me to compile the images as well as the code, so that I can distribute one single binary, and not a zip file with all of my assets. I have looked into writing a .deb file which is what I think I need, but the process looked complicated. I am running Ubuntu 10.10 I only need to distribute to Ubuntu

    Read the article

  • Jazz up your web forms using jQuery animation effects

    - by bipinjoshi
    In this part I cover how to add jazz to your web forms using jQuery effects. jQuery provides a set of methods that allow you to create animations in your web pages. Collectively these methods are called as Effects. The effects they render include fading in and out, sliding in and out, changing opacity of elements, hiding and showing elements and so on. You can, of course, define custom animations. In this part we will use these effects to develop a tooltip, master-detail listing and progress indicator.http://www.bipinjoshi.net/articles/9b1f4a81-ae07-4859-8ff2-067e5887adbd.aspx   

    Read the article

  • subnetting a class c on a cisco 3825

    - by Adeodatus
    I have a class C that I want to better understand before I implement a change. Right now, ip address 192.168.0.1 255.255.255.192 ip address 192.168.0.65 255.255.255.240 secondary So, where is the 192.168.0.64 address in that mix? 192.168.0.63 should be the broadcast for the first one, and 192.168.0.65 should be the cisco secondary ip. And ... How then do I add a /28 (255.255.255.240) right before this segment: ip address 192.168.0.249 255.255.255.248 secondary In fact, I'll probably want to add it as a subinterface Can anyone help me to better understand whats going on and then how to do it?

    Read the article

  • Why should I use Amazon Route 53 over my registrar's DNS servers?

    - by Abtin Forouzandeh
    I am building a site that I anticipate will have high usage. Currently, my registrar (GoDaddy) is handling DNS. However, Amazon's Route 53 looks interesting. They promise high speed and offer globally distributed DNS servers and a programmable interface. While GoDaddy doesn't offer a programmable interface, I assume their servers are geographically distributed as well. What are the main reasons I should opt to use Amazon Route 53 over free registrar-based DNS?

    Read the article

  • PeerApp Scalability

    - by ChaosFreak
    William, In response to a question on P2P caching, you answered "PeerApp can do that but probably doesn't suit the scale you are looking at." PeerApp is the most scalable P2P cache in the world, and can handle hundreds of Gb per second of bandwidth. Their largest deployment in Taiwan handles 120Gbps with no problem. The next largest competitor, OverSi, can barely handle a tenth of that. Where do you get your information that PeerApp "doesn't suit scale"?

    Read the article

  • Ram not working in dual dynamic paging mode

    - by Robin Agrahari
    My motherboard is Intel D865GVHZ I m using 512 mb ram and recently i purchased a 512 mb ram of same company same speed(333) and same manufacturer. but my pc is not booting in dual dynamic paging mode . It is not at all booting and the screen freezes on windows logo screen at start up. i checked installing individual rams one by one and the pc is working with either of the ram installed individually. But wen i install both the pc is not working. One more point i found is my one ram has 8 chips on both sides while the other ram has 4 chips on both sides. Is that the root of the problem ?? plz help sir. in hope robin

    Read the article

  • How to view .docx and .doc file on mac os x10.6.5

    - by Harri
    I want to view .docx file and .doc file in my mac os x10.6.5.When i open this type of file it shows only text in text editor.The docx file has some more images i didnt able to see. Is there any default application in my mac to view these two files.Are i want to download some application to view those files ?If yes means what are the application really need for these files ? Can anyone help me ? Thanks in advance...

    Read the article

  • Is there extensible structured file analyzer, like network analysis tools?

    - by ???
    There are many network analysis tools like Wireshark, Sniffer Pro, Omnipeak which can dump the packet data in structured manner. I'm just writing my own file analyzer for general purpose, which can dump JPEG, PNG, EXE, ELF, ASN.1 DER encoded files, etc. in tree style. There are so many file formats in the world that I can't handle them all. So I'm wondering if there's some software already there, with pluggable architecture and a large established file format repository?

    Read the article

  • How can I figure out exactly which process is keeping my Mac from going to sleep and waking it up?

    - by pattern86
    I have read this knowledgebase article, but would like to know if there's a way to tell exactly which process is causing my Mac not to follow the sleep schedule I have set in System Preferences Energy Saver. I have narrowed it down to a being a process and will explain why I think so (see below). I am running OS X (10.6.5) on the new iMac 27" and I am certain it's not the following: The "Wake for Network Access" checkbox in Energy Saver settings (has never been a previous issue) Peripherals (has never been a previous issue) Any active GUI application (all are closed) Additional USB/FireWire drives (none are connected) Bluetooth (it's off) Sharing services (has never been a previous issue) The symptoms are as follows: The computer doesn't go to sleep at the predetermined time. It will wake up some number of hours after being put manually to sleep (but not within the first few seconds/minutes.) Is there a specific string I should be looking for in Console? I have tried searching for "wake" and "sleep" but can't make total sense of the results.

    Read the article

  • Programming concepts taken from the arts and humanities

    - by Joey Adams
    After reading Paul Graham's essay Hackers and Painters and Joel Spolsky's Advice for Computer Science College Students, I think I've finally gotten it through my thick skull that I should not be loath to work hard in academic courses that aren't "programming" or "computer science" courses. To quote the former: I've found that the best sources of ideas are not the other fields that have the word "computer" in their names, but the other fields inhabited by makers. Painting has been a much richer source of ideas than the theory of computation. — Paul Graham, "Hackers and Painters" There are certainly other, much stronger reasons to work hard in the "boring" classes. However, it'd also be neat to know that these classes may someday inspire me in programming. My question is: what are some specific examples where ideas from literature, art, humanities, philosophy, and other fields made their way into programming? In particular, ideas that weren't obviously applied the way they were meant to (like most math and domain-specific knowledge), but instead gave utterance or inspiration to a program's design and choice of names. Good examples: The term endian comes from Gulliver's Travels by Tom Swift (see here), where it refers to the trivial matter of which side people crack open their eggs. The terms journal and transaction refer to nearly identical concepts in both filesystem design and double-entry bookkeeping (financial accounting). mkfs.ext2 even says: Writing superblocks and filesystem accounting information: done Off-topic: Learning to write English well is important, as it enables a programmer to document and evangelize his/her software, as well as appear competent to other programmers online. Trigonometry is used in 2D and 3D games to implement rotation and direction aspects. Knowing finance will come in handy if you want to write an accounting package. Knowing XYZ will come in handy if you want to write an XYZ package. Arguably on-topic: The Monad class in Haskell is based on a concept by the same name from category theory. Actually, Monads in Haskell are monads in the category of Haskell types and functions. Whatever that means...

    Read the article

  • If you had three months to learn one relatively new technology, which one would you choose?

    - by Ivo van der Wijk
    This question was taken from CodingHorror. On my list would be (and some actually are): Android Development (and possibly iPhone development) Go language and its concurrency NoSQL, specifically CouchDB RCTK, which happens to be my own idea / project (but all ideas have been thought or already, what matters is my implementation) But I don't think I'm being cutting-edge/thinking-outside-the-box here. What's on your list? Please don't restrict yourself to the list above - that's my list. I'm interested in hearing what others find interesting new technology.

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >