Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
raw_input
- Page 1
Shopify App Visibility Issues After Model Shift – What Am I Missing?
Programming
Web Development
2 Days Ago
by Sagar_panchal
Hi everyone, I recently switched my app from a paid-only model to a free trial in order to encourage more installs. The app provides features like AI lead quality scoring, quote-to-order conversion, BI dashboard, and customer chat – mainly focused on helping merchants better manage quote requests. However, even after offering a free trial …
OpenAI o3 vs Anthropic Claude 4 for Text Classification & Summarization
Programming
Computer Science
1 Week Ago
by usmanmalik57
[OpenAI](https://openai.com/) and [Anthropic](https://www.anthropic.com/) are two AI giants delivering state-of-the-art large language models for various tasks. In a [previous article](https://www.daniweb.com/programming/computer-science/tutorials/542132/comparing-gpt-4o-vs-claude-3-5-sonnet-for-zero-shot-text-classification), I compared OpenAI GPT…
Re: Error LNK1104 when debugging
Programming
Software Development
3 Weeks Ago
by toneewa
I like the challenge, but hate when errors like these occur. Check for a syntax error on line 2 in starter.h starter.h(2): warning C4067: unexpected tokens following preprocessor directive - expected a newline Hard to say without seeing code. Some cases m_hservice may require you to use the .lib file Advapi32.lib it if it isn't automatically…
Re: How to show visa info based on country selection in a travel form?
Programming
Web Development
3 Weeks Ago
by Biiim
I felt like some fun, so I just put together an example for you using CDN's and bootstrap 5. From what you are talking about you probably want to put some of that logic into the Javascript and not need to send a server request for each one, I usually do this kind of thing with javascript objects/arrays (eg `settings['GB']['visa_req'] = false;…
Re: Flood control using Redis
Programming
Web Development
2 Weeks Ago
by Dani
Status update: we now use Cloudflare’s free rate limiting functionality. Back when I wrote this, Cloudflare charged for rate limiting. Note we have a Business account.
Re: How do I make my code jump back to a previous line?
Programming
4 Weeks Ago
by Dani
Organizing code into functions is always important for readability and also to be able to reuse parts of your code as your app gets bigger. Thank you for posting your updated code to share with others :)
Integrating OpenAI Web Search API in LangGraph
Programming
Computer Science
1 Month Ago
by usmanmalik57
Large language models are trained on a fixed corpus, and their knowledge is often limited by the documents they are trained on. Techniques like retrieval augmented generation, continuous pre-training, and fine-tuning enhance an LLM's default knowledge. However, these techniques can still not enable an LLM to answer queries that require web …
How do I make my code jump back to a previous line?
Programming
1 Month Ago
by trueriver
I'm just coding something for fun right now and I'm stuck on looping. I'm using a while loop that only runs if my variable is 0. Right now, I set the variable to 0 but the code was after the loop. How do I fix this? import time import sys #Global Variables firstTime = True loggedIn = False incorrectLogin = …
Re: How do I make my code jump back to a previous line?
Programming
1 Month Ago
by trueriver
updated my code... everything is fixed :) i made functions import time import sys #Global Variables firstTime = True loggedIn = False incorrectLogin = True admin = False n = 0 n1 = 0 i = 0 #Create login if firstTime is True if firstTime is True: print("…
Re: Java Coin Flip Program
Programming
Software Development
2 Months Ago
by jassonadder
Hey! You're on the right track with your idea—it’s a great beginner project to practice loops, input, and class methods in Python. Here’s a sample program that does exactly what you're asking. It defines a class with a flipCoin() method, reads in how many times the user wants to flip a coin, prints each result, and then shows the totals at the …
Re: My php is showing wrong results of time difference
Programming
Web Development
1 Month Ago
by Dani
I am confused when you say the HTML time picker input box can be set to 20:00 for time in and 5:00 for time out, because `<input type="time" ...>` only allows the end-user to specify a time, not a time and date combination. Should it always be assumed that if the time out is earlier than the time in, that it is the next day? …
Re: Cannot run exe from asp.net
Programming
Web Development
2 Months Ago
by lennyli
> Why your approach isn’t working > What you're trying to do is mostly blocked by modern security rules — for good reasons. Here's the breakdown: > > Running a .exe on the server > You can technically make the server launch an .exe file like Notepad, but: > > It will run in the background on the server, not visibly on…
Re: My php is showing wrong results of time difference
Programming
Web Development
1 Month Ago
by Mr.M
Thanks, to clarify what I meant regarding the dates is that I have a date input that shows a calendar when a user click on it to choose the date for which the register is being marked for. Then I also have 2 time inputs one is for timein and the other is for timeout. Let me try your code and see if it does solve the problem I've been having.…
Re: My php is showing wrong results of time difference
Programming
Web Development
1 Month Ago
by Dani
In other words, if you just need days or hours you can do something like `$diff->d` or `$diff->h` (All properties available [here](https://www.php.net/manual/en/class.dateinterval.php), but if you want to calculate a runner's start time and end time and then do something like "You ran the race in 08:33:56!" then you could use the `…
Re: How do I make my code jump back to a previous line?
Programming
1 Month Ago
by woooee
if sysInfo.lower() in ["exit", "Exit", "EXIT"]: since sysinfo is now lower(), it will never be equal to "Exit" or "EXIT"
Re: Question/Answering over SQL Data Using LangGraph Framework
Programming
Computer Science
2 Months Ago
by Pelorus_1
Through its combination of natural language processing and structured query generation, LangGraph makes interfacing with databases and extracting insights over SQL data easier than ever.
Raw input (keyboard)
Programming
Software Development
13 Years Ago
by jain1.anuj
hi I am working on USB HID KEYBOARD and want to perform read/write operations over it. Can any one help me in providing information on RAW INPUT? code samples would be appreciated. Thanks in advance
Verbal raw input?
Programming
Software Development
17 Years Ago
by Seagull One
… and TTS. What I want to achieve is a verbal
raw_input
ability. I want to say something new to my computer…
Re: Verbal raw input?
Programming
Software Development
17 Years Ago
by Seagull One
Okay, Jeff. I implemented "return 'Hello Nina'" as you suggested and got lots of good stuff! [CODE]pythoncom error: Python error invoking COM method. Traceback <most recent call last>: File "C:\Python25\lib\site-packages\win32com\server\policy.py", line 285, in _ Invoke_ return self._invoke_<dispid, lcid,…
Using SDL with the Raw Input API.
Programming
Software Development
14 Years Ago
by tomtetlaw
I am trying to use SDL with the Raw Input API but whenever SDL sends me a keyboard input message, the [icode]msg[/icode] it sends me is an invalid pointer and it gives me an access violation when I try to use it. I check to see if it's invalid for other kinds of events (like the events SDL sends me when the program starts up) and it's valid for …
Help on Validating Raw Input
Programming
Software Development
12 Years Ago
by dan.nitschke
Hello, I am doing a school project and need assistance on validating raw input, this is very simple stuff, but can someone answer this for me? The statement is: ordertype = str(input("Is the order pickup or delivery?")) Only two values could be entered: P or D (or p or d), if something else is entered, (eg. K) then a statement like &…
Validate Raw Input
Programming
Software Development
15 Years Ago
by TheManual
I need to only allow integers and the letters "d" and "r" from raw input otherwise I need to run an exception. For example: [I]You entered 's' this is invalid[/I] I have tried to use try/except statements but can't work it out. Is this the best way? Can someone help? Thanks.
Re: Verbal raw input?
Programming
Software Development
17 Years Ago
by jrcagle
Almost certainly. BTW, this is an amazingly cool project. /gush How does the input take place? For example: I speak a sentence. How is that sentence represented internally in Python? Does the speech recognition module return a list of words, or what? Jeff
Re: Using SDL with the Raw Input API.
Programming
Software Development
14 Years Ago
by Ancient Dragon
See the links in my post in your other thread on the same subject (getting WM_INPUT message). [quote]Note that lParam has the handle to the RAWINPUT structure, not a pointer to it. To get the raw data, use the handle in the call to GetRawInputData.[/quote] [URL="http://msdn.microsoft.com/en-us/library/ms645590(v=vs.85).aspx"]link[/URL]
Re: Validate Raw Input
Programming
Software Development
15 Years Ago
by vegaseat
… characters in the input string accepted = '0123456789dr' while True: mystr =
raw_input
("Enter data (allowed are integers and 'dr'): ") if…
Re: Help on Validating Raw Input
Programming
Software Development
12 Years Ago
by dan.nitschke
I've also tried this: ordertype = "" while ordertype != "P" and ordertype != "D" : order = str(input("Is the order for pickup or delivery?")) ordertype = order.upper() This works so far, but I can't figure out how to make it say "Error, you can only enter P or D" if …
Re: Input validation
Programming
Software Development
14 Years Ago
by sha11e
[QUOTE=Narue;1539241]Not really. You can take raw input and gain more control over exactly what characters are accepted, but that has its disadvantages as well. Typically, reading unformatted input as a string, then validating it and responding accordingly is the recommended approach.[/QUOTE] Help ;( I want the user to input either j or n. If…
Re: Input validation
Programming
Software Development
14 Years Ago
by Narue
[QUOTE]Isn't there a better way?[/QUOTE] Not really. You can take raw input and gain more control over exactly what characters are accepted, but that has its disadvantages as well. Typically, reading unformatted input as a string, then validating it and responding accordingly is the recommended approach.
Re: Raw input question
Programming
Software Development
15 Years Ago
by TrustyTony
Yes. You just check the lowercase input with 'quit'. Even easier is to quit by '' empty line as it acts as False in if statement. How ever it is easy to give aksidentaly.
Re: Raw input question
Programming
Software Development
15 Years Ago
by TrustyTony
…True else: return False while True: try: number = int(
raw_input
("> Number ")) except ValueError: print ">…if number: print('Wrong input, try again') try: number =
raw_input
("Integer to check = ") if isodd(int(number)): print…
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
Backlink Auditor
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC