Daily Archives

Articles indexed Sunday April 4 2010

Page 9/76 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • clearing cin input? cin.ignore not a good way?

    - by igor
    What's a better way to clear cin input? I thought cin.clear and cin.ignore was a good way...? code: void clearInput() { cin.clear(); cin.ignore(1000,'\n'); //cin.ignore( std::numeric_limits<streamsize>::max(), '\n' ); } My teacher gave me this reply... this is basically saying that your clearInput doesn't work FYI: ignore is NEVER a good idea as a way of getting rid of all that remains on a line and your failing this test is exactly the reason why now go clear it the correct way

    Read the article

  • samsung CLP-310N password recovery

    - by alumb
    I have a Samsung CLP-310N printer and I'm trying to get the Administrator password. Is there a default password? Any way to reset the printer to defaults? Anyone run into this problem before? (I tried Network Settings -- Reset -- Factory Defaults, but that requires a password)

    Read the article

  • Implementing 1 to n mapping for ORM c++

    - by karan
    I am writing a project where I need to implement a stripped down version of an ORM solution in C++. I am struck in implementing 1-n relationships for the same. For instance, if the following are the classes: class A { ... } class B { ... std::list<A> _a_list; ... } I have provided load/save methods for loading/saving to the db. Now, if I take the case of B and the following workflow: 1 entry from _a_list is removed 1 entry from _a_list is modified 1 entry is added to _a_list Now, I need to update the db using something like "b.save()". So, what would be the best way to save the changes, i.e, identify the additions, deletions and updates to _a_list.

    Read the article

  • Connect to a network via the command line [closed]

    - by justasking
    I want to be able to connect to a network via command line in Windows. My goal is to script out remoting into my work computer. I hate having to always manually connect to the VPN connection and then rdping into my work machine. I want to just have a script which will do both of it for me. I know how to rdp via command line, I just need to know how to connect to my VPN via command line.

    Read the article

  • Stop applet execution on load, pause/resume using javascript?

    - by Zane
    I'm making something of a java applet gallery for my website (processing applets, if you're interested) and I'd like to keep the applets from running when the sit first loads. Then, when the appropriate button is clicked, a piece of javascript would tell the applet to continue execution until another button is pressed to stop it. I know that I can use appletName.start() and appletName.stop(), but it doesn't seem to work on load, at least not well. I'm using element.getElementsById( "applet" ) to get the applets to use the start and stop methods on. It slows Firefox to a crawl for some reason.

    Read the article

  • Connect to a network via the command line

    - by justasking
    I want to be able to connect to a network via command line in Windows. My goal is to script out remoting into my work computer. I hate having to always manually connect to the VPN connection and then rdping into my work machine. I want to just have a script which will do both of it for me. I know how to rdp via command line, I just need to know how to connect to my VPN via command line.

    Read the article

  • Git How do I Push a project, that was Downloaded from Source

    - by JZ
    I worked with a graphic designer that did not clone from my github account. He downloaded the project from source rather than using the command "git clone". Since he pulled his files, a month has gone by and I want to do the following tasks: Create a new branch Push the graphic designers project into that branch Merge his branch with Master I've tried the following the github forking guide with not much luck; when I attempt to push the files into a new branch I get an error: fatal: Not a git repository (or any of the parent directories): .git How do I do this?

    Read the article

  • How to load one div into another.

    - by Vinodtiru
    Hi, I have a page with 10 different div contents in it. Based on my button click i want the 11th div to load content or just take a copy of div 1 to 10. I mean like on button1 it should load div 1 and on button 2 i will load div 2 etc. All my div 1 to 10 will be hidden and the 11th div alone will be visible. I need this because of my below hierarchy. - Main Page (having the 10 div) ->inner div which is loaded by a ajax request.(this has 11th div and buttons) Now on click of any button like 1 to 10 its respective divs is supposed to be loaded from the div in the main page. I would like to do this by java script or jquery. Please let me know any possibilities. Any kind of suggestions or solutions is appreciated.

    Read the article

  • UIWebView EXC_BAD_ACCESS crash

    - by HARDWARRIOR
    I'm experiencing crashes of an app that uses UIWebView. Usually it's when page is not fully loaded and UIWebView is sent stopLoading selector. Or when UIWebView fully loaded page. I've got EXC_BAD_ACCESS. Stack looks like this: #0 0x95bb7688 in objc_msgSend #1 0x30a671db in -[UIWebView webView:decidePolicyForNavigationAction:request:frame:decisionListener:] #2 0x3024a10d in __invoking___ #3 0x30249ff8 in -[NSInvocation invoke] #4 0x358ab160 in HandleDelegateSource #5 0x302452c1 in CFRunLoopRunSpecific #6 0x30244628 in CFRunLoopRunInMode #7 0x32044c31 in GSEventRunModal #8 0x32044cf6 in GSEventRun #9 0x309021ee in UIApplicationMain #10 0x0000239c in main at main.m:13 for me most strange thing here is webView:decidePolicyForNavigationAction:request:frame:decisionListener: selector sent to UIWebView, because there is no such selector in UIWebView documentation! Only for Cocoa (not cocoa touch) WebView. I suspect that there is something wrong with UIWebView or its delegate. But I can't set breakpoint to watch them. Please advise how I can get more info in this situation.

    Read the article

  • Matching a date in perl

    - by Zerobu
    Hello, I want to match a date in the format day/month/year. where day is two digits month is two digits and year is four digits. Also, I want to check see if it is a valid date, for example knows when is leap year, and know which month has 30days, 31days and 28, or 29 days for Februrary.

    Read the article

  • calligraphy fonts on a website

    - by oo
    if i want to have some text show up in a calligraphy font, how do i know how it will render of the users computer. How do i know what fonts that person has on the computer or does it matter? any good examples of doing this in css? would i be better off putting something together in photoshop and saving as an image?

    Read the article

  • Help securing files access with htaccess and php?

    - by bschaeffer
    I'm working on a site that allows users to purchase digital content and have implemented a method that attempts to serve secure downloads. I'm using CodeIgniter to force downloads like this: $file = file_get_contents($path); force_download("my_file_name.zip", $file); Of course, I make sure the user has access to the file using a database before serving the download, but I was wondering if there was a way to make these files more secure. I'm using a some 8-10 letter keys to create the file paths so urls to the files aren't exactly easy to figure out... something like http://mysite.com/as67Hgr/asdo0980/uth89.zip in lieu of http://mysite.com/downloads/my_file.zip. Also, I'm using .htaccess to deny directory browsing like so: Options All -Indexes. Other than that... I have no idea what steps to take. I've seen articles suggesting username and password methods using .htaccess, but I don't understand how to bypass the password prompt that would occur using that method. I was hoping there might be a method where I could send a username and password combination using headers and cUrl (or something similar), but I wouldn't know where to start. Any help would be hugely appreciated. Thanks in advance!

    Read the article

  • PHP5 and SOAP/WSDL?

    - by NeoNmaN
    I have a big problem right now, i need to create my own webservices but i relly don't know how, can sombardy help me? maby link to easy way to make WSDL/SOAP code? i have try NuSoap but i can't get final whit this code, pls help me. :)

    Read the article

  • How do I fix this error? config.gem: Unpacked gem authlogic-2.1.3 in vendor/gems has no specificatio

    - by Ganesh Shankar
    I get this error when launching my Mongrel server... $ script/server --debugger => Booting Mongrel => Rails 2.3.5 application starting on http://0.0.0.0:3000 config.gem: Unpacked gem authlogic-2.1.3 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this. => Debugger enabled => Call with -d to detach => Ctrl-C to shutdown server When I run rake gems:refresh_specs like it suggests I get another error though: rake aborted! undefined method `installed_source_index' for #<Gem::SourceIndex:0x100551a58> Any thoughts on how to fix this?

    Read the article

  • Check if key is pressed using python (a daemon in the background)

    - by Nazarius Kappertaal
    I've created a python script in which an event needs to be executed each time I press the Super (or WinKey) on my keyboard. How can one achieve this without the python process being "focused" - as it is running in the background waiting for the key to be pressed to execute the event? I've seen a lot of posts around the web showing me how to read input - but they have all required one to have the process "focused" and none have showed me how to capture the Super (or WinKey) using a python script. I'm running Ubuntu 9.10.

    Read the article

  • Should we seal Singletons? Should we try to inherit from Singletons in the first place?

    - by devoured elysium
    Should a Singleton class be allowed to have children? Should we seal it? What are the pro's and con's? For being able to inherit from a Singleton class, we would have to make the constructor protected instead of private. Now, that will be fine in c#, but the protected word in java gives both child-classes and package-classes access to the constructor. Which means not only classes that inherit from our Singleton can access the constructor but other classes in the same package can do it. I'm a bit confused about all this facts. Maybe I am making a big fuss about nothing to worry about too much? Until now, I never had any necessity of trying to inherit from a Singleton, so maybe this is just an academic question! Thanks

    Read the article

  • Show Add button after Edit button is clicked?

    - by David.Chu.ca
    I have a view with navigation bar control on the top. The view is in the second level with a "back" button is displayed on the left by default. In my view class, I added a default navigation edit button on the right: self.navigationbarItem.rightButtonItem = self.editButtonItem; with this line of code, an edit button is on the right side, and when it is clicked, the view (table view) becomes editable with delete mark on the left for each row. After that, the edit button's caption becomes "done". All those are done by the default edit button built in the navigation control, I think. I would like to add an add button the left, or replace "back" button when edit is clicked. I guess I have to implement some kind of delegate in my view class. This would provide a place to plug in my code to add the add button on the left when edit button is clicked, and to restore "back" button back when the done button is clicked. If so, what's the delegate? Or is there any other way to achieve it?

    Read the article

  • css & horizontal scrolling

    - by zen
    One of my most favorite websites is that of the Oxford Hotel in Romania. I like the simplicity of the site and how it flows. I am trying to create a similar scrolling effect using jquery and I've been somewhat successful to a point. My trouble is with css... I am not a wizard in that department. Anyway,...my questions! 1. How can I first make sure that the ".box" class will be in the center of the page when the corresponding link is clicked? Right now it positions itself on the left. 2. Then, how can I tweak this code so that the user only can see the width of the screen and not the browser scroller/the rest of my ".box" divs? Refer to the oxford link if you need to see an example of what I'd like to achieve. This is a portion of my current CSS. body { background: #f2f2f2; text-align:left; color:#666; font-size:14px; font-family:georgia, 'time new romans', serif; margin:0 auto; padding:0; } #menu { background: #333333; position: fixed; top: 0px; left: 0; border: 1px solid #000; clear: both; float: left; font-family: helvetica, sans-serif; font-size: 18px; text-transform: uppercase; margin: 0; padding: 18px; z-index: 500; filter: alpha(opacity=75); opacity: .75; } #menu ul{ list-style-type: none; margin: 0; padding: 0; } #menu ul li{ list-style-type: none; color: #777; display: inline; margin: 0; padding: 0 10px 0 10px; } #menu ul li a{ text-decoration: none; list-style-type: none; color: #777; display: inline; margin: 0; padding: 0; } #menu ul li a:hover{ text-decoration: none; list-style-type: none; color: #fff; display: inline; margin: 0; padding: 0; } #container { position: absolute; top: 120px; width: 70000px; margin: 0; padding: 0; } .box { background: white; border: 3px dashed #f2f2f2; width: 600px; float: left; font-size: 10px; line-height: 15px; margin: 0; padding: 5px 30px 30px 30px; }

    Read the article

  • Data Formatters temporarily unavailable

    - by Zac Altman
    Im trying to use Date Formatters (UIDateFormatter), but I keep getting this error: Program received signal: “EXC_BAD_ACCESS”. Data Formatters temporarily unavailable, will re-try after a 'continue'. (Unknown error loading shared library "/Developer/usr/lib/libXcodeDebuggerSupport.dylib")

    Read the article

  • Bit-Twiddling in SQL

    - by Mike C
    Someone posted a question to the SQL Server forum the other day asking how to count runs of zero bits in an integer using SQL. Basically the poster wanted to know how to efficiently determine the longest contiguous string of zero-bits (known as a run of bits) in any given 32-bit integer. Here are a couple of examples to demonstrate the idea: Decimal = Binary = Zero Run 999,999,999 decimal = 00 111011 1 00 11010 11 00 1 00 1 11111111 binary = 2 contiguous zero bits 666,666,666 decimal = 00100111 10111100...(read more)

    Read the article

  • Service Broker Solutions - Don't Forget the Basics

    - by AllenMWhite
    After finally getting a Service Broker solution implemented successfully, I'm really impressed with the technology, and frustrated how difficult it can be to implement and get it really working as expected. First, understand the technology. There are some great resources out there to help you get started. The first place to go is Klaus Aschenbrenner's book, the one that Greg Low reviewed this past week. It's an amazing resource and played a large part in my success. (I bought it for my Kindle, and...(read more)

    Read the article

  • Using Prettify on dynamically-generated code

    - by Nimbuz
    I'm using Prettify for syntax highlighting, but it doesn't work on dynamically generated code. I have a form that when submitted generates code and displays it (without refreshing) in <div id="output></div>, but prettify doesn't work on this code, is there any workaround? Many thanks!

    Read the article

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