Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
str_replace
- Page 1
Re: How can I upload a tar.bz2 file to openstack swift object storage container
Programming
Software Development
6 Days Ago
by Salem
First, let's prepare two tar files using different compression schemes for demo purposes. $ cat foo_1.txt This is file 1 $ cat foo_2.txt This is file 2 This is file two This is file too # Three tar files, two compressed and one uncompressed for reference $ tar -j -c -f foo.tar.bz2 foo_1.txt foo_2.txt…
Claude 3 Opus Vs. Google Gemini Vs. GPT-4 for Zero-Shot Text Classification
Programming
Computer Science
1 Week Ago
by usmanmalik57
On March 4, 2024, [Anthropic](https://www.anthropic.com/) launched the [Claude 3 family of large language models](https://www.anthropic.com/news/claude-3-family). Anthropic claimed that its Claude 3 Opus model outperforms GPT-4 on various benchmarks. Intrigued by Anthropic's claim, I performed a simple test to compare the performances of Claude …
Re: Applying PySide's QAbstractTableModel
Programming
Software Development
3 Weeks Ago
by Mark_94
Even although this topic is 11 years old (in 2024), it's still very helpfulby showing how to properly program in Python3. I've readily translated it to PySide6 and it works fine except for one tiny prob: sorting the MP column with "TypeError: '<' not supported between instances of 'str' and 'float'". I'm not sure how to fix it.
Re: ASUS Laptops - my experience
Hardware and Software
1 Week Ago
by toneewa
Indeed, I recommend to anyone that has USB ports to use the magnetic plugs for mini and micro USB ports. I see you could have the Thunderbolt 4 USB-C, so I'm sure it did cost little more. That would check one of my boxes. 144hz+ would be another. I don't need bloodshot eyes from 60hz. If you are a DIY fixer, you can also [replace the TB4 ports](…
Re: GCC Fails to Recognize Parameters
Programming
1 Week Ago
by toneewa
While I haven't used DJGPP for a couple decades, I decided to install the ffmpeg library and do a test program another way. For me, the declarations worked changing: #include "os_support.h" #include "avformat.h" #include "internal.h" #if CONFIG_NETWORK #include "network.h" #…
Re: Help with functions - basics
Programming
3 Weeks Ago
by learnerya
Starting from the basics, I have just started learning
Re: Postfix authentication problem
Hardware and Software
Linux and Unix
2 Weeks Ago
by chickenbirds
> I am trying to set-up Postfix on my Ubuntu local web development machine for send-only e-mails using Gmail so I can test e-mails sent by a web app I am developing. Even though this is an old post I wanted to reply as I found it while trying to setup my own postfix mailrelay on my private cloud server with Debian that hosts our small …
GCC Fails to Recognize Parameters
Programming
1 Month Ago
by snah19
RE: ffmpeg-4.4 Andrew Wu DJGPP CROSS COMPILER, GCC v12.2.0 Host Macbook Pro, macOS Monterey [Click Here](https://ffmpeg.org/platform.html#DOS) DJGPP Cross Compiler 12.2.0 Fails to Recognize "certain" Parameters in FFmpeg Source Code Hi, I am using the DJGPP cross compiler 12.2.0, developed by Andrew Wu, github, to build the …
TensorFlow Keras Sequence Data Generator for Multimodal Classification
Programming
Computer Science
2 Months Ago
by usmanmalik57
I recently tackled a challenging research task involving multimodal data for a classification problem using [TensorFlow Keras](https://www.tensorflow.org/guide/keras). One of the trickiest aspects was figuring out how to load multimodal data in batches from storage efficiently. While TensorFlow Keras offers helpful functions for batch-loading …
Help with functions - basics
Programming
1 Month Ago
by verrandhack
So im working on functions for the first time in vscode using c++. i'm want to declare functions and having trouble understanding some things. i'm very new to programming so i still don't understand commands like str, file, value, void, readName, and so forth but i know i need to learn them to declare functions. any tips on how to use these and …
Multivariate Stock Price Prediction with Transformer Encoder in TensorFlow
Programming
Computer Science
2 Months Ago
by usmanmalik57
In a [previous tutorial](https://www.daniweb.com/programming/computer-science/tutorials/541123/stock-price-prediction-using-1d-cnn-in-tensorflow-keras), I covered how to predict future stock prices using a deep learning model with 1D CNN layers. This method is effective for basic time series forecasting. Recently, I've enhanced this model by not…
Converting PDF Image to CSV Using Multimodal Google Gemini Pro
Programming
Computer Science
2 Months Ago
by usmanmalik57
In this article, you will learn to use [Google Gemini Pro](https://blog.google/technology/ai/google-gemini-ai/), a state-of-the-art multimodal generative model, to extract information from PDF and convert it to CSV files. You will use a simple text prompt to tell Google Gemini Pro about the information you want to extract. This is a valuable skill …
PDF Image Table Extractor Web App with Google Gemini Pro and Streamlit
Programming
Computer Science
1 Month Ago
by usmanmalik57
In my previous article, I explained [how to convert PDF image to CSV using Multimodal Google Gemini Pro](https://www.daniweb.com/programming/computer-science/tutorials/541365/converting-pdf-image-to-csv-using-multimodal-google-gemini-pro). To do so, I wrote a Python script that passes text command to [Google Gemino Pro](https://blog.google/…
C++ programming error
Programming
1 Month Ago
by sammieb
I am trying to enter a single string in C++ in which I give a URL citation. the entire line is as follows: cout << 'furey, edward "sphere calculator" at https://www.calculatorsoup.com/calculators/geometry-solids/sphere.php from calculatorsoup, https://www.calculatorsoup.com - online calculators' << endl; I am getting the…
Re: VB6 - RayCasting: why my Vertical intersection is so big?
Programming
Software Development
2 Months Ago
by cambalinho
actual code: Private Sub DrawRays2() Dim AY As Double Dim AX As Double Dim StepX As Double Dim StepY As Double Dim VertX As Double Dim VertY As Double Dim HorizX As Double Dim HorizY As Double Dim MapX As Long Dim MapY As Long Dim HorizDist …
Re: VB6 - RayCasting: why my Vertical intersection is so big?
Programming
Software Development
1 Month Ago
by cambalinho
i fix 1 error: ElseIf (KeyCode = vbKeyUp) Then If (LevelMap0(Fix((Player.PosY + Player.MoveY * Speed) / ObjectSize), Fix((Player.PosX + Player.MoveX * Speed) / ObjectSize)) <> vbBlue) Then 'and: ElseIf (KeyCode = vbKeyDown) Then If (LevelMap0(Fix((Player.PosY - Player.MoveY * Speed) / …
Re: Is Coding About Authoring or Achieving a Specification?
Programming
2 Months Ago
by rproffitt
What standards are you asking about? What happens when your standard doesn't fit your use case? (spoiler) ![image_2024-01-27_115711909.png](https://static.daniweb.com/attachments/1/361846dbfc9dcb5adc5f4800c2a3933d.png) https://xkcd.com/927/ As I wrote more and more code I did gravitate toward standards. But with each job, there was yet …
Re: GCC Fails to Recognize Parameters
Programming
1 Month Ago
by Reverend Jim
I can't offer any suggestions other than to just download the compiled app for your system instead of building it yourself.
Re: GCC Fails to Recognize Parameters
Programming
1 Month Ago
by rproffitt
Here's another problem. When we change the OS not only must we setup the compiler, environment and such but sometimes an OS API could be deprecated or removed. You made mention of a possible OS change so that's a possibility. You obtained this code from somewhere. Go back there and see if they updated it for your new OS.
Re: Help with functions - basics
Programming
1 Month Ago
by rproffitt
Rather than dive into c++ like that, try tutorials like we see at https://www.w3schools.com/cpp/cpp_functions.asp
Re: Help with functions - basics
Programming
1 Month Ago
by jkon
It seems that the issue has nothing to do with C++ or with functions. If you are new to programming why not try some tutorials in an easy accessible language (like JavaScript for example) and when you understand a few basics ( like null , functions , variables , loops , conditions ) move to a C++ tutorial for beginners ?
Re: DomNodeInserted and DomNodeRemoved now deprecated
Programming
Web Development
2 Months Ago
by Mason_4
You could try the Mutation Events polyfill: https://github.com/mfreed7/mutation-events-polyfill (or here on npm https://www.npmjs.com/package/mutation-events). I'd be curious to hear if it works for you.
Re: DomNodeInserted and DomNodeRemoved now deprecated
Programming
Web Development
2 Months Ago
by Dani
Thank you but the above code from my last post has actually been working well for me. My code looks as so: // DOMNodeInserted DOMNodeRemoved have been deprecated! /* jquery_element.on('DOMNodeInserted DOMNodeRemoved', function() { function_name(); }); */ const observer = new MutationObserver(…
Re: Sentiment Analysis with Data Augmentation Using ChatGPT
Programming
Computer Science
2 Months Ago
by Abdul_116
Fascinating to see sentiment analysis being applied to understand Pakistani consumers on High Street Pakistan! As online shopping thrives, it'd be interesting to compare brand opinions on both platforms - how do traditional High Street stores fare against online giants in terms of sentiment? Could data augmentation help bridge the data gap for …
Re: C++ programming error
Programming
1 Month Ago
by rproffitt
You'll want to escape those quote marks and maybe more. Read https://en.cppreference.com/w/cpp/language/escape Example follows: #include <iostream> using namespace std; int main() { cout << "furey, edward \"sphere calculator\" at https://www.calculatorsoup.com/calculators/geometry-solids/…
Re: Regex problem - "\\"
Programming
Software Development
13 Years Ago
by masijade
replace all single slants with double slants before (or while) calling "aregex". [code]str.replace("\\", "\\\\")[/code] note: replace, [i]not[/i] replaceFirst or replaceAll.
Re: replace text between to substrings
Programming
Web Development
9 Years Ago
by nouth
I mean replace text between two known strings but you don't know what any of the text in the middle is like this. var str = "abcdefghijklmnopqrstuvwxyz"; var start = "def"; var end = "nop"; str = str.replace(str.substring(str.indexOf(start)+start.length, str.lastIndexOf(end)), '*'); alert(str);
Re: replace text between to substrings
Programming
Web Development
9 Years Ago
by nouth
no i mean something like `str = str.replace(str.substring(str.indexOf(a)+a.length, str.lastIndexOf(a)), 'whatever')`
Re: replace text between to substrings
Programming
Web Development
9 Years Ago
by AndrisP
`var a = str.replace(/error/,'my replace')` or `str.replace(/anything.*anything/,'anything my replace anything')` if I understand correctly
JavaScript string.replace *
Programming
Web Development
10 Years Ago
by nouth
So I have a string of the English alphabet for example. But I don't know the alphabet very well but I do know that it starts with "abc" and that it ends in "xyz". I want to remove letters "b" to "x". I want to do something like `str = str.replace("bc*x","");` or `str = str.replace("bc…
1
2
3
17
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC