That I got no idea how.
I need a function that the window height or the monitor configuration is larger than 1200, put a div position top = 1000px and else put in another position top = 800px
Hi all
I've started coding on a 30 inch monitor and am wondering if it's possible to move the minibuffer to the top of the screen in emacs? google searches aren't showing up anything.
Cheers
Nimai Etheridge
Hi,
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4
5 my @array = qw[a b c];
6 foreach my($a,$b,$c) (@array) {
7 print "$a , $b , $c\n";
8 }
I receive following error: Missing $ on loop variable
What is wrong?
I am using: perl v5.10.1 (*) built for x86_64-linux-thread-multi
I have a question about using subqueries in an Update statement. My example:
UPDATE TRIPS
SET locations = city + ', ' FROM (select Distinct city
from poi
where poi.trip_guid = trips.guid)
Is it possible to refer to main table value (trips.guid) in subqueries?
When i try to use trips.guid I get the error:
"The multi-part identifier "trips.guid" could not be bound."
Hi all,
I want to write an application that will monitor the content of all open tabs in IE / FireFox and trigger event once particular data is displayed in the tab.
I would like to know if there is an API for IE/FF to set focus on particular TAB, so that once event is triggered I set focus on a relevant tab.
Thanks in advance
according to the newrelic faq https://docs.newrelic.com/docs/server/server-monitor-faq, The Server Monitoring agent can report Top 20 processes that are using significant memory or I/O and I can view the memory usage of the processes on the newrelic portal page.
However, I do not find any clue about how to get this metrics by newrelic REST API (I can get the CPU usage of processes by REST API). Is it possible to do this?
Hi, I have a PHP page with content that my users can view. When this page receives a POST request from a certain external URL, I'd like to redirect the user to another page.
The problems I'm' having are:
How can I monitor the page for requests being sent in an efficient way?
How can I actually redirect them since header() doesn't work.
Thanks.
Hi guys!
I am developing a multi-thread application and one of my threads is somehow blocked by something and thus it will occupy some resource such as a file forever. Is there a way to find out which thread is being blocked and more important what resouce is being held by that thread?
At last and as usual, thanks for your patience and reply. :)
Will the following piece of code work as expected in a multi-threaded scenario?
int getUniqueID()
{
static int ID=0;
return ++ID;
}
It's not necessary that the IDs to be contiguous - even if it skips a value, it's fine.
Can it be said that when this function returns, the value returned will be unique across all threads?
I am working on a program that automates tasks in a browser like entering text, clicking, etc and right now everything is working fine when using the Web Browser tool in Visual Studio 2010.
What I'd like to know is how should I approach converting all of this so I can use send requests instead of the browser? I heard its a lot more efficient and a lot better if you are going to be using multi threading but I have so much code that already works now and am not sure how I should do this without scraping quite a bit of it.
I've hit a wall. Does anybody know a good text editor that has search and replace like Notepad++ but can also do multi-line regex search and replace? Basically, I am trying to find something that can match a regex like:
search oldlog\(.*\n\s+([\r\n.]*)\);replace newlog\(\1\)
Any ideas?
I need to display the selecteditems in a label
I am using VB 2005
I set the selection mode to multi-extended
It did work selecting only one item with the following code:
me.xresultslabel.text= me.xlisttextbox.text.selectedItem.tostring
But when I tried to display more than one item using the following code:
me.resultlabel.text= me.xlisttextbox.text.selectedItems, I get the following string on the label:
system.windows.forms.listbox+selectedobjetcollections.
any help will be highly appreciate
I started a project and added it to hg, but I want to take *.cs file under version control only, so,i have to add bin, obj, sln, suo,_resharper folder etc to ignore pattern, ,how to let hg only monitor certain kind of file like white list? How to do that in Subversion?
I'm using an NSTextView to allow multi-line input. However, due to the nature of my app, users will be more comfortable moving to the next input element when they press TAB.
How can I make TAB exit the NSTextView, while keeping the newline behaviour of the Enter key?
Example for threading queue book "Accelerated C# 2008" (CrudeThreadPool class) not work correctly. If I insert long job in WorkFunction() on 2-processor machine executing for next task don't run before first is over. How to solve this problem? I want to load the processor to 100 percent
public class CrudeThreadPool
{
static readonly int MAX_WORK_THREADS = 4;
static readonly int WAIT_TIMEOUT = 2000;
public delegate void WorkDelegate();
public CrudeThreadPool() {
stop = 0;
workLock = new Object();
workQueue = new Queue();
threads = new Thread[ MAX_WORK_THREADS ];
for( int i = 0; i < MAX_WORK_THREADS; ++i ) {
threads[i] = new Thread( new ThreadStart(this.ThreadFunc) );
threads[i].Start();
}
}
private void ThreadFunc() {
lock( workLock ) {
int shouldStop = 0;
do {
shouldStop = Interlocked.Exchange( ref stop, stop );
if( shouldStop == 0 ) {
WorkDelegate workItem = null;
if( Monitor.Wait(workLock, WAIT_TIMEOUT) ) {
// Process the item on the front of the queue
lock( workQueue ) {
workItem =(WorkDelegate) workQueue.Dequeue();
}
workItem();
}
}
} while( shouldStop == 0 );
}
}
public void SubmitWorkItem( WorkDelegate item ) {
lock( workLock ) {
lock( workQueue ) {
workQueue.Enqueue( item );
}
Monitor.Pulse( workLock );
}
}
public void Shutdown() {
Interlocked.Exchange( ref stop, 1 );
}
private Queue workQueue;
private Object workLock;
private Thread[] threads;
private int stop;
}
public class EntryPoint
{
static void WorkFunction() {
Console.WriteLine( "WorkFunction() called on Thread {0}",Thread.CurrentThread.GetHashCode() );
//some long job
double s = 0;
for (int i = 0; i < 100000000; i++)
s += Math.Sin(i);
}
static void Main() {
CrudeThreadPool pool = new CrudeThreadPool();
for( int i = 0; i < 10; ++i ) {
pool.SubmitWorkItem(
new CrudeThreadPool.WorkDelegate(
EntryPoint.WorkFunction) );
}
pool.Shutdown();
}
}
I am doing an activity monitor based on date which is similar to stackoverflow Today,YesterDay,this week,Last week,this month,last Month..... Based on current date how to get start-date and end-date for all these Today,YesterDay,this week,Last week,this month,last Month in c#?
hello
I am working on writing an web application which will be monitoring an java process which moves files from one location to another. The monitoring application needs to do following things
Monitor log files
View the content of moved files
Is there any opensource framework which provides monitoring capabilities over logging.
I am building this application in java.
Thanks
Hi,
I want to develop a function in PHP that checks how dangerous a SQL statement is. When i say dangerous i mean, certain symbols, characters or strings that are used to get data from a database that the user shouldnt see.
For example:
SELECT * FROM users WHERE userId = '1'
can be injected in several ways. Although i clean the params, i also want to monitor how safe the query is to run.
Thanks in advance
i want to write a function that prints multi-dimensional objects which are text (or integers, etc.) into <span></span> tags and arrays into unordered lists.
how do you make the function work recursively so that it prints everything regardless of what level it's at in the object?
thanks!
Hi
What is the easiest way to have a paragraph with one or with two vertical black lines on its left?
I have something like this so far:
\newcommand{\attention}[1]{\begin{huge}!\end{huge} #1}
But instead of a huge exclamation mark, I want a vertical line, whether the paragraph is one- or multi-line.
In VS2005 I have multi-project solution.
Two of the projects use an external set of DLLs to create a report, using
report definition data taken from an SQL Server. One of the projects
creates the report just fine, but the other project results in an Exception.
I have checked that the projects are referencing the same versions of the
all the DLLs and they appear to be identical.
What could the cause of this problem?
Can someone explain the difference between:
lock (someobject) {}
Using Mutex
Using Semaphore
Using Monitor
Using Other .Net synchronization classes
I just can't figure it out. It seems to me the first two are the same?
I'm toying around with a very simplistic sort of process-monitor. Currently, it gets a list of the running processes and attempts to kill any process that is not white-listed.
What I'm looking for is a way to prevent a process from starting that isn't on the white-list. If that's possible. My knowledge level in this area is pretty non-existent and my Google-fu only returns websites discussing Process.Start() :(
Can anyone point me in the right direction?