Does anyone have a idea,how to use date/time function to write time like facebook/twitter style:
e.g. 5 min ago
e.g. 10 hours ago.
Does anyone have tutorial for asp.net..
iam having 2 tables
table Items Table (this table holds all items iam having)
itemId
---------
Item1
Item2
Item3
Item4
Item5
table 2 users_item relation
UserId || ItemId
1 || Item1
1 || Item2
userId one has stored 2 items Item1,Item2.
Now i want to write a query on table1 (Items table) so that it displays all items which user1 has NOT chosen.
Is there anything like this:
TEST DELETE FROM user WHERE somekey = 45;
That can return any errors, for example that somekey doesn't exist, or some constraint violation or anything, and reporting how many rows would be affected, but not executing the query?
I know you can easily turn any query in a select query that has no write or delete effect in any row, but that can lead to errors and it's not very practical if you want to test and debug many queries.
In your favorite programming language, write a program that, when run, will print out its own source code!
Sounds interesting, now let's go!
ps: Literally, there is "NO" use case for this, just plain curiosity!
Hi,
I want to write a new file with the Java FileWriter. I use it like this:
FileWriter newJsp = new FileWriter("C:\\user\Desktop\dir1\dir2\filename.txt");
Now the dir1 and dir2 currently don't exist. I want Java to create them automatically if they aren't already there. Actually Java should set up the whole file path if not already existing.
How can I achieve this?
In ksh, I'd use
cd /usr/src/sys
How should I write it in Perl? A conversion such as
cd /usr/src/sys ---> chdir '/usr/src/sys'
Maybe the following would be better:
execute "chdir '/usr/src/sys' "
how to a Write a script that runs a 5 instances of a child process in the background (at a gap of 5 seconds) and do a continuous check to see if any of the child process is completed it starts another instance of the same process till the child process has executed 20 instances.
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.
While studying C# I found it really strange, that dynamically typed Python will rise an error in the following code:
i = 5
print i + " "
whereas statically typed C# will normally proceed the similar code:
int i = 5;
Console.Write(i + " ");
I would expect other way around (in python I would be able to do this without any casting, but C# would require me to cast int to string or string to int).
Just to highlight, I am not asking what language is better, I am curious what was the reason behind implementing the language this way.
for example i have array
int a[]=new int[]{3,4,6,2,1};
I need list of all permutation such that if one is like this, {3,2,1,4,6}, others must not be the same i know that if length of array=n then there is n! possible combination please help me to write this algortihm what to do?
I have a dead simple progress "bar" using something like the following:
import sys
from time import sleep
current = 0
limit = 50
while current <= limit:
sys.stdout.write('\rSynced %s/%s orders' % (current, limit))
current_order += 1
sleep(1)
Works fine, except over ssh with Putty. Putty only updates every 3 minutes or if a line ends with \n. Is this a Putty setting, sshd_config, or can I code around it?
Please advise a php framework for fast developing and for don't digress to write often using code(auth, db/orm,etc..).
Requrements:
Active community
Easy to use
simple many to many and many to one relations
auth. mechanism
RoR like
Please sorry for english.
I am reading a .xls file and then procesing it inside and rewriting it in the end of my program. I was wondering if someone can help me to parse the dates
as my input file name is like file_1_2010_03_03.csv
and i want my outputfile to be
newfile_2010_03_03.xls
is there a way to incorporate in matlab program so i do not have to manually write the command
xlswrite('newfile_2010_03_03.xls', M);
everytime and change the dates as i input files with diff dates
like
file_2_2010_03_04.csv.
Thanks
Hi everybody,
I need to write an ASP.NET application which must handle a very large number of transactions per second - as many as 5000 users may transact at the same time. I think I will use WCF in back to communicate with SQL server. But in front, can IIS handle 5000 users at the same time effectively, or is there any simple way to host my application outside of IIS?
I want to implement membership where email is used as the user id. Is there a ready-made provider for this, or do I have to write my own one? Or should I just make do with the 'default' one?
Do you need to have good spatial sense to be a good programmer?
I have next to nothing of it (I think it has to do with the differing vision of my eyes).
I've already coded quite little things but wonder if this interferes with the ability to 'imagine' the assembly of the code in case of a more complex program?
Sorry for my english, I'm Austrian and not so used to write in English..
Thanks for your ansers..
What would be the best way to write an app for the iPhone OS and the Android OS that allows access to a web blog (posted on blogspot.com)? Are there ways to manipulate the incoming data from the website to fit the UI of the phones, or will I have to re-do a lot of the blogs?
Any help would be nice! And thank you in advance!
Hello,
I'm finding informations about this CSPNRG online. I founded only one article from you on the javamex site, which told about the implementation of this class. So I'm asking you to lead me to some documentation on this. I am expecting a kind of fiable source...
Thank you for eanswering me
Sorry for my bad english, I'm french and not used to write in english
Hi All,
I'm trying to detect if a file exists at runtime, if not, create it. However I'm getting a 'The process cannot access the file 'myfile.ext' because it is being used by another process.' error when I try to write to it.
Any ideas how to fix it?
Thanks
Hello,
Do you know some good Open Source project written in PHP that is a finest example of MVC and is just the best example to learn how to write a state of art project?
kind regards,
I am trying to write an app for Toontown that will send the "end" key when the application is minimized or hidden. How do I do this. I cant figure it out
Thanks
When I have a string like "0xd8 0xff 0xe0" I do
Text.Split(' ').Select(part => byte.Parse(part, System.Globalization.NumberStyles.HexNumber)).ToArray();
But if I got string like "0xd8ffe0" I don't know what to do ?
also I'm able for recommendations how to write byte array as one string.