Semaphore Implementation and the user level thread library c
One of my assignment states to implement user level Non preempt library. I
have implmented the same. :) As part of the assginment, I have to
implement the semaphore routines too. I have to implement four semaphore
routines like SemaphoreInit(int value), SemaphoreSignal(mysemaphore),
SemaphoreWait(mysemaphore) and SemaphoreDestroy(mysemaphore). Can anyone
point me on how to start this? Give me some relavent links which I can see
and start implementing.
Thanks
Tuesday, 3 September 2013
How to debug in ipad app?
How to debug in ipad app?
i have a question regarding the iPad app development
most of my codes are written in JS and works in web but I need to test it
in iPad.
The problem is i have no idea how to turn iPad app console on to see the
logs. os I can't really tell something like the variable value or if there
is an error in iPad.
Any tips here? Thanks a lot!
i have a question regarding the iPad app development
most of my codes are written in JS and works in web but I need to test it
in iPad.
The problem is i have no idea how to turn iPad app console on to see the
logs. os I can't really tell something like the variable value or if there
is an error in iPad.
Any tips here? Thanks a lot!
Make a View for forecasting based on structure of a View with existing data in SQL
Make a View for forecasting based on structure of a View with existing
data in SQL
In my database I have a View Revenues with fields ProductID, EditionID,
Year, January, February, March,..., December.
I need to display in Excel for each ProductID and EditionID all the year
and months revenues in a single record. In order to do that I execute the
query:
SELECT *
FROM Revenus r1
JOIN Revenues r2
ON r1.ProductID = r2.ProductID
AND r1.EditionID = r2.EditionID
WHERE r1.[Year] <> r2.[Year]
That works perfectly. However since the sheet will be used also for
forecasting purposes, I have been asked to have the Year and months with a
10 years horizon. That means besides the data already existing in the
database, given starting year 2013, I must have years and related month
till 2023. The months related data must be equal to zero if there is no
Year yet in the database.
I tried with pivot table but it does not sound as the right solution. I
might try with a foreach but I read on the web that is a bad practice. The
best solution, yet a bit dirty, might be to join the existing data with a
View built on the fly with empty records for months and increase the year
for each "iteration". Anybody might help? Thanks
data in SQL
In my database I have a View Revenues with fields ProductID, EditionID,
Year, January, February, March,..., December.
I need to display in Excel for each ProductID and EditionID all the year
and months revenues in a single record. In order to do that I execute the
query:
SELECT *
FROM Revenus r1
JOIN Revenues r2
ON r1.ProductID = r2.ProductID
AND r1.EditionID = r2.EditionID
WHERE r1.[Year] <> r2.[Year]
That works perfectly. However since the sheet will be used also for
forecasting purposes, I have been asked to have the Year and months with a
10 years horizon. That means besides the data already existing in the
database, given starting year 2013, I must have years and related month
till 2023. The months related data must be equal to zero if there is no
Year yet in the database.
I tried with pivot table but it does not sound as the right solution. I
might try with a foreach but I read on the web that is a bad practice. The
best solution, yet a bit dirty, might be to join the existing data with a
View built on the fly with empty records for months and increase the year
for each "iteration". Anybody might help? Thanks
can't update file records with this function
can't update file records with this function
Ok so i got this function that suppose to update record in this file below
the first line tells the number of entries and this member function is
suppose to modify it it with the agrs
void fman::update(ul ln_num, const char* str)
{
//ul is a typedef for unsigned int, fio is fstream error_check works
//corretly
if (!error_check(fio))
return;
fio.seekg(0, std::ios_base::beg);
fio>>_ln_num_w;
eatline(fio);
if (ln_num > _ln_num_w || ln_num < 0)
{
std::cout<<"\nline number exceddes the number of lines";
return;
}
ul i = 0;
while (true)
{
if (i == ln_num){break;}
eatline(fio);
fio.get();
fio>>i;
}
fio.get();
fio.get();
for (ul j = 0;j < strlen(str);j++)
{
fio<<str[j];
if (fio.get() == ')')
break;
}
}
here is eatline
void fman::eatline(std::fstream &_fio)
{
while (_fio.get() != '\n')
continue;
}
update doesnt even modify the file.
Ok so i got this function that suppose to update record in this file below
the first line tells the number of entries and this member function is
suppose to modify it it with the agrs
void fman::update(ul ln_num, const char* str)
{
//ul is a typedef for unsigned int, fio is fstream error_check works
//corretly
if (!error_check(fio))
return;
fio.seekg(0, std::ios_base::beg);
fio>>_ln_num_w;
eatline(fio);
if (ln_num > _ln_num_w || ln_num < 0)
{
std::cout<<"\nline number exceddes the number of lines";
return;
}
ul i = 0;
while (true)
{
if (i == ln_num){break;}
eatline(fio);
fio.get();
fio>>i;
}
fio.get();
fio.get();
for (ul j = 0;j < strlen(str);j++)
{
fio<<str[j];
if (fio.get() == ')')
break;
}
}
here is eatline
void fman::eatline(std::fstream &_fio)
{
while (_fio.get() != '\n')
continue;
}
update doesnt even modify the file.
HTTP requests using the browser console
HTTP requests using the browser console
I want to test a download link from the broswer console by using HTTP
requests:
So when doing this, the console tells me:
get http://wallbase.cc/wallpaper/3023660;
SyntaxError: Unexpected identifier
get "http://wallbase.cc/wallpaper/3023660";
SyntaxError: Unexpected string
So how do you actually make HTTP calls from the console and viewing the
response?
Thanks
I want to test a download link from the broswer console by using HTTP
requests:
So when doing this, the console tells me:
get http://wallbase.cc/wallpaper/3023660;
SyntaxError: Unexpected identifier
get "http://wallbase.cc/wallpaper/3023660";
SyntaxError: Unexpected string
So how do you actually make HTTP calls from the console and viewing the
response?
Thanks
Do jars behave differently in unix and linux?
Do jars behave differently in unix and linux?
Hi i have a jar which creates a filtered XML file from a huge XML file.
Now this jar is working perfectly in UNIX with java SE 1.5.0.15 but in
LINUX this jar is behaving differently and creating erroneous XML? Can
this be a platform issue? Do i require to make a new jar for LINUX?
Thanks in advance
Hi i have a jar which creates a filtered XML file from a huge XML file.
Now this jar is working perfectly in UNIX with java SE 1.5.0.15 but in
LINUX this jar is behaving differently and creating erroneous XML? Can
this be a platform issue? Do i require to make a new jar for LINUX?
Thanks in advance
Monday, 2 September 2013
how to avoid exposing ajax calls in the client side
how to avoid exposing ajax calls in the client side
I am building a project where many ajax calls are made to get data through
API. When I open console, it is exposing the calls that are made to
server. Is there any alternative way to call the php files hidden.
Thank you in advance
I am building a project where many ajax calls are made to get data through
API. When I open console, it is exposing the calls that are made to
server. Is there any alternative way to call the php files hidden.
Thank you in advance
Subscribe to:
Posts (Atom)