Hi I'm not too sure how to create the attached image effect where the right hand side is my main content and it shades onto my left sidebar which has a gradient effect downwards.
When I run the following program:
public static void main(String args[]) throws Exception
{
byte str[] = {(byte)0xEC, (byte)0x96, (byte)0xB4};
String s = new String(str, "UTF-8");
}
on Linux and inspect the value of s in jdb, I correctly get:
s = "ì–´"
on Windows, I incorrectly get:
s = "?"
My byte sequence is a valid UTF-8 character in Korean, why would it be producing two very different results?
I encrypt my message with a symmetric key and the symmetric key itself has to be further encrypted with different RSA public keys. When I tried to implement the above I got the following error:
javax.crypto.IllegalBlockSizeException: The input was invalid: Invalid input length.
at com.rsa.shareCrypto.j.hD.engineDoFinal(Unknown Source)
at javax.crypto.Cipher.doFinal(Cipher.java:2087)
at wrap1.main(wrap1.java:69)
Is there a way to solve this problem ?
In the following example:
class A
{
int len();
void setLen(int len) { len_ = len; } // warning at this line
int len_;
};
gcc with -Wshadow issue a warning:
main.cpp:4: warning: declaration of `len' shadows a member of `this'
function len and integer len are of different type. Why the warning?
We have a designer creating a user interface for an application. The main window has several QStackedWidgets used for in place panel switching. What I'd like to be able to do is extract each individual panel that makes up each page of the QStackedWidget into it its own .ui file.
Is there an easy way to accomplish this from within Qt Designer, or are there any other tools to help accomplish this task short of redesigning all of the panels in their own .ui files?
I have a TabHost and several tabs added to it.
Problem: The activities on these tabs are not created until the tab is pressed.
My tabhost is broadcasting intents but my broadcast receivers are not registered until onCreate in my tab activities is called. Is there any way to force activity creation?
Maybe my tabhost can call setCurrentTab and switch back to main tab(0), but is that really the best option available?
I have only little knowledge about LaTeX, basic formatting, basic math fomulae etc.. I found that LaTeX is hard to configure to my own flavor. Recently, I've heard about Docbook, which is also a typesetting mechanism, but much easier since it uses XML. So, if my main job using LaTeX/Docbook is writing a simple document (not a class book) with some mathematics, and I want easy configuration, and a highly constomizable application, which one is better, and is there any good book on Docbook?
How and where do you define your own Exception hierarchy in Java?
My main question concerns package location where they your Exception classes must be defined.
Do we create a special package ourexceptions and put all classes inside it?
When stopped at a breakpoint on main(), i can manually add name of a global variables to watch windows, but what i want is how to show a list of all global variables, because i'm using an external library, which contains many static things.
Is it possible?
Thanks in advance!
Trying to understand something. I created a d:\svn\repository on my server. I committed folders but when I go back to d:\svn\repository I do not see them. Are they all in a database? Will all my repositories go in that main folder and svn tracks them? What if I have two projects?
Thank you.
The main user-case is:
Create the 2D floor plan
See the 3D view of the room in colors and in dynamic lighting (switching on and off the lamps)
Select the furniture from the large library of predefined samples.
Change the color and texture of the furniture samples.
Create the photos of the 3D room view from different points.
Also user can move and turn the camera in the room and discover the view.
Here one more basic question asked in MS interview recently
Class A {
public virtual void Method1(){}
public void Method2() {
Method1(); }
}
class B:A { public override void Method1() { } }
Class main
{
A obk = new B(); obk.Method2(); }
now tell me which function gets called ? sorry for the typos.
To reduce http request i want to mix multiple jquery plugin's javascript filesa and main jquery file into one.
What things should be considered?
Do we just need to place code from all files into new file one bye one or need to do something more. ?
Please explain me below situation
What would be the output?
interface A{}
class B implements A{}
class C extends B{}
Class D extends C{}
class E extends D{
public static void main(String args[]){
C c = new C();
B b = c;
A a = (E)c;
A a = (B)c;
C c = (C)(B)c;
}
}
#include <gtk/gtk.h>
int main( int argc,
char *argv[] )
{
GtkWidget *window;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_widget_show (window);
gtk_main ();
return 0;
}
I tried putting various versions of MSVCR80.dll under the same directory as the generated executable(via cmake),but none matched.
Hi All,
I've just started reading C and have a question about macro.
How can I use a 5 byte value with a macro
For eg.
#define MAX 0xdeadbeaf12
int main(){
printf(" 0x %2x \n", MAX);
}
This code prints adbeaf12 but not deadbeaf12.
Please help.
Thanks
Is it possible to push to 2 or more remote repositories at the same
time?
I only want to mirror the main repository, where most if not all the
pulls will come from.
I want to develop a website in OOP pattern, but I am stuck in a point whether I need to inherit from multiple classes.
For example
I have a main class "index"
this class has several methods which need to inherited from other classes and I have created seperate classes for it like
class "banner", class "content", class "footer"
Not only this but class "content" has several methods to be inherited from other classes like
class "gallery", class "news", etc
I found out that multiple inheritance is not allowed, and using interface I cannot write codes in its methods, so how can i achieve a solution for this problem.
i has codez below:
#include <iostream>
using namespace std;
int main()
{
int * jonskeet = new int(0);
// now i deletes pointer data
delete jonskeet;
// now how i delete pointer?
return 555555;
}
how do i delete teh pointer now?? plz help me!
I need to write a Windows XP/Vista application, main requirements:
Just one .exe file, without extra runtime, like Air, .Net; posstibly a couple of dlls.
Very small file size.
The application is for network centric usage, similar to ICQ or Gtalk clients.
I am writing a big code and I don't want it all to be in my main.c so I wrote a .inc file that has IF-ELSE statement with function and I was wondering can it be written like this:
#if var==1
process(int a)
{
printf("Result is: %d",2*a);
}
#else
process(int a)
{
printf("Result is: %d",10*a);
}
#endif
I tried to compile it but it gives me errors or in best case it just goes on the first function process without checking the var variable (it is set to 0).
Lets us consider the following program :
#include <stdlib.h>
int main(int argc, char **argv){
int a,b;
if (argc != 3)
return -1;
a = atoi(argv[1]);
b = atoi(argv[2]);
a = b ? a/b : 0;
return a;
}
The task is to crash the program by providing arguments in command-line.
For Remote Desktop Sessions in Linux, I want to know if there something available equivalent for what Team Viewer does for windows?
The main advantage I find of Team viewer is that it can bypass firewalls, needs no NAT configurations or port forwarding rules to be setup in the router.
Can someone explain this behaviour?
test.c:
#include <stdio.h>
int main(void)
{
printf("%d, %d\n", (int) (300.6000/0.05000), (int) (300.65000/0.05000));
printf("%f, %f\n", (300.6000/0.05000), (300.65000/0.05000));
return 0;
}
$ gcc test.c
$ ./a.out
6012, 6012
6012.000000, 6013.000000
I checked the assembly code and it puts both the arguments of the first printf as 6012, so it seems to be a compile time bug.