[Solved] Yet Another SQL Query

It’s not entirely clear what you mean by “in the past 5 days“, but something along the following lines should do the trick: SELECT COUNT(DISTINCT IDENT) FROM PS_LOGIN_LOG WHERE USER = ‘someuser’ AND TIME >= CURRENT_DATE – INTERVAL 5 DAY AND TIME < CURRENT_DATE + INTERVAL 1 DAY 0 solved Yet Another SQL Query

[Solved] How to create a button with two states? [closed]

http://jsfiddle.net/z2J3B/2/ include the function in your head function test() { var submit = document.getElementById(“submit”); var message = document.getElementById(“message”); if (submit.className == “check”) { submit.setAttribute(“disabled”); var inc = 10; message.innerHTML = “you have ” + inc + ” seconds left, check the form”; var interval = setInterval(function () { inc–; message.innerHTML = “you have ” + … Read more

[Solved] How can i get “Table of content” from PDF file and save it to the tree struct?

Aspose.Pdf.Generator namespace only supports the feature to create TOC while generating new PDF and Aspose.Pdf for .NET does not support the feature to manipulate TOC in existing PDF file. However for the sake of implementation, the requirement is added in issue tracking system as PDFNEWNET-34836. Once the new feature becomes available, we would be able … Read more

[Solved] Regarding retain count [closed]

Retain counts are pretty much useless, see http://whentouseretaincounts.com for details of why. However, I added calls to retainCount to your code and ran the following: NSArray *arr = [[NSArray arrayWithObjects:@”ag”, @”sdfg”, @”dgh”, nil] retain]; NSLog(@”%ld”, [arr retainCount]); NSArray *newArr = [[arr mutableCopy] retain]; NSLog(@”%ld”, [newArr retainCount]); [arr release]; NSLog(@”%ld”, [arr retainCount]); [newArr release]; NSLog(@”%ld”, [newArr … Read more

[Solved] Store a css class into a cookie

You’ll want to store a value into a cookie rather than a whole method. Then depending on the value of the cookie (or whether it simply exists) you’ll know whether to show the field or not by checking the cookie value when the page is loaded. 0 solved Store a css class into a cookie

[Solved] AlertDialog, kill activity onClick “NO” [duplicate]

You need to provide an OnClickListener where you can call finish() for your activity. .setNegativeButton(android.R.string.no, new OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { //replace MainActivity with your activity’s name MainActivity.this.finish(); } }) solved AlertDialog, kill activity onClick “NO” [duplicate]

[Solved] Input in the facebook hacker cup [closed]

For this you can use the node.js filesystem api (also write your code in node.js – it’s on google v8 so it should be fast enough for this one) EDIT I thought about your problem and it can be more simply solved (without using node.js) making a AJAX request to the file. You can achieve … Read more

[Solved] How to truncate string value in c#? [closed]

Ok, I will take a guess at the logic rules. How about: string newStr = str.Substring(0,4)+str.Substring(10,4)+str.Substring(15,6); or maybe you want string newStr = str.Substring(0,4)+str.Substring(10,4)+str.Split(“-“)[1]; there are many things you could want 3 solved How to truncate string value in c#? [closed]

[Solved] Parse java manifest file in C# [closed]

I doubt that there’s a C# Specific library for this, but this question (Use of the MANIFEST.MF file in Java) has a great overview of the file, what it’s for, and a lot of other helpful information. That being said, the quick and dirty way (in my opinion) for how to do this would be … Read more

[Solved] Which is the correct method of declaration CSS class? and what is different from following methods?

Both are valid, but used in different ways: .classname: Styles will be applied for every element with class classname element.classname: Styles will be applied for every type of this element element with class classname Example: .class { width: 100px; height: 100px; background-color: blue; } div.class { background-color: yellow; } <div class=”class”></div> <section class=”class”></section> <p class=”class”></p> … Read more

[Solved] Project Euler 8 C++ Debug [closed]

Adding to Igor Tandetnik’s answer: There is another problem, (n[i]-‘0’)*(n[i+1]-‘0’)*(n[i+2]-‘0’)*(n[i+3]-‘0’)*(n[i+4]-‘0’)*(n[i+5]-‘0’)*(n[i+6]-‘0’)*(n[i+7]-‘0’)*(n[i+8]-‘0’)*(n[i+9]-‘0’)*(n[i+10]-‘0’)*(n[i+11]-‘0’)*(n[i+12]-‘0’) is calculated as an int and therefore it will overflow for example at i == 88. You have to cast the first value to unsigned long long to have the whole calculation as unsigned long long. #include <iostream> #include <string> using namespace std; int main(){ … Read more