Hello friends I have jquery grid with paging at the footer of the grid,
i have arrows for next and last..
istead of that can i define First Previous , Next and Last
thanks
In C++, the common practice is to declare functions in header files and define them in cpp files. This leads to always having two copies of every function's prototype. Then whenever I want to change a function's name/return value/parameter, I have to manually change it in both files. This seems unnecessarily tedious and there must be lots of people that share my pain, so is there a way to automate these changes between files in VS?
Bonus points for vim solutions as well.
Any ideas why Xcode wont let me define a c++ class in my cocoa project?
I am trying to use a C++ class in my cocoa project but I am getting build errors just creating the c++ header file.
class SomeClass{
public:
int count;
}
Expected '=', ',', ';', 'asm' or 'attribute' before 'SomeClass' in .....
If I remove all code from the header file, ?the cpp file builds without any errors and is included in the list of compiled sources...
Hello
I want to use a datatype to represent sizes like 3bits or 12bits.. can anyone tell me how can I implement this in c++
and is there any code like this, which can help me define size in bits
int i:3;
thanks in advance ..
CGRect type is a structure type. If I want to define a property as this type, should I use assign or retain attribute for this type?
@interface MyClass {
CGRect rect;
...
}
@property (nonatomic, assign) rect; // or retain?
Suppose I want my draggable widget to move differently than just staying under my cursor while being dragged. For instance, having the widget move only in one axis, or have the widget move double the distance between the cursor and the drag starting point. Which method should I override to define this kind of behaviour?
if i have defined a global variable(with initialization) in header file, and included this file in two file and try to compile and link, compiler gives linking error
-----------------
>>headers.h
#ifndef __HEADERS
#define __HEADERS
int x = 10;
#endif
>>1.c
#include "headers.h"
main ()
{
}
---------------------
>>2.c
#include "headers.h"
fun () {}
Hi all,
I'm trying to setup a simple logging framework in my shell scripts. For this I'd like to define a "log" function callable as
log "LEVEL" $message
Where the message is a variable to which I have previously redirected the outputs of executed commands. My trouble is that I get errors with the following
{message=command 2&3 1&3 3&-} &3
log "INFO" $message
There's something wrong isn't there?
TIA
In my application I am using a webview, and in order to increase/decrease text size, I am using WebSettings().setTextSize method, but, this method is limited to 5 predefined enum sizes only (SMALLEST, SMALLER, NORMAL, LARGER,LARGEST).
I know I can use WebSettings().setTextZoom(int), but my application is available for API Level 8 and above, and this method was introduced in API Level 14...
My question is: Is there any way to add other sizes to webSettings().setTextSize? maybe by extending textSize enum, or define other sizes?
are there any frameworks for php that follow the style of vaadin,
in vaadin you can define web forms using java with touching javascript or any client scripting in swing style ?
is it not possible to define a static const array? i would like to have an optional parameter to a function that is an array of colors,
private static const DEFAULT_COLORS:Array = new Array(0x000000, 0xFFFFFF);
public function myConstructor(colorsArray:Array = DEFAULT_COLORS)
{
}
i know i can use ...args but i actually wanting to supply the constructor with 2 separate arrays as option arguments.
Although you wouldn't want to do this, if you have a namespace COMPANY, and a class in that namespace SOMECLASS. Why is it that in the .cpp file, you might define the functions as
COMPANY::SOMECLASS::someFunction()
{}
But in main, you don't do
int main() {
COMPANY::SOMECLASS::someFunction();
}
but instead you declare the namespace and do something like:
using COMPANY::SOMECLASS;
int main() {
someFunction();
}
In IIS 5 & 6 there's a tab called "Directory Security" where one can define the authentication access and check the "Integrated windows authentication" checkbox.
I can't find the same options in IIS Manager in Windows 7.
(define (member atom list)
(cond
((null? list) '())
(= atom (car list) "True")
(else
(member atom(cdr list)))
)
)
(member '5 '(1 2 3 4 5))
Always it gives true even though that atom isn't a member in the list. Could you plz help me to clarify this question as soon as possible.
I'm using a macro and I think it works fine -
#define CStrNullLastNL(str) {char* nl=strrchr(str,'\n'); if(nl){*nl=0;}}
So it works to zero out the last newline in a string, really its used to chop off the linebreak when it gets left on by fgets.
So, I'm wondering if I can "return" a value from the macro, so it can be called like
func( CStrNullLastNL( cstr ) ) ;
Or will I have to write a function
I'm working on a project where I'm using mindmeister.com as a tool when brainstorming new ideas.
Now I need a tool where I can define roles and what responsibilities they have, and link this to a person / persons. It would also be nice if I could add tasks with a due date for each person.
Are there any open source websites which has this?
Hi can someone help me making a queue program. i want to set the array[0] to be array[1] just in display but in real i am adding value at array[0]. i got how to run the add function to it. but i can't do the view and delete command that will view from ex. array[0] to array[4], when displayed array[1] to array[5] with the value inserted.
#include <stdio.h>
#include <stdlib.h>
#define p printf
#define s scanf
int rear = 0;
int front = 0;
int *q_array = NULL;
int size = 0;
main()
{
int num, opt;
char cont[] = { 'y' };
clrscr();
p("Queue Program\n\n");
p("Queue size: ");
s("%d", &size);
p("\n");
if(size > 0)
{
q_array = malloc(size * sizeof(int));
if(q_array == NULL)
{
p("ERROR: malloc() failed\n");
exit(2);
}
}
else
{
p("ERROR: size should be positive integer\n");
exit(1);
}
while((cont[0] == 'y') || (cont[0] == 'Y'))
{
clrscr();
p("Queue Program");
p("\n\nQueue size: %d\n\n", size);
p("MAIN MENU\n1. Add\n2. Delete\n3. View");
p("\n\nYour choice: ");
s("%d", &opt);
p("\n");
switch(opt) {
case 1:
if(rear==size)
{
p("You can't add more data");
}
else
{
p("Enter data for Queue[%d]: ", rear+1);
s("%d", &num);
add(num);
}
break;
case 2:
delt();
break;
case 3:
view();
break;
}
p("\n\nDo you want to continue? (Y\/N)");
s("%s", &cont[0]);
}
}
add(int a)
{
q_array[rear]=a;
rear++;
}
delt()
{
if(front==rear)
{
p("Queue Empty");
}
else
{
p("Queue[%d] = %d removed.", front, q_array[front]);
front++;
}
}
view()
{
int i;
for(i=front;i<=rear;i++)
p("\nQueue[%d] = %d", i, q_array[i]);
}
This is my template matrix class:
template<typename T>
class Matrix
{
public:
....
Matrix<T> operator / (const T &num);
}
However, in my Pixel class, I didn't define the Pixel/Pixel operator at all!
Why in this case, the compiler still compiles?
The codebase at work contains some code that looks roughly like this:
#define DATA_LENGTH 64
u_int32 SmartKey::SerialNumber()
{
unsigned char data[DATA_LENGTH];
// ... initialized data buffer
return *(u_int32*)data;
}
This code works correctly, but GCC gives the following warning:
warning: dereferencing pointer ‘serialNumber’ does break strict-aliasing rules
Can someone explain this warning? Is this code potentially dangerous? How can it be improved?
I want to define a function replicate to replicate a list of numbers by its value using only list comprehension, for example:
replicate [5,1,3,2,8,1,2]
output: [5,5,5,5,5,1,3,3,3,2,2,8,8,8,8,8,8,8,8,1,2,2]
I know this would be easy to use the 'replicate' built in function but only list comprehension is allow, how can I do this?
THANKS!
How can i define a Haskell function which will apply a function to every value in a binary tree? So i know that it is similar to the map function - and that its type would be:
mapT :: (a - b) - Tree a - Tree b
but thats about it...
Not quite sure how to ask or define this, but can't figure it out.
I have three tables like this:
persons person_id, first_name, last_name
hobbies hobby_id, name
persons_hobbies person_id, hobby_id
I need to make two lists. Persons that have both hobby A and B, and persons that have hobby A but not B. How can I write these two queries? Can't figure out how to do this with joining and all...
Long story short. Clone() returns object and my code expects a cmd bc i was working with another lib but nearly the same interface. How can i use define or 'using' to have it call a function extension? I tried extending with the name Clone but it was ignored. However it does see Clone2()
I was wondering what happens to the code contained in an <mx:Script> tag. If I define a function tehre, it just becomes a member function of the generated class. But I noticed that it seems OK for the compiler if I just write some (static) method calls there (specifically, I call Font.registerFont()). I feel kind of guilty for doing this, because I have no idea what's really happening and when the code gets executed.