[Solved] C++ : Mini Project on Cryptography

There is a quite simple answer to how to encrypt files. This script uses the XOR encryption to encrypt files. Encrypt the file a second time to decrypt it. #include <iostream> #include <fstream> #include <string> using namespace std; void encrypt (string &key,string &data){ float percent; for (int i = 0;i < data.size();i++){ percent = (100*i)/key.size(); … Read more

[Solved] Does this work for anyone? [closed]

Don’t override the paint() method. Custom painting is done by overriding the paintComponent() method of a JPanel (or JComponent) and then you add the panel to the applet Don’t invoke repaint() from any painting method. This will cause an infinite loop. Don’t use sleeping code inside a painting method. If you want animation then use … Read more

[Solved] Is it possible to create the low-level grapics API (similar to OpenGL)? [closed]

No, implementing something like OpenGL is not possible. Since the time OpenGL has decended from the heavens complete, writing something like it was forbidden by all common religions. But really, what you’ll actually need is about 21 years of work, a few thousands of developers and broad support from all industry leaders, so yea, piece … Read more

[Solved] How to run a java applet code

To draw the I love you text you can call: g.drawString(…) method and position it over the T-Shirt. Next to draw a heart shape, you can call the same method using the ASCII’s heart shape: ♥ But be sure to use a nice (big enough) font so it can be visualized correctly, for example: g.setFont(new … Read more

[Solved] Java graphic library for multicoloured text [closed]

I’m assuming you’re rendering text to an arbitrary component (via paintComponent()) rather than trying to modify the color of text in a JTextPane, JLabel, or other pre-existing widget. If this is the case, you should look into using an AttributedString along with TextAttribute. These allow you to assign different styles (color, font, etc.) to various … Read more

[Solved] How to set a pixel in C++? [closed]

You can turn on a given pixel, but this requires platform specific code and may not portable when the OS or platform changes. My understanding is you want direct access to the screen buffer with nothing between stopping you. Here’s the way to go. Common Research On your platform, find out the graphics controller, brand … Read more

[Solved] How can I make my own graphic interface? [closed]

Almost all programming languages have libraries that help you create a GUI (Graphical User Interface). Most programming languages, including C++, C#, and Java are general-purpose programming languages – you can use them to program whatever you want. For Java for example, see this tutorial: Creating a GUI With JFC/Swing. If you want to write an … Read more

[Solved] How to retrieve previous button state when start application again?

try this SharedPreferences sp=getSharedPreferences(“Button”, Context.MODE_PRIVATE); SharedPreferences.Editor Ed=sp.edit(); // get status of button to set backround from SharedPreferences in oncrate() methosd if(sp.getBoolean(“button1”,false)){ b1.setBackgroundColor(Color.WHITE); }else { b1.setBackgroundColor(Color.GREEN); } if(sp.getBoolean(“button2”,false)){ b2.setBackgroundColor(Color.WHITE); }else { b2.setBackgroundColor(Color.GREEN); } // set button background status in SharedPreferences b1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { b1.setBackgroundColor(Color.GREEN); b2.setBackgroundColor(Color.WHITE); Ed.putBoolean(“button1”, true); Ed.commit(); } } … Read more

[Solved] How to do imagesc and axis off at the same time in Matlab? [closed]

It’s not possible to do imagesc and axis off at the same time. However, you can modify the imagesc code to achieve this but you will not get MathWorks support for the modified version. To avoid the graphical artifacts, try different figure renderers: painters, opengl, … You can also try the startup flag -softwareopengl. solved … Read more