Here is a table patients in MS access database, There is 20 records, I want to select first 0 10 records and after 11-20 records for pagination. How to solve this problem
I want to create a program for generating the series for the given base-n. ,
for example if my input is 2,then series shuould be, 00,01,10,11,etc.,(binary)
if my input is 10,then series shuould be,1,2,3,4,5,etc.,(decimal)
is there any general mechanism to find these numbers so that I can program for base-n.,
How can I insert all dates in an year(or more) in a table using sql
My dates table has following structure
dates(date1 date);
Suppose I want to insert dates between "2009-01-01" to "2010-12-31" inclusive.
Is there any sql query for the above?
Columns Words, WordsCount
For each value of Words "x y z" update wordscount with 3 , "a b" with 2, "a b c d" with 4 and etc...
How can I do it with/without .Net program ?
Hi all
I've built an iPhone app which is live in the app-store. When originally submitting the app it showed up in App Store as requiring iPhone OS 3.1.3. When later updating the app I made sure my settings in Xcode for the target for the app store build had the Base SDK version set to 3.1.3 and the Deployment Target version set to 3.0, however it still shows up in app store as requiring 3.1.3.
From what I've understood the Deployment Target version is the one setting the requirement in app store?
Or is there any information concerning this that I should have updated in iTunes Connect when submitting the updated app?
Thanks, Michael
Hello, My TeamCity's nightly build produces more than 130Mb java doc as Build Configuration artifact.
I have to share these artifact for other teams(developers), but javadoc every time has another one URL(I know that it's possible to get it like .lastFinished), and get's new place on Build Machine.
Is it possible on each build replace old artifact with new one because I don't need need previous versions? And have independent from build version URL for accessing.
Hi guys!
So this is probably programming 101 stuff, but I have a problem: I have 2 numbers which are between 0 and 49. Let's call them x and y. Now I want to get a couple of other numbers which are not x or y, but are also between 0 and 49 (I am using Objective C but this is more of a general theory question I think?).
Method I thought of is:
int a;
int b;
int c;
do {
a = arc4random() % 49;
} while ((a == x) || (a == y));
do {
b = arc4random() % 49;
} while ((b == x) || (b == y) || (b == a));
do {
c = arc4random() % 49;
} while ((c == x) || (c == y) || (c == a) || (c == b));
But it seem kind of bad to me, I don't know, I am just trying to learn to be a better programmer, what would be the most elegant sweet way to do this for best practices?
Thanks!
I know the standard Major.Minor.Build.Revision but there's several considerations for us that are somewhat unique
-We do internal releases almost daily, occasionally more than once a day.
-Windows Installer doesn't check Revision so that's almost moot for our purposes.
-Major and Minor numbers ideally are only updated for public releases and should be done manually.
-That leaves the Build # that needs to be automatically updated.
-We want internal releases to be able to be performed from any developer's machine so that leaves out using x.x.* in Visual Studio because different numbers could be generated from different machines and each build isn't guaranteed to be larger than the previous.
-We have about 15 or so projects as part of the product so saving the version numbers in SVN isn't ideal since every release we'd have commit all those files.
Given those criteria I can't really come up with a good versioning scheme. The last 2 criteria could be dropped but meeting all of those seems ideal. A date stamp is insufficient because we might do more than one a day, and given the max size of Uint32 (around 64000) (Actually using WiX it complains about numbers higher than Int32.MaxValue) a date/time won't fit.
Given this table:
Order
custName description to_char(price)
A desa $14
B desb $14
C desc $21
D desd $65
E dese $21
F desf $78
G desg $14
H desh $21
I am trying to display the whole row where prices have the highest occurances, in this case $14 and $21
I believe there needs to be a subquery. So i started out with this:
select max(count(price))
from orders
group by price
which gives me 3.
after some time i didn't think that was helpful. i believe i needed the value 14 and 21 rather the the count so i can put that in the where clause. but I'm stuck how to display that. any help?
I want to produce a JSON file, containing some initial parameters and then records of data like this:
{
"measurement" : 15000,
"imi" : 0.5,
"times" : 30,
"recalibrate" : false,
{
"colorlist" : [234, 431, 134]
"speclist" : [0.34, 0.42, 0.45, 0.34, 0.78]
}
{
"colorlist" : [214, 451, 114]
"speclist" : [0.44, 0.32, 0.45, 0.37, 0.53]
}
...
}
How can this be achieved using the Python json module? The data records cannot be added by hand as there are very many.
Hi,
In Python if I have 2 lists say:
l1 = ['a', 'b', 'c', 'd']
l2 = ['c', 'd', 'e']
is there a way to find out how many elements they have the same. In the case about it would be 2 (c and d)
I know I could just do a nested loop but is there not a built in function like in php with the array_intersect function
Thanks
Hi All,
I got one problem while doing one TAPI application based project in C#. I'm using ITAPI3.dll
My problem is.. i'm not getting incoming call information. To get the incoming call information, i'm using the getcallinfo function, but it is showing empty message.
I have a variable with the following value
$month = 201002;
the first 4 numbers represent the year, and the last 2 numbers represent the month. I need to get the last 2 numbers in the month string name eg. Feb
My code looks like this
<?php echo date('M',substr($month,4,6)); ?>
I can I go about to obtain the month name
Hi all,
I have this query:
SELECT DISTINCT brand_name FROM masterdata WHERE in_stock = '1' ORDER BY brand_name
It works well, except that I get far too many results. How do I limit this such that rather than just looking for distinct entries, it will only give me distinct entries that exist a minimum of 3 times (for example)?
Basically, if the column had this data...
brand_name
==========
apple
banana
apple
apple
orange
banana
orange
orange
...my current query would return "apple, banana, orange". How do I get it such that it only returns "apple, orange" (ignoring banana because it has less than three occurrences)?
I'm using PHP to build the query, if it matters.
Thanks!
I'd like to know whether it's possible to have phone numbers converted
into international format when a call is outgoing.
For instance, if a french user (sorry it's the only format i know i
won't make a mistake :-) try to call with the national format :
01.47.12.34.56 then a method will convert it into international format
like this : +33.1.47.12.34.56
I've looked into the doc of the PhoneNumberUtils but i don't know if
there is a method doing what i want.
Is there a way to set a limit on how many menu items users can add to Primary Links menu? I'm working on a Drupal site and I have a horizontal primary links nav bar. There is only room for no more than 7-8 links in the nav bar. I don't want the future maintainer of the site to add more than 8 items to the menu. Is there a way I can set a limit on that? Some module or override function?
Thanks,
I've used boost::gregorian::date a bit now.
I can see that there are the related months & years & weeks duration types.
I can see how to use known durations to advance a given date.
Qu: But how can I get the difference between two dates in months (or years or weeks) ?
I was hoping to find a function like:
template<typename DURATION>
DURATION date_diff<DURATION>(const date& d1,const date& d2);
There would need to be some handling of rounding too.
When I change the assembly information to lets say 1.0.0.1 i thought that i could read the version with $(Version) but it seems that it does not change?
Hi,
I am trying to get access to the AssemblyVersion and AssemblyFileVersion numbers in the assembly information using the post build event command line in visual studio 2008. Is there a way to get access to that information similar to how $(TargetName) gets its macro definition from the project title.
I have written the following program using Parallel Haskell to find the divisors of 1 billion.
import Control.Parallel
parfindDivisors :: Integer->[Integer]
parfindDivisors n = f1 `par` (f2 `par` (f1 ++ f2))
where f1=filter g [1..(quot n 4)]
f2=filter g [(quot n 4)+1..(quot n 2)]
g z = n `rem` z == 0
main = print (parfindDivisors 1000000000)
I've compiled the program with ghc -rtsopts -threaded findDivisors.hs and I run it with:
findDivisors.exe +RTS -s -N2 -RTS
I have found a 50% speedup compared to the simple version which is this:
findDivisors :: Integer->[Integer]
findDivisors n = filter g [1..(quot n 2)]
where g z = n `rem` z == 0
My processor is a dual core 2 duo from Intel.
I was wondering if there can be any improvement in above code. Because in the statistics that program prints says:
Parallel GC work balance: 1.01 (16940708 / 16772868, ideal 2)
and SPARKS: 2 (1 converted, 0 overflowed, 0 dud, 0 GC'd, 1 fizzled)
What are these converted , overflowed , dud, GC'd, fizzled and how can help to improve the time.