Search Results

Search found 20242 results on 810 pages for 'faith in unseen things'.

Page 11/810 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Update a list of things without hitting every entry

    - by bobobobo
    I have a list in a database that the user should be able to order. itemname| order value (int) --------+--------------------- salad | 1 mango | 2 orange | 3 apples | 4 On load from the database, I simply order by order_value. By drag 'n drop, he should be able to move apples so that it appears at the top of the list.. itemname| order value (int) --------+--------------------- apples | 4 salad | 1 mango | 2 orange | 3 Ok. So now internally I have to update EVERY LIST ITEM! If the list has 20 or 100 items, that's a lot of updates for a simple drag operation. itemname| order value (int) --------+--------------------- apples | 1 salad | 2 mango | 3 orange | 4 I'd rather do it with only one update. One way I thought of is if "internal Order" is a double value. itemname| order value (double) --------+--------------------- salad | 1.0 mango | 2.0 orange | 3.0 apples | 4.0 SO after the drag n' drop operation, I assign apples has a value that is less than the item it is to appear in front of: itemname| order value (double) --------+--------------------- apples | 0.5 salad | 1.0 mango | 2.0 orange | 3.0 .. and if an item is dragged into the middle somewhere, its order_value is bigger than the one it appears after .. here I moved orange to be between salad and mango: itemname| order value (double) --------+--------------------- apples | 0.5 salad | 1.0 orange | 1.5 mango | 2.0 Any thoughts on better ways to do this?

    Read the article

  • How to number things in PHP?

    - by Tanim
    I'm a front end guy (HTML/CSS) so please excuse this basic question. I just need to know what code in PHP I can use to number some text. Text Text Text into: Text Text Text Kind of like what <ol> does in html but in PHP.

    Read the article

  • Google Chrome is doing things wrong again

    - by Stefan Liebenberg
    Chrome is wrongly reporting width and height values for images during, or just after, load time. Jquery is used in this code example: <img id='image01' alt='picture that is 145x134' src='/images/picture.jpg' /> <script> var img = $( 'img#image01' ) img.width() // would return 145 in Firefox and 0 in Chrome. img.height() // would return 134 in Firefox and 0 in Chrome. </script> If you put the script in a onload function, the result is the same. but if you run the code a few seconds after the page has loaded, chrome returns the correct result. <script> function example () { var img = $( 'img#image01' ); img.width() // returns 145 in both Firefox and Chrome. img.height() // returns 134 in both Firefox and Chrome. } window.setTimeout( example, 1000 ) </script> Also if you specify the width and height values in the img tag, the script seems to work as expected in both Firefox and Chrome. <img id='image01' src='/images/picture.jpg' width=145 height=134 /> But as you cannot always control the html input, this is not an ideal workaround. Can jQuery be patched with a better workaround for this problem? or will I need to specify the width and height for every image in my code?

    Read the article

  • My OGL SDK missing things?

    - by user146780
    I downloaded this: http://www.videotutorialsrock.com/opengl2.exe . I'm trying to follow a tutorial to setup multisampling but GL_MULTISAMPLING_ARB is not defined, and many necessary wgl functions do not seem to be defined. Wht's wrong exactly? Thanks

    Read the article

  • Doing things with objects as if they were parents

    - by General Ackbar
    Sorry that this is probably a super noob question. But the following code give me an error saying that there are invalid arguments in my call of doStuffToLines(segments) shouldnt I be able to do this since I have my DimensionLineSegment inherits from Lines? private void doStuff() { List<DimensionLineSegment> segments = new List<DimensionLineSegment>(); doStuffToLines(segments); } private void doStuffToLines(List<Line> lines) { }

    Read the article

  • How to display more things in admin.StackedInline

    - by FurtiveFelon
    Hi all, I have Article model and a Comment model. Comment is created in admin.py as admin.StackedInline, and it has several fields, notably content and lastUpdate. For lastUpdate, i have specified as follows: lastUpdate = models.DateTimeField('last update', auto_now=True). Understandably, lastUpdate is not displayed when i try to add new comment (or edit old ones). However, i would like it to display for older comments if possible, as a read only thing. Is there anyway of accomplishing that? Thanks a lot! Jason

    Read the article

  • NoSuchMethodErrors say the darndest things

    - by keynan21
    So, I'm working in eclipse were everything compiles and runs correctly. However, when compiling under ant for the build server, A large number of tests fail with a NoSuchMethodError saying: class A implements B interface B extends C C requires method getSyncID() // standard getter for an int field. A.java contains getSyncID() A.class contains getSyncID() and yet the Error is still thrown. Does anyone know how the hell this could happen? how to fix it.

    Read the article

  • IIS 6.0 Rewrite rules for Wordpress (Forward slash not working and other things)

    - by DigitalBlade
    Hi, I am using Wordpress 3.0.4 on IIS 6.0 and Windows Server 2003, hosted by a company. I was having lots of issues using permalinks. I have fixed most, but now I have an issue with a forward-slash not being added to the address. This would be fine on most websites, but not on IIS for some reason. Specifically, if I go to "mysite.com/wp-admin" I can log-in and get to the dashboard, but as soon as I click anything there i am redirected to a broken link. For example: "mysite.com/post-new.php". If I add the slash at the end it's fine. So I tried to have a rewrite rule to automatically add the slash to such address: RewriteRule /wp-admin /wp-admin/ [L] But it still doesn't work. For your reference, here's the complete file: [ISAPI_Rewrite] RewriteBase / RewriteCond ${REQUEST_FILENAME} !-f RewriteCond ${REQUEST_FILENAME} !-d # For special WordPress folders (e.g. theme, admin, etc.) RewriteRule /wp-admin /wp-admin/ [L] RewriteRule /wp-(.*) /wp-$1 [L] RewriteRule /(.*\.(?:jpg|jpeg|gif|css|txt|xml|html|png|js)) /$1 [I,L] # Rules to ensure that normal content gets through RewriteRule /images/(.*) /images/$1 [L] RewriteRule /favicon.ico /favicon.ico [L] RewriteRule /robots.txt /robots.txt [L] RewriteRule /phpmyadmin/(.*) /phpmyadmin/$1 [L] RewriteRule /phpmyadmin /phpmyadmin/ [L] # For all WordPress pages RewriteRule ^/$ /index.php [L] RewriteRule /(.*) /index.php/$1 [L] Any ideas? Thanks in advance

    Read the article

  • drawbacks of storing all ''things' in a central table

    - by naiquevin
    Hi, I am not sure if there is a term to describe this, but I have observed that content management systems store all kinds of data in a single table with their bare minimum properties while the meta data is stored in another table in form of key value pairs. for eg. everything (blog posts, pages, images, events etc) is stored in one table and considered as a post. I understand that this allows for abstraction and easy extensibility we are considering designing our new project this way. It is not exactly a CMS but we plan to keep adding modules to it in stages. Lets say initially there will be only posts and images on which comments can be posted. Later on we might add videos which will also have the commenting feature. what are the drawbacks of this approach ? and will it work for a requirement like ours ? Thanks

    Read the article

  • Writing photos (and other things) to disk and getting them later in iphone

    - by ebabchick
    I'm trying to write an image to disk: NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsPath = [paths objectAtIndex:0]; NSString* savePath = [documentsPath stringByAppendingPathComponent:@"photo"]; BOOL result = [data writeToFile:savePath atomically:YES]; if(result) NSLog(@"Save of photo success!"); Then, later, I try to retrieve for a table view cell image: NSData* getPhoto = [NSData dataWithContentsOfFile:[leaf content]]; UIImage* myImage = [UIImage imageWithData:getPhoto]; cell.imageView.image = myImage; Yes, I checked to make sure the [leaf content] returns the same NSString as savePath. What else could be the problem? [NSData dataWithContentsOfFile:[leaf content]]; returns nil.... Thanks guys

    Read the article

  • [Win32/MFC] Making group-boxes contain things

    - by John
    As I understand it, a group-box is just another control. Controls inside it are not owned by it, so unlike in Winforms, if you move a group-box the contained controls stay put. What would be the nicest way to address this? Just create your own data-structure mapping controls to 'container' group-boxes so that when the container is moved the children are automatically moved?

    Read the article

  • count specific things within a code in c++

    - by shap
    can anyone help me make this more generalised and more pro? #include <fstream> #include <iostream> #include <string> #include <vector> using namespace std; int main() { // open text file for input: string file_name; cout << "please enter file name: "; cin >> file_name; // associate the input file stream with a text file ifstream infile(file_name.c_str()); // error checking for a valid filename if ( !infile ) { cerr << "Unable to open file " << file_name << " -- quitting!\n"; return( -1 ); } else cout << "\n"; // some data structures to perform the function vector<string> lines_of_text; string textline; // read in text file, line by while (getline( infile, textline, '\n' )) { // add the new element to the vector lines_of_text.push_back( textline ); // print the 'back' vector element - see the STL documentation cout << lines_of_text.back() << "\n"; } cout<<"OUTPUT BEGINS HERE: "<<endl<<endl; cout<<"the total capacity of vector: lines_of_text is: "<<lines_of_text.capacity()<<endl; int PLOC = (lines_of_text.size()+1); int numbComments =0; int numbClasses =0; cout<<"\nThe total number of physical lines of code is: "<<PLOC<<endl; for (int i=0; i<(PLOC-1); i++) //reads through each part of the vector string line-by-line and triggers if the //it registers the "//" which will output a number lower than 100 (since no line is 100 char long and if the function does not //register that character within the string, it outputs a public status constant that is found in the class string and has a huge value //alot more than 100. { string temp(lines_of_text [i]); if (temp.find("//")<100) numbComments +=1; } cout<<"The total number of comment lines is: "<<numbComments<<endl; for (int j=0; j<(PLOC-1); j++) { string temp(lines_of_text [j]); if (temp.find("};")<100) numbClasses +=1; } cout<<"The total number of classes is: "<<numbClasses<<endl;

    Read the article

  • Having onFocus do several things.

    - by Jakob
    So I have this input tag <input ... onFocus=...> and what I want is for a warning popup to come up if somebody clicks to write in the input field. After the person has read the warning he/she closes the popup and can continue to write in the field. I have managed to implement the popup just fine but my problem is that I lose focus on the input field when the popup comes up so the next time I click the field the popup comes back again and im back on square one. The system I work on uses php and javascript so and I cannot use anything other than that to solve the problem and my experience with both php and javascript is limited.

    Read the article

  • Shakin' things up

    - by j-t-s
    Hi All I have a little app here, and I would love to be able to do my own stuff in Vista/Win7 when I shake the form. Currently, when a form is shaken, it will restore/minimize everything else. But I want to change that behavior in my app only. So when my form is shaken, I could, for example, shuffle the playlist, or Clear the contents of a Canvas etc... Is this possible? Thank you

    Read the article

  • Odd Things of ASP.NET MVC Deployment on IIS 6

    - by misaxi
    Recently, I am a bit interested in the deployment of ASP.NET MVC application on IIS6 because Phil Haack posted an easier way to deploy ASP.NET MVC application on ASP.NET 4. So I decided to see how different version of ASP.NET MVC works on different version of ASP.NET. First off, I created an ASP.NET MVC 2 project in Visual Studio 2010 and deploy it to IIS 6 on Windows Server 2003 (only .NET framework 3.5 installed). I set the application to run in ASP.NET 2.0 and no extra stuff. Because I just wanted to see what sort of error would occur. And as expected, some error was reported as following. Then, I set the Copy Local attribute of System.Web.Mvc assembly to true as following and deploy again. As a result, the application ran smoothly. I had read tons of materials talked about the mess of deploying MVC application on IIS 6. And I did fight to tackle the deploying issues in my previous project. At least, if had used Extensionless Url in your application, you should have configured wildcard mapping in IIS. But in this case, I even didn’t have chance to do so. What the heck was going on exactly? Did I discover a new continent?

    Read the article

  • problem with jquery each and swich between 2 things

    - by moustafa
    first see this post i got this code $('.yesno').click(function(){ $('.yesno').each(function(i, v){ $(v).removeClass('selected'); }); $(this).addClass('selected'); return false; }); and html this <a href="#"> <span class="Yes yesno">Yes</span> </a> <a href="#"> <span class="No yesno">No</span> no the problem when i make more than one vote iam get very big problem see this <a href="#"> <span class="Yes yesno">Yes</span> </a> <a href="#"> <span class="No yesno">No</span> </a> <a href="#"> <span class="Yes yesno">Yes</span> </a> <a href="#"> <span class="No yesno">No</span> </a> </a> when click first yes its choose the first yes and hwen iam going to the next yes when click its because selected but the first yes because unselected i want make some thin make each yes and know is differant of others

    Read the article

  • Python Webkit browser's inspector is missing a few things

    - by NoBugs
    I'm using a Webkit browser inspector like this. When I run it in Ubuntu 12.10, I'm getting errors when using the inspector. For example: ** Message: console message: file:///usr/share/webkitgtk-1.0/webinspector/UIString.js @42: Localized string "Go to line" not found. ** Message: console message: file:///usr/share/webkitgtk-1.0/webinspector/UIString.js @42: Localized string "Filter" not found. ** Message: console message: file:///usr/share/webkitgtk-1.0/webinspector/UIString.js @42: Localized string "Search Previous" not found. ** Message: console message: file:///usr/share/webkitgtk-1.0/webinspector/UIString.js @42: Localized string "Search Next" not found. ** Message: console message: file:///usr/share/webkitgtk-1.0/webinspector/UIString.js @42: Localized string "a:" not found. ** Message: console message: file:///usr/share/webkitgtk-1.0/webinspector/UIString.js @42: Localized string "%d of %d" not found. (geany:2487): Gdk-CRITICAL **: IA__gdk_error_trap_pop: assertion `gdk_error_traps != NULL' failed ** Message: console message: file:///usr/share/webkitgtk-1.0/webinspector/UIString.js @42: Localized string "Sources Panel" not found. ** Message: console message: file:///usr/share/webkitgtk-1.0/webinspector/UIString.js @42: Localized string "Toggle breakpoint" not found. ** Message: console message: file:///usr/share/webkitgtk-1.0/webinspector/UIString.js @42: Localized string "Painting" not found. I also noticed the breadcrumb/slider bar doesn't show when you have the console in the lower half: I don't remember this in earlier versions, and when I use the GTK3 version (from gi.repository import WebKit etc) it has similar problem, and is even worse, scrollbars don't have arrows at top and bottom. Am I missing a step on initializing the Webkit inspector or English locale for it? I would like to debug this issue, but since the inspector object isn't a webview object, I'm not sure I can add an inspector to the inspector? (like how you can use F12 when inspector is its own window in Chrome/Chromium, which lets you debug that inspector). It should be possible, but maybe not with pyGTK?

    Read the article

  • The cross-thread usage of "HttpContext.Current" property and related things

    - by smwikipedia
    I read from < Essential ASP.NET with Examples in C# the following statement: Another useful property to know about is the static Current property of the HttpContext class. This property always points to the current instance of the HttpContext class for the request being serviced. This can be convenient if you are writing helper classes that will be used from pages or other pipeline classes and may need to access the context for whatever reason. By using the static Current property to retrieve the context, you can avoid passing a reference to it to helper classes. For example, the class shown in Listing 4-1 uses the Current property of the context to access the QueryString and print something to the current response buffer. Note that for this static property to be correctly initialized, the caller must be executing on the original request thread, so if you have spawned additional threads to perform work during a request, you must take care to provide access to the context class yourself. I am wondering about the root cause of the bold part, and one thing leads to another, here is my thoughts: We know that a process can have multiple threads. Each of these threads have their own stacks, respectively. These threads also have access to a shared memory area, the heap. The stack then, as I understand it, is kind of where all the context for that thread is stored. For a thread to access something in the heap it must use a pointer, and the pointer is stored on its stack. So when we make some cross-thread calls, we must make sure that all the necessary context info is passed from the caller thread's stack to the callee thread's stack. But I am not quite sure if I made any mistake. Any comments will be deeply appreciated. Thanks. ADD Here the stack is limited to user stack.

    Read the article

  • IE is doing strange things with JQuery

    - by Syncopated
    So ... The thing is, the code works in FireFox, no problems. But when I open the same page, it gives me the following error: "Undefined is null or not an object." But when I copy the code to a localhost page, it works fine. Also when I clear my cache in IE it works, but only once, if I refresh after that one load, it gives me the same error. Here is the code: <script type="text/javascript" src="datepicker/js/jquery-1.4.2.min.js"></script> <script type="text/javascript"> var count3 = 0; var count5 = 0; var count2 = 0; var count4 = 0; $(document).ready(function(){ $('#switch3').click(function(){ $('#switchDiv3').slideToggle(350); if(count3 == 0){ count3 = 1; document.getElementById('switchImage3').src = "images/ArrowDown.png"; return; } else { count3 = 0; document.getElementById('switchImage3').src = "images/ArrowRight.png"; return; } }); ... (this is the code for each item that is generated) </script> And the code that determines the div that should hide: <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td width="20" align="center" valign="top" style="padding-right: 3px"> <a style="cursor: pointer;" id="switch3"><img width="20" height="20" src="images/ArrowRight.png" id="switchImage3" style="border-style: solid; border-width: 1px; border-color: black;"/></a> </td> <td> <div id="switchDiv3"> <div align="left"> (Contents of the div here) </div> </div> </td> </tr> </table> Any help is appreciated! Thanks in advance

    Read the article

  • Unable to change two things about a single row in mysql with php

    - by user1624005
    Here's the code: $id = intval($_POST['id']); $score = "'" . $_POST['score'] . "'"; $shares = "'" . $_POST['shares'] . "'"; $conn = new PDO('mysql:host=localhost;dbname=news', 'root', ''); $stmt = $conn->prepare("UPDATE news SET 'shares' = :shares, 'score' = :score WHERE id = :id"); $stmt -> execute(array( 'shares' => $shares, 'score' => $score, 'id' => $id )); And it doesn't work. I am unsure as to how I would see the error that I assume mysql is giving somewhere, and I've tried everything I could think of. Using double quotes and adding the variables into the statement right away. Adding single quotes to shares and score. How am I supposed to be doing this?

    Read the article

  • What kind of things are easy in Haskell and hard in Scala, and vice versa?

    - by Daniel C. Sobral
    There has been some intermingling of Scala and Haskell communities, and I have noticed now and then people commenting on stuff that's supposed to be easy in Haskell and hard and Scala. Less often (maybe because I read Scala questions, not Haskell ones), I see someone mentioning that something in Scala is easier than in Haskell. So. I'd like to know from people who are knowledgeable in both what kind of things are easy in Haskell and hard in Scala, and, conversely, what kind of things are easy in Scala and hard in Haskell.

    Read the article

  • Things which should be know or learned with winforms.

    - by New User
    I am using with winforms with c#. I want to know what are the things which we should know or learn in winforms because I am developing winforms since only 6 months. But I think I have no enough knowledge of winform which I should have, so what should I learn or which are things which I should learn that helps me developing good application ? And I also want to know that what is about the future of the winform application ?

    Read the article

  • How to survive if you can only do things your way as a programmer?

    - by niceguyjava
    I hate hibernate, I hate spring and I am the kind of programmer who likes to do things his way. I hate micro-management and other people making decisions for me about what framework I should use, what patterns I should apply (hate patterns too) and what architecture I should design. I consider myself a successful programmer and have a descent financial situation due to my performance in past jobs, but I just can't take the standard Java jobs out there. I really love to design things from scratch and hate when I have to maintain other people's bad code, design and architecture, which is the majority you find out there for sure. Does anybody relate to that? What do you guys recommend me? Open up my on company, do consulting, or just keep looking hard until I find a job that suits my preferences, as hard as this may look like with all the hibernate and spring crap out there?

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >