VSCode auto complete Add Parentheses and parameterHints disabled do not work both - c

[At first, I'm Korean. And I'm not good at English. So plz understand my terrible English.]
VSCode has these two settings.
"editor.parameterHints.enabled": false
"C_Cpp.autocompleteAddParentheses": true
The question is, How can I use those two settings together?
When I write a message in parentheses in printf() at C, it shows parameter hint int printf(const char *const _Format, ...) by pop-up.
I don't wanna see that hint pop-up because it covers the code I wrote.
So I added that setting "editor.parameterHints.enabled": false.
But it didn't work!
And finally I realized why it didn't work.
The reason why is "C_Cpp.autocompleteAddParentheses": true.
If I change that into false, parameter hint is turned off normally.
But I want to use both of those settings together.
Why can't I use the two settings together?

Related

How to completely overwrite output in c

So I am working on this side project game kinda thing, and I want to put it inside of a border/box. I then want to print text constantly inside that border: adding text, removing it, changing it etc. I've looked far and wide, and cannot find anyway to print inside the box separately from the actual box.
My current implementation is to clear screen, and then reprint the entire box with new text using this:
printf("\e[1;1H\e[2J");
The issue with this is that I get this very obnoxious blinking effect, because every iteration of clearing my screen causes that portion of the screen to become black for a certain period of time.
So I am looking for a few solutions.
How to print a border separate from the print statement inside of it. I currently am implementing it like such:
printf("| | Hello There ||\n");
, and then repeating that all the way down to make a border.
How to completely overwrite the already outputted text so that this blinking effect can go away. So imagine \r removing a line, I want something like that, that removes the whole text and replaces it with a new set of text
How to change the location of where the user inputs into the console, so you can type into a box
Those are basically the only solutions I could think of, if you have any others I'd love to hear them
I also had a general question about c.
conio.h, graphics.h, windows.h and a few other headers don't work for my compilers. I use ubuntu, and they always come up with some error saying I can't use them. I appreciate someone explaining this to me.
Please let me know what you think, and if you need more info, I'll be sure to provide it
-Ryan
conio.h and windows.h are not standard Linux libraries, so they won't compile on Linux unless you install extra software. One solution would be to use a library designed for managing the screen like ncurses.
You can do that with loops and ASCII characters similar like that:
#include <stdio.h>
int main()
{
int i;
printf("\n\t\t═");
for(i=0;i<=20;i++)
{
printf("═");
}
for(i=0;i<=22;i++)
{
printf("\t\t║\n");
if(i==10)
{
printf("\t\t\tHello There \t\n");
}
printf("\t\t\t\t\t║\n");
}
printf("\t\t═");
for(i=0;i<=22;i++)
{
printf("═");
}
return 0;
}

How do I get system default checkbox BITMAP in VS2015?

I want to get the system's default checkbox for to display it in an owner-drawn MFC menu.
I have read this question, but that did not answer my question.
I want to implement this line:
hbmpCheckboxes = LoadBitmap((HINSTANCE) NULL,
(LPTSTR) OBM_CHECKBOXES);
which I got from MSDN, section
Simulating Check Boxes in a Menu
I get this error: Error C2065 'OBM_CHECKBOXES': undeclared identifier
If I define it myself: #define OBM_CHECKBOXES 32759, and I run the code, then LoadBitmap returns a handle. In VS2015 I see this: hbmpCheckboxes 0xc305143c {unused=??? }, so to me it seems an invalid bitmaphandle is returned. I think there is more missing than just the OBM_CHECKBOXES define, but I can't figure out what.
Is there a file I should include?
Is there a DLL which I need to link
against?
Is there a project setting I should set?
Or...?
Have a look at this topic.
You want to use CBitmap::LoadOEMBitmap and note the comment at the bottom:
Note that the constant OEMRESOURCE must be defined before including WINDOWS.H in order to use any of the OBM_ constants.

After adding snippit of code to default/setting.php bombarded by header warnings

I'm quite aware this question has been asked before multiple times, but I have no idea how to deal with this in my specfic situation. All I did was modify the default/settings.php file in order for the toolbar drawer in drupal to support more shortcuts.
I inserted the following code in the bottom of the document:
/**
* Changing Max Shortcut Slots
*
* The shortcut module supports a total of seven shortcuts slots. To change
* the quantity of supported enabled shortcuts the 'shortcut_max_slots' must be
* modified accordingly.
*
* #see https://www.drupal.org/documentation/modules/shortcut
*/
$conf['shortcut_max_slots'] = 11;
Well I got it to work, which is good, but I'm assaulted by a barrage of warnings, each one stating the following:
Warning: Cannot modify header information - headers already sent by (output started at /home/adamdcco/public_html/hadarc.com/cms/sites/default/settings.php:1) in drupal_send_headers() (line 1221 of /home/adamdcco/public_html/hadarc.com/cms/includes/bootstrap.inc).
I'm lost, I looked into the bootstrap file and navigated to the specficed line and, unfortunately no lightbulb. Sorry I'm new :), but I did search around, before being utterly overwhelmed
Any and all help is appreciated :P
Well than looks like we're good :)
I searched around some more and came across this question/answer
How to fix "Headers already sent" error in PHP , in a nutshell it's the same question, amazing answer, so yeah just in case anyone cared the code I inputted:
$conf['shortcut_max_slots'] = 11;
should of had quotes around the eleven, and any extra spaces in the beginning and in the end of the file had to be removed. Live and Learn :)

Netbeans C code format

I am using NetBeans for my C coding and I would like to know how to change the format for it. I would like it to appear like this when I pres enter for a new line:
int main(int argc, char** argv)
{
int x;
void xzy()
{
}
printf("etc...etc..etc..");
return (EXIT_SUCCESS);
}
Basically to the point where everything starts at the beginning of the line rather than this:
int main(int argc, char** argv)
{
int x;
void xzy(){
}
printf("etc...etc..etc..");
return (EXIT_SUCCESS);
}
First of all, I consider that what you are trying to do will make the code very unreadable and it goes against the standards. But if you really want to do it, here is what I found:
In NeatBeans, go to Tools > Options. The Options window will pop up. Click Editor and then select the Formatting tab. In the Language dropdown, select C. In the Category dropdown, select Formatting Style. Check the option Override Global Options. Then bellow set the property Indent Size to 0.
It's hard to know exactly what you mean since your sample code doesn't display correctly as currently formatted, but it sounds like you want to turn off the auto-indent feature. To my knowledge, there's no way to completely disable the auto-indent in NetBeans. You can adjust the size of the indent and the indentation style used, but you can't completely turn it off. If you play around with the code formatting options for a while, you may be able to get something that's similar to what you want.
As a side-note, this is not the best forum for asking this sort of question. You'll likely get a much better response by using the NetBeans forum/mailing list.

Wondering about qooxdoo syntax/parsing

I found two lines in my code.
test = new qx.ui.form.RadioGroup;
I am wondering, if the missing () might cause issues or should maybe raise a warning in the generator or the lint job.
qx.ui.form.RadioGroup;
I think it might be worth reporting it as a "statement without effect" in lint.
mck89's comment is the answer (I wonder why so many people put valid answers in comments...):
You don't need the parens, and new qx.ui.form.RadioGroup is a syntactically correct expression, equivalent to adding a pair of empty parens. (There are some checkers that will warn about this, like I believe JsLint, but qooxdoo doesn't ... :).
In your particular case, the code will also run successfully in the browser, as RadioGroup permits empty constructor args; you can use .add() later to add items to the group.

Resources