I noticed the first time you drag it around and then cancel the dragging, the js in the dragged item will fire another time, after that, everything seems normal, any idea?
I have just passed this article online:
C# Corner and C# Corner and his article (a software developer with over 13 years of experience) recommended using System.Random as follows:
private int RandomNumber(int min, int max)
{
Random random = new Random();
return random.Next(min, max);
}
Isn't that would give him the same number every time ??
Edit:
So my question will become: How does Random choose its seed? a constant or current time value?
Thanks
The typical use-case is for simple things like @Override, but clearly you can do a lot more with them. If you push the limits of them, you get things like Project Lombok, though my understanding is that that's a huge abuse of annotations. What exactly can you do? What sort of things can you do at compile-time and run-time with annotations? What can you not do?
The only reason I can think of is that calculating ETag's might be expensive. If pages change very quickly, the browser's cache is likely to be invalidated by the ETag. In that case, calculating the ETag would be a waste of time. On the other hand, a giving a 304 response when possible minimizes the amount of time spent in transmission. What are some good guidelines for when ETag's are likely to be a net winner when implemented with Django's CommonMiddleware?
I want to show rotaing image when I click on tab. The tab content is some ui which takes some time to load. I want to show that rotating image for that period of time. Is there a way to do that?
Hi,
have can i speed up the loading of images - specialy when i open the website for the first time it takes some time for images to load...
Is there anything i can do to improve this (html, css)?
link
I decided to check out Resource Monitor (on the 'Performance' tab in Task Manager, Windows 7) and I noticed in the "Network" section that the 'System' image name kept making a bunch (~5 at a time) of connections to random IP addresses, it would show anywhere from 1-500 bytes/sec 'sent'. They would stay connected for 1-2 minutes.
-All web browsers are closed
So, first thing I did was run a trace from network-tools.com on some of these IP addresses. 8/10 were outside of US and did not resolve to any host name. Of the 10 IP addresses I traced, 2 were in US, 4 showed origins in China, and one each to Algeria, Russia, Pakistan, Korea. (!)
So, the next thing I did was turn off my wireless card, watch the connections disappear, then turn the card back on, and within 30 seconds more random connections were created by System, with different IP addresses from the first time.
The next thing I did was go open Task Manager, Show Processes From All Users, then I killed just about everything that wasn't (what appeared to be) a windows process.
Turned on wi-fi, and again within 30 seconds, random IP addresses connect for ~ 1 min at a time, new ones coming and going.
I occasionally use bit torrent on this machine, but there was definitely no process that seemed related to bt running after I went through task manager, and bt wasn't open to begin with.
So, any ideas on what these connections might be for?
I have been using Ad-Aware Free and AVG Free on this computer for a while now, always up to date..
I have develop application on VS-2005 and installed it at another machine and along with application I have installed .net frameworks 2.0 version as per demand and it works well at time of installed and after some time if I try to open it it’s throw error like “ .Net Framework Initialization Error, Unable to find a version of the runtime to run this application.
Client Machine : Operating System is XP sp2
How to overcome from it?.
Hi,
Is there any web service available that returns the information of Time zone based on the location name entered. I am preparing the application where in user will enter the place, based on the place entered, I need the information of the timezone (preferably current time and date) of that particular location.
Kindly help me.
Regards,
Dipal
I have a DB schema composed of MYISAM tables, i am interested to delete old records from time to time from some of the tables.
I know that delete does not reclaim the memory space, but as i found in a description of DELETE command, inserts may reuse the space deleted
In MyISAM tables, deleted rows are maintained in a linked list and subsequent INSERT operations reuse old row positions.
I am interested if LOAD DATA command also reuses the deleted space?
UPDATE
I am also interested how the index space reclaimed?
hi all,
is there any way via which we can interact to iphone scheduler and insert and delete data through any iphone application. And produce alerts on that particular time.A user will insert data in the scheduler through the iphone app and user will get notify on that particular time .
Thanks
Balraj
Is there any plugings or text editor to auto-complete SQL statement? I am using SQL Server Management Studio (ssms) 90% of time, but most of time I have to type SELECT FROM WITH(NOLOCK) WHERE blahblah. Trying to find a more efficient way. Thanks.
This seems like a lot of work; to check for null each time an object is used.
I have been advised that it is a good idea to check for null pointers so you don't have to spend time looking for where segmentation faults occur.
Just wondering what the community here thinks?
Hey all,
Apologies if this post feels like its been covered elsewhere, but I don't think it has.
I've been down a winding web hosting road. To date, I've tried: Joyent, Media Temple, Bluehost, Hostgator, and finally Linode. The reason for switching are likely obvious to everyone: speed. With the exception of the lightening fast Linode, all of the shared hosts are absolutely sloooow.
What do do when you're not really a "developer"
While I'v grown addicted to the speed of Linode, I really don't feel like its where I should be. I have this nagging feeling in the back of my mind that one of these days (likely soon), I'm going to run into something that i won't be able to figure out and i'll have days worth of downtime. Just the other day, for example, I realized that one of my domains wasn't sending emails. After 4(!) hours looking into the problem, I still can't get sendmail or postfix to work. Four hours!!
I want to be a Drupal expert, not a Ubuntu expert
That's really the heart of my problem: I spend way too much time learning Ubuntu's ins-and-outs, and not nearly enough time working on Drupal.
So here goes: Is there a web host out there anywhere that offers the speed of Linode, but will let me focus on Drupal instead of sys-admin-ing?
Thanks!
[ I know, I know. There are going to be lots of people who read this saying - "just learn Ubuntu like a real developer". And I get that. I do. But when I work full-time and try and develop some of these sites in my evenings and weekends, I'm really feeling like the sys-admin stuff gets in the way.
What would be the best database design for employee clocking and out? Right now I have two tables.
Employee Base Table: Employee Id, relevant information like name and address, clocked in column
Employee Clocked in Table: Employee id, clock in date, Clock in Time, Clocked Out Time.
Is this a good way to track clocked in and clocked out? I appreciate any help
I have set up my POCOs and I have marked their public properties as virtual and I am successfully getting Proxies most of the time (95%) but randomly I am getting EF return some proxies and some non-proxies.
Recycling the app pool when this happens will then fix this instance of the error and it will go away for an amount of time. Then it will re-occur in some other random (it seems) place.
What can cause this sort of behaviour?
Thanks, Kohan
"This website is temporarily unavailable. Please check back later.
Unfortunately there were no suitable nodes available to serve this request."
When I request a stored procedure from my program (SP is taking 2 minutes to execute) the above error is getting.
I believe this is because of Load balancer Time out. How we can increment the load balancer time out.
Often time methods take more than 3 parameters which are all of the same type, eg.
void mymethod (String param1, String param2, String param3)
then it's very easy for the client to mix up the parameters orders, for instance inverting param1 and param2:
mymethod (param2, param1, param3);
...which can be the cause of much time spent debugging what should be a trivial matter.
Any tips on how to avoid this sort of mistake (apart from unit tests) ?
In our oroject we already have a lots of tables (100+). Some of them contains a lot of columns (50-100) and we are facing the need of adding more columns from time to time.
What do you think is best - from maintenance and performance point of view - to split these huge tables in smaller entities or to keep the tables the way they are ?
We are using an ORM tools, so we don't need to write custom request.
Every so often, I log on and get the Following Message:
User profile was not loaded correctly. You have been logged on with a temporary profile.
Changes you make to this profile will be lost when you log off. Please see
the event log for details or contact your administrator
This almost always happens when somebody else has been on the computer for a while, and then I log on. This never used to happen, but now it happens pretty often.
My profile is not permanently corrupted, all I have to do is restart my computer, but this annoys me, and I would like to fix it.
I was curios about the reason of this cause, so I looked into the Event Log, and found the root of the problem was the ntuser.dat file in the profile that I was logging on to was locked at logon time. This resulted in the current users registry not being loaded, resulting in failure to load the profile.
I just found a microsoft article that mentions this exact issue: http://support.microsoft.com/kb/960464/
The problem is that I do not want to delete this profile; and this issue does not come up every time that I log on, only when somebody else has been on a long time before me.
What could be locking this file? Is there any way to get a process list without logging on so that I can identify which process has the file locked? Any other suggestions?
for a current webapp i need a "outlook-like" calendar... Here are some requirements for the calendar:
week-view for the appointments
different appointment types
direct display of the length and time of the date (like in googleCalendar)
multiple appointments for the same time
only using javascript, php and any DB
We need the calendar for the Zend Framework, so if the Calendar doesn't already support the ZF, the source needs to be editable!
do you know any calendar which fits my needs? or do you have any tipps for developing one by myself?
I have changed timezone from General Settings, but that had no effect, time still shows as default UTC time zone. Then I changed timezone in wp-settings.php with date_default_timezone_set('Europe/Helsinki'); but that din't work either.
What could be wrong with my settings and why isn't timezone changing?
so I'm having some trouble creating a program to measure cache size in C. I understand the basic concept of going about this but I'm still having trouble figuring out exactly what I am doing wrong.
Basically, I create an array of varying length (going by power of 2s) and access each element in the array and put it in a dummy variable. I go through the array and do this around 1000 times to negate the "noise" that would otherwise occur if I only did it once to get an accurate measurement for time. Then, I look for the size that causes a big jump in access time. Unfortunately, this is where I am having my problem, I don't see this jump using my code and clearly I am doing something wrong.
Another thing is that I used /proc/cpuinfo to check the cache and it said the size was 6114 but that was not a power of 2. I was told to go by powers of 2 to figure out the cache can anyone explain why this is?
Here is the just of my code...I will post the rest if need be
{
struct timeval start;
struct timeval end; //
int n = 1; // change this to test different sizes
int array_size = 1048576*n; // I'm trying to check the time "manually" first before creating a loop for the program to do it by itself this is why I have a separate "n" variable to increase the size
char x = 0;
int i =0, j=0;
char *a;
a =malloc(sizeof(char) * (array_size));
gettimeofday(&start,NULL);
for(i=0; i<1000; i++)
{
for(j=0; j < array_size; j += 1)
{
x = a[j];
}
}
gettimeofday(&end,NULL);
int timeTaken = (end.tv_sec * 1000000 + end.tv_usec) - (start.tv_sec *1000000 + start.tv_usec);
printf("Time Taken: %d \n", timeTaken);
printf("Average: %f \n", (double)timeTaken/((double)array_size);
}
Contents of check.py:
from multiprocessing import Process
import time
import sys
def slp():
time.sleep(30)
f=open("yeah.txt","w")
f.close()
if __name__=="__main__" :
x=Process(target=slp)
x.start()
sys.exit()
In windows 7, from cmd, if I call python check.py, it doesn't immediately exit, but instead waits for 30 seconds. And if I kill cmd, the child dies too- no "yeah.txt" is created.
How do I make ensure the child continues to run even if parent is killed and also that the parent doesn't wait for child process to end?
sifr3 text doesn't load many time first time on FF 3.5? I haven't checked on other browser.
If i reload page again then it loads properly.
this is my code
sIFR.replace(futura, {
selector: '#Homepage h1', ratios: [6, 1.24, 9, 1.13, 10, 1.15, 16, 1.09, 21, 1.06, 22, 1.07, 25, 1.04, 26, 1.06, 29, 1.03, 30, 1.05, 31, 1.03, 32, 1.05, 41, 1.04, 58, 1.03, 97, 1.02, 1.01],
wmode: 'transparent',
css: '.sIFR-root { background-color: none; color: #ffffff; }'
});