Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed yesterday.
Improve this question
(Please excuse me if I'm not phrasing anything right)
I followed a YT tutorial on how to add parameters to a url manually and to track them via GTM (Custom Variable > Variable Type = URL > Component Type = Query Key > abcd)
However when I enter preview mode, the string that I added to my amazon affiliate link (eg. &abcd=text) does not capture the value "text" and returns as undefined. What am I doing wrong?
I followed a YT tutorial on how to add parameters to a url manually and to track them via GTM (Custom Variable > Variable Type = URL > Component Type = Query Key > abcd)
However when I enter preview mode, the string that I added to my amazon affiliate link (eg. &abcd=text) does not capture the value "text" and returns as undefined. What am I doing wrong?
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
Hey I use Firebase Storage as Backup Opportunity for my App and have a users folder. Inside this folder there are a lot of folders which's name is the UID from a User.
Example:
users/bahjdbhjabdjabggjd/file.txt
users/bhsabhadadnhbann/file.txt
users/hbashdbadjadjajdgg/file.txt
I need a opportunity to list all foldernames in a array.
Goal:
[bahjdbhjabdjabggjd, bhsabhadadnhbann, hbashdbadjadjajdgg]
I didn't found a way to solve my problem.
I suggest reviewing the documentation for listing files and folders. Just build a Reference to the prefix you want to query, and call listAll() on it. For exmaple, copying from the documentation:
Future<void> listExample() async {
firebase_storage.ListResult result =
await firebase_storage.FirebaseStorage.instance.ref("users").listAll();
result.items.forEach((firebase_storage.Reference ref) {
print('Found file: $ref');
});
result.prefixes.forEach((firebase_storage.Reference ref) {
print('Found directory: $ref');
});
}
It might also help to also record all your files in a database for easier querying, since the API of listing files is somewhat limited.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I want to include extra parameter string, i.e. param1=val1¶m2=var2, etc in WordPress pagination.
For pagination I am refering the following site code:
http://callmenick.com/post/custom-wordpress-loop-with-pagination
You can pass as many as parameters inside the custom pagination function like the following :
function custom_pagination($numpages = '', $pagerange = '', $paged='' , $format='' , $tab = '') {
And pass the parameters via calling the function,
custom_pagination($queryvideos->max_num_pages,6,$paged3,'pagedvideo','videos');
custom_pagination($queryposts->max_num_pages,6,$paged2,'pagedpost','posts');
Refer the pagination example here : Link
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I am using a custom made INI parser, for which the parameters are the form name, parent widget. The syntax looks like this:
int width = w->findchild("form_name","section_to_be_accessed_name").toInt();
I maybe a little bit wrong with the syntax, because I don't have the code with me right now. I want to add a few labels which are mentioned in page 2 of the INI file. The properties of those images are mentioned in the ini file itself. Even the absolute path,etc.
I tried multiple combinations, but it doesn't work. Can anyone give me a syntax for the same? What should be the return value here? A label, I have already created labels in Qt designer. Let's say label1. But there are many labels. Kindly let me know.
QSettings is a great class that works well for handling INI files. I would check it out. It has been optimized well, and is very robust. It also uses QVariant in a very intelligent way. It also handles "Groups" well.
http://qt-project.org/doc/qt-4.8/qsettings.html
// in your main, or somewhere very early in your program
qApp->setApplicationName("Star Runner");
qApp->setOrganizationName("MySoft");
QSettings::setDefaultFormat(QSettings::IniFormat);
Later when you want to access or set a setting
QSettings s; // in windows this would be
// C:/Users/<username>/AppData/Roaming/MySoft/Star Runner.ini
Or you could specify your ini file this way to point at a specific ini file
QSettings::QSettings ( const QString & fileName, Format format, QObject * parent = 0 )
QSettings s("path/to/my/inifile.ini", QSettings::IniFormat);
And now an example of using the settings variable:
// set the setting
s.setValue("group_name/setting_name", new_value);
// retrieve the setting
// Note: Change "toType" to whatever type that this setting is supposed to be
current_value = s.value("group_name/setting_name", default_value).toType();
If you want to handle nested elements and gui layouts and design, I would look at XML or JSON. Both are supported by Qt.
XML is the native way that Qt Creator stores the UI files that are created by Qt Designer.
http://qt-project.org/doc/qt-5.0/qtxml/qtxml-module.html
http://qt-project.org/doc/qt-5.0/qtcore/json.html
Hope that helps.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I would like to generate a word document from my ASP.NET application. Currently we show an "Agenda List" which is the agenda information and all items/subjects. This page needs to have the ability to open in word. The agenda page is not static, it's a dynamic list of agenda items pulled from SQL Server.
Any suggestions on the best solution? I'm looking for a quick solution and OpenXML seems to be a bit too time consuming. I'm open to purchasing third party tools.
Thanks!
Use the Office OpenXML SDK. For later versions of Office (2007 and above), this is the standard. There are other ways as mentioned in other answers, but OpenXML will give you the greatest level of control over the output.
Here is some documentation to get you started:
http://msdn.microsoft.com/en-us/office/bb265236.aspx
You can either
Let the page generate the document yourself (like RTF format)
Save the Word template as XML and add your own placeholder where you fill in the content (I know you said this is time consuming which is true if you do a lot of updates to the template)
Used 3rd party tool like Aspose (http://www.aspose.com), it worked very well for me as it does save a lot of time to work with the document through objects in C#.
There are three methods that I have used previously:
Use the openXML library to programmatively create a document from scratch.
Use Office automation to mail merge data with a Word template. You would create your template first and then use a DataSet to populate the data fields.
If your database is SQL Server 2005 or later you can use SSRS to generate documents in a number of formats, including Word, PDF, Excel, and CSV.
You don't need any 3rd party controls to create a Word document. From 2007 and onward Word can read html as a word document. You simply save any web page with the ".doc" extension and Word will sort it out.
Simply create your web page with whatever formatting you want then save it with a .doc extension.
I used HttpWebRequestto call the Url (with parmaters) to my page then used WebResponse and Stream to get my page into a buffer, then StreamReader and StreamWriter to save it to an actual document. I've then got my own custom function to download the file.
If anyone wants my code let me know
You can also try our 3rd party GemBox.Document library.
Here is a sample C# code how to generate template Word (DOCX) document programmatically and use mail merge to import data into it:
var document = new DocumentModel();
document.Sections.Add(
new Section(document,
new Paragraph(document, "Agenda List:"),
new Paragraph(document,
new Field(document, FieldType.MergeField, "RangeStart:Agendas"),
new Field(document, FieldType.MergeField, "Subject") { CharacterFormat = { Bold = true } },
new SpecialCharacter(document, SpecialCharacterType.LineBreak),
new SpecialCharacter(document, SpecialCharacterType.Tab),
new Field(document, FieldType.MergeField, "Description")),
new Paragraph(document,
new Field(document, FieldType.MergeField, "RangeEnd:Agendas"))));
var agendas = new object[]
{
new { Subject = "First agenda subject", Description = "First agenda description." },
new { Subject = "Second agenda subject", Description = "Second agenda description." }
};
document.MailMerge.Execute(agendas, "Agendas");
document.Save("Agendas.docx");
You can also easily save Word document to ASP.NET response stream.
I can suggest you to try our Elerium Word .Net Writer component to generate Word document from ASP.NET page. There is a demo with sourse code that shows how to create new Word document using dinamic datatable:
http://eleriumsoft.com/Word_NET/WordWriter/Demo.aspx
Disclaimer: I'm a developer at Elerium Software.