I'm pretty new to vb so please bear with me here. I have data going into some richtextboxes and I wanted to graph it, what would be the best way of going about graphing something in vb.net like this? I'm thinking rather than trying to read from the textboxes themselves (as the data is being inputted as strings) I'd convert the data going in into doubles and try to graph it. Any suggestions? Would it be possible to graph the data in the actual boxes, since they're strings at that point rather than doubles, or would graphing the numbers just be easier?
I think the whole richtextbox part of your question is just causing confusing. If you have the data out of the textboxes, putting it into a richtextbox and then pulling it back out doesn't make sense.
The values will obviously need to be converted to a number somewhere during the process. Are you using a control to graph, or handling that code yourself? If you're using a control, then check the documentation.
Related
Essentially I have an application that loops to create multiple input fields that the user can enter numbers in. I need a loop as sometimes there will be anywhere from 10-15 input fields depending on the situation.
I have no problem looping and creating them, but I'm having trouble saving them in to a variable so they are accessible outside of the loop.
The reason I want them accessible so that I can then pull the value of the input fields. Anytime I try and pull the data it comes back blank/no data.
I have strong object oriented programming skills, but I'm very new to autohotkey scripting and wondering if there is a solution for this situation.
Any recommendation here or assistance is appreciated, thank you!
I would like to programatically delete image placeholders which are full (PlaceholderPicture objects in the python-pptx API)
and replace them with empty ones (PicturePlaceholder), the goal being to "refresh" pictures instead of always having to fill out an empty presentation.
I think I know how to delete a shape, but creating a new PicturePlaceholder proves harder than expected.
When I try to create one I am asked to provide a sp and a parent and I cannot find in the documentation what these parameters refer to.
Does my approach make sense, and if so is it possible to create new placeholders programmatically? Could anyone explain what are the parameters I should pass to the constructor?
Thanks in advance.
python-pptx has no API support for this, which means you would need to directly manipulate the underlying XML of the slide to accomplish it (and be outside the python-pptx "safety net").
sp is the shape element (generally an <p:sp> element, hence the name) and parent would be a reference to the slide.
As a general approach, I would create an empty placeholder and compare its XML to that of a "filled" placeholder which is the same in every respect. Then the job is to make one into the other.
Note that a picture placeholder has a relationship to the "image part" (e.g. PNG file) stored elsewhere in the PPTX package (.pptx file). This will need to be dealt with and not left dangling.
Another possibility is just to swap the image and leave everything else in place, which on paper at least would be less disruptive.
Because none of these options has API support, pursuing them involves taking on responsibility for a lot of details that python-pptx takes care of for you and learning a fair amount about the internals. If that sounds like something you'd rather avoid then you'll want to find another way to accomplish the broader outcome you have in mind.
I'm pretty new to VB, but I've got a script working which involves taking a PDF with fillable fields, and populating a column in an xlsx with all of the field names.
I would like to take this a step further, and pull the field descriptions as well, into another column. By that, I mean the description which comes up when mousing over a particular field in the form. Getting the name of the field is easy enough, but I've done some digging and am not sure if it's possible to pull the description as easily.
I've experimented with functions similar to "object.getNthFieldName(x)," but no such luck.
Not entirely sure if this is possible, but looking for any insight. Thanks!
First of all, thank you so much for your support of YADCF. It's a fantastic tool! Second, I'm not a programmer (I know enough to break stuff :D) so I apologize in advance for having to bother you at all. It's possible my question has even already been answered, I just don't know what to search for.
I'm using the YADCF 0.8.8 table on DOM Source (small "d"). I've built a custom_func_filter based on 11 values & labels. The weird thing is, when the drop-down menu displays for the filter, the labels are not in the order they're defined in.
In trying to figure out what the issue was, I changed the values and labels to numbers from 01 - 11 instead of text to see how it was moving things around. Apparently it's anything over 10 items that it begins to jumble everything up. Here's a side-by-side comparison on what it looks like:
custom_func_filter comparison
I'm behind a firewall so it's not easy to share my code, but I'll figure out a way to if need be. I just wasn't sure if there was something I was missing.
Using datatables 1.9.4, jquery 1.11.3.
Thank you!
You are welcome :)
Quick answer: Use the sort_as: "none" and make sure the data array is in your desired order
Explanation: BEcause in custom function filtering the select is being populated by (data) array of objects value/label the sort as (as its implemented now) wont really sort the data, so since you populate data manually, just make sure its in your desired order
I'm creating a vb.net winforms application that will take in user given strings, parse them, and print out labels with variable information. The given string will be used in all the labels, but the variable part of the string will change with each label.
My question is: is it better to parse the strings one time, then store those values in arrays, or to parse the string each time a label is printed? Which will perform better? Which is better practice? What is the proper way to test something like this?
If saving data in memory is done for performance, my preference would be not to do it until I knew the parsing was actually a performance problem, which I detect by random-pausing.
Generally my rule of thumb is - the less data structure the better.
If you have data structure you have to worry about it getting stale, and any time you change the program you have more code to modify and put bugs into.
Besides, parsing does not need to be slow, especially compared to whatever else you're doing.
Parsing is definitely heavy stuff.
In this particular instance if you do not have any memory constraints then you should parse once and store to speed up your application, especially if it is going to be something that is being used by people :)