Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
std::vector
- Page 1
Question Answering with YouTube Videos Using RAG in LangChain
Programming
Computer Science
5 Days Ago
by usmanmalik57
… text_splitter.split_documents(docs) ``` ``` embeddings = OpenAIEmbeddings(openai_api_key = openai_key)
vector
= FAISS.from_documents(documents, embeddings) ``` ## Question Answering with YouTube Videos…model = 'gpt-4', temperature = 0.5 ) retriever =
vector
.as_retriever() ``` Next, we will create two chains. The first…
Paris Olympics Chatbot- Get Ticket Information Using Chat-GPT and LangChain
Programming
Computer Science
3 Weeks Ago
by usmanmalik57
… text_splitter = RecursiveCharacterTextSplitter() documents = text_splitter.split_documents(docs)
vector
= FAISS.from_documents(documents, embeddings) ``` ### Question …the `create_retrieval_chain()` class object. ``` retriever =
vector
.as_retriever() retrieval_chain = create_retrieval_chain(retriever, document_chain) …
Paris Olympics Ticket Information Chatbot with Memory Using LangChain
Programming
Computer Science
3 Weeks Ago
by usmanmalik57
…the PDF document. We store the embeddings in a
vector
database. ``` embeddings = OpenAIEmbeddings(openai_api_key = openai_key) …text_splitter = RecursiveCharacterTextSplitter() documents = text_splitter.split_documents(docs)
vector
= FAISS.from_documents(documents, embeddings) ``` Subsequently, we create a …
Re: Improve HAVING BY performance
Programming
Databases
2 Weeks Ago
by toneewa
…stmt = con->createStatement(); auto start_time0 =
std
::chrono::high_resolution_clock::now(); // SQL query stmt->…<< endl; } auto end_time1 =
std
::chrono::high_resolution_clock::now();
std
::chrono::duration<double> elapsed_seconds1 = end_time1 …
Re: Trying to animate sprite using DirectX9
Programming
Software Development
3 Weeks Ago
by Pavel_11
Hello, it is unneccessarily to use right movex or leftmovex , because it is to much variables. You should to use one variable movex to make it with minus or plus sign in your update function; by pressing left or right keys; because the one thing which is changable is a picture; I mean in global sense; variables like leftx, right x should be one…
Retrieval Augmented Generation (RAG) with Google Gemma From HuggingFace
Programming
Computer Science
1 Month Ago
by usmanmalik57
…](https://huggingface.co/) and create a dataset containing
vector
embeddings for the text chunks. After that, we…### Creating Document embeddings The next step is to create
vector
embeddings for these chunks. You can use any embedding …upon the information we passed to it from our
vector
database. ## Conclusion RAG is a powerful technique…
Re: C++ programming error
Programming
2 Months Ago
by rproffitt
…/language/escape Example follows: #include <iostream> using namespace
std
; int main() { cout << "furey, edward \"sphere…
Re: Vector of a class which contains ofstream as one of its data member
Programming
Software Development
8 Years Ago
by vijayan121
…> #include <fstream> #include <
vector
> #include <type_traits> struct A // …; id << '\n' ; }
std
::ofstream file ; //
std
::ofstream is Moveable, but it is not Copyable …<< "\n\n" ;
std
::
vector
<A> seq ; seq.emplace_back( "…
Re: Vector element insertion
Programming
Software Development
12 Years Ago
by mike_2000_17
std
::
vector
101: (for
vector
v) - Use v[ index ] to read or write any … elements in v. - Use v.empty() to know if the
vector
v is empty or not (empty -> size() == 0) -…newElem ) to add an element at the end of the
vector
v. The above is enough to make it match the…from [URL="http://www.cplusplus.com/reference/stl/
vector
/"]here[/URL].
Re: Creating A Vector
Programming
Software Development
14 Years Ago
by tarheelfan_08
….h" #include <
vector
> // this allows user to create a
vector
using namespace
std
; int main() { const int…In your case, it will hold classes of type Car
std
::
vector
<Car> CarVector; // Assign individual objects of… Car from Car_array, // to your
vector
for (int i = 0; i < SIZE; i++) …
Re: nested/embedded stl classes
Programming
Software Development
13 Years Ago
by Radical Edward
std
::
vector
has a back() method that returns a reference to the …
Re: boost::thread thr(boost::bind(sort,iter, iter))
Programming
Software Development
13 Years Ago
by vijayan121
… work-arounds are simple; this is one way: [code]typedef
std
::
vector
<int>::iterator iterator ; void (*sort_function)( iterator, iterator ) = …&
std
::sort ; thg.create_thread( boost::bind( sort_function, mass.begin(), mass.end() )…
Re: C++ to C
Programming
Software Development
12 Years Ago
by deceptikon
std
::
vector
and
std
::string do a lot of work internally. You'd probably be better off converting the 'what' instead of the 'how'. Ask yourself what the code is trying to accomplish and write C code to do it.
Re: Creating Polynomials using ADT
Programming
Software Development
12 Years Ago
by griswolf
…array of coefficients.[/Icode] I suggest you should prefer a
std
::
vector
. Yes, you have to accept count and array as …an [B][I]indexed[/I][/B] collection. Such as
std
::
vector
, not a set. And I think you didn't…count of coefficients, but the collection of them. Why prefer
std
::
vector
? [LIST] [*]memory management is done for you [*]higher …
Re: little problem with vectors
Programming
Software Development
12 Years Ago
by TSaunders84
std
::
vector
<
std
::
vector
<string> > rows; is not the main
vector
just need a way to store a whole line in a temporary
vector
than put it in this one
vector
<
vector
<string> > table;
Re: Classes; Homework Help
Programming
Software Development
14 Years Ago
by Ancient Dragon
std
::
vector
is not a difficult class to use [code] class Person { // blabla };
vector
<Person> theList; // add a person to the list Person p; // fill out the structure is not shown here theList.push_back(p); // add to the list // after that you can use the
vector
just like any other array [/code]
Re: scope frustration(I think)
Programming
Software Development
15 Years Ago
by ArkM
std
::
vector
is an intrusive container: it contains own copies of initialization (… moment you have a copy of Region object in the
vector
(with copied tile pointer initialized by load_image call). You have…
Re: implementing stack using vectors
Programming
Software Development
13 Years Ago
by jonsca
std
::
vector
has a size() method. Use it (and subtract 1) to find the index of the last element. Access that with [].
Re: sort even and odd numbers from an array
Programming
Software Development
16 Years Ago
by vijayan121
…> #include <iterator> #include <
vector
> #include <cstdlib> #include <…' ; } } int main() { srand( unsigned( time(0) ) ) ;
std
::
vector
<int> v; for ( int i = 0; i <…; 20; i++ ) v.push_back (
std
::rand() % 100 ) ;
vector
<int>::iterator part = partition( v.begin(),…
Re: error while finding the the common alphabets in string
Programming
Software Development
11 Years Ago
by vijayan121
>
std
::
vector
< unsigned > buckets(
std
::numeric_limits< unsigned char >::max() ); > (note the correction to the type of the
vector
;) `unsigned` does not improve it in any way. If it is to be a correction, it would have to be: `
std
::
vector
<
std
::string::size_type > buckets( /* ... */ ) ;`
Re: Class with dynamic array how?
Programming
Software Development
18 Years Ago
by iamthwee
>
std
::
vector
<
std
::
vector
<T> > matrix; Thanx _jsw, I was wondering …, you just missed the above, you can use a 2D
vector
to do exactly that. Unless, like I said before ,you…
Re: Reading data into an array from a file
Programming
Software Development
8 Years Ago
by NathanOliver
`
std
::
vector
` is a dynamically resizing array. This is one of the … about it [here](http://en.cppreference.com/w/cpp/container/
vector
) on [cppreference](http://en.cppreference.com/w/)
std::vector error with wx custom class
Programming
Software Development
4 Years Ago
by BirdaoGwra
Hi, I am getting an error while making a
vector
. frame.h #include <wx/wx.h> class Frame : … = yy; } Frame::~Frame() { } in another wxPanel , I am creating a
vector
-
std
::
vector
<Frame> vFrames; And using it in a function…
Re: Detecting std::vector<> relocation
Programming
Software Development
12 Years Ago
by harryhaaren
… fact that you reallocate or change the
std
::
vector
member (I assume is held by value…object gets relocated, which would relocate the
std
::
vector
member along with it. You will …resourceHolder->getAudioBufferPointer();
std
::
vector
<float>*
vector
= audioBuffer->getVectorPointer(); // blah blah, read the
vector
x =
vector
->at(0…
Re: Detecting std::vector<> relocation
Programming
Software Development
12 Years Ago
by mike_2000_17
…The fact that you reallocate or change the
std
::
vector
member (I assume is held by value…object gets relocated, which would relocate the
std
::
vector
member along with it. You will need…resourceHolder->getAudioBufferPointer();
std
::
vector
<float>*
vector
= audioBuffer->getVectorPointer(); // blah blah, read the
vector
x =
vector
->at(0…
How does std::vector::at() work?
Programming
Software Development
13 Years Ago
by ravenous
…that of [icode]
std
::
vector
[/icode] for the [icode]at()[/icode] method: [code]
std
::
vector
v(10,1);
std
::cout <<… v.at(3) <<
std
::endl; /* uses const_reference… I can see, my version and the [icode]
std
::
vector
[/icode] version have pretty much identical signatures, so …
Detecting std::vector<> relocation
Programming
Software Development
12 Years Ago
by harryhaaren
… audio. I'm currently using a [ICODE]
std
::
vector
<float>[/ICODE], as a member of… resourceHolder->getAudioBufferPointer();
std
::
vector
<float>*
vector
= audioBuffer->getVectorPointer(); // blah blah, read the
vector
x =
vector
->at(0); … Question: I want to detect when an
std
::
vector
<> gets reallocated in memory, to …
Re: How does std::vector::at() work?
Programming
Software Development
13 Years Ago
by Narue
[QUOTE]But what about
std
::
vector
?[/QUOTE] What about it? If you used
vector
instead of Array in your example, the non-const at… would still be chosen. You ask the question as if
vector
does something different. [QUOTE]Is it the case that only…
Re: How does std::vector::at() work?
Programming
Software Development
13 Years Ago
by ravenous
… to your most common behavior:[/QUOTE] But what about [icode]
std
::
vector
[/icode]? It does [I]have[/I] both the functions that…
Re: Detecting std::vector<> relocation
Programming
Software Development
12 Years Ago
by harryhaaren
[QUOTE=vijayan121;1624080] You need to synchronize access to the
vector
across multiple threads.[/QUOTE] Indeed. And that's all taken … going AWOL. Although the initial question "how to detect
std
::
vector
<>'s being relocated" remains valid I've…
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