I already know about Control-L to delete an entire line...is there one to just select an entire line (which I can then copy and paste somewhere else...)
This is refined version of my previous question. Actually I want to do following operation...
summation for all k|(i,j)?wk [(Ii-µk)*(Ij-µk)], where wk is a 3X3 window, µk is the mean of wk, Ii & Ij are the intensities of the image at i and j.
I dont know how to select Ii & Ij separately from an image which is 2 dimensional[Iij]...or does the equation mean anything else?
Hi all,
I would like to know if there's a way to set file permissions on my apache server so that the files can be served up by apache, but cannot be read or accessed by select users. Basically, I'm trying to figure out whether it's possible to "black-box" parts of my project's PHP code base from hired consultants.
Thanks in advance for the help.
Regards
Is it possible to select multiple parts of text within a WPF textbox? For instance, for a textbox that contains the string THIS IS A TEST, I want to be able to highlight THIS, then hold Ctrl and highlight TEST without unselecting THIS.
For a visual clue about what I'm aiming at, see this article about the feature in Firefox.
When I try to select the following "File Open Web Site" or use the shortcut key "Shift + Alt + O" (which does the same), Visual Studio 2008 hangs with the loading mouse icon for about 8-10 seconds then the file.
But if I do "File Open Project/Solution.." or "File Open File..." the explorer window comes up in under a second, instantly most times.
Computer Specs:
Windows 7 x64
Visual Studio 2008 Pro Edition with Service Pack 1
Intel Core2 Due e6420 @ 3.2GHz
4GB DDR2
I have a table that describes a variety of objects in my system (ie. umbrella, boots, satchel, whatever). Each one of these objects needs to have a distinct prevalence or incidence. For example, the umbrella is rarer than the boots. Based on those factors, I need to randomly select a single object (including a blank or 'no object found') based on that incidence value.
Yikes. Make sense?
I want to get a part of picture in a PictureBox by allowing the user to select
a rectangular region (similar to how it can be done in Photoshop with selection tool).
How I can do this?
I am currently highlighting a row in a radgrid using OnMouseOver. I would like to know if it is possible to use OnMouseOver to select the row rather than highlight it.
Alternatively, I would like the highlighted row to remain highlighted if the radgrid loses focus, such as when a confirmation box pops up.
Thanks in advance.
Hi guys,
I need a textfield which has an dropdown list to select an option from that.Is there any possible chances to do that in Iphone sdk?
Guys I need a quick help from ur side.
Anyone's help will be much appreciated.
Thank you,
Monish.
Hi,
In a WPF app, in MVP app
I have a combo box,for which I display the data fetched from Database. Before the items added to the Combo box, I want to display the default text such as " -- Select Team --" , so that on pageload it displays and on selecting it the text should be cleared and the items should be displayed.
Selecting data from DB is happening. I need to display the default text until the user selects an item from combo box.
Please guide me
Thanks
Ramm
Searching around the Microsoft.M assembly I found the SourceParser class and whole set of classes in the Microsoft.TSQL10 namespace that seem related to parsing SQL but I cannot find examples of how to use it.
I know the you can generate T-SQL easily enough, but can you consume it, manipulate the data structure and re-output a modified version of the SQL select?
I can't do this in MySQL
UPDATE tableA, tableB
SET tableA.column1 = SUM(tableB.column2)
WHERE tableA.column3 = tableB.column4
GROUP BY tableB.column4
;
Neither can I
UPDATE tableA,
(
SELECT SUM(tableB.column2) sumB, tableB.column4
FROM tableB
GROUP BY tableB.column4
) t1
SET tableA.column1 = sumB
WHERE tableA.column3 = column4
;
Besides it being illegal code, I think you can understand what I tried to do with the queries above. Both of them had the same intent.
How can I do that in MySQL?
I'm looking for help with my query below. which is never returning anything for veggie... Is the way I have my WHERE statement written valid?
SELECT *
FROM newsfeed INNER JOIN newsfeedaction ON newsfeed.newsfeedactionid = newsfeedaction.newsFeedActionID
INNER JOIN person ON newsfeed.personID = person.personID
LEFT OUTER JOIN food ON newsfeed.foodID = food.foodID
LEFT OUTER JOIN veggie ON newsfeed.veggieID = veggie.veggieID
WHERE
(
newsfeed.veggieID IS NOT NULL
AND veggie.deleted = 'N'
)
OR
(
newsfeed.foodID IS NOT NULL
AND food.deleted = 'N')
Contact Title has a default value which is Sales Person. Anyhow, when a user
click Edit on the chosen ListView record, i need Contact Title to have
the right value that corresponds to the chosen record. For example,
if user clicks edit, the fields on the left side will be filled with
values. In this case, i want Contact Title to view the right value.
How can i do it?
I hope my question is clear enough.
Ok, math isn't my strong side, I admit it.
All I want to do is to select the first, 5th, 9th, 13th, 17th etc row in a html-table. Can anybody with better math-skills point me in the right directionor perhaps supply a "nth-child-for-dummies" guide?
I tried nth-child(1n+4) (which selects the 4th row and everyone after), and i also tried nth-child(0n+4) which selects the fourth row and nothing after that.
Thanks in advance.
IQueryable items = from rr in _dt.AllItems
where rr.ID == ItemID
select new{rr.Item, rr.SecondItem};
SecondItem is returning false or true. Is it possible to replace with different string values (for example with On and Off) and add to the items (IQueryable)?
-edit- I LOVE SLaks comment. "The amount of misinformation in these answers is staggering." :D
Calm down guys. Pretty much all of you were wrong. I DID make optimizations.
It turns out whatever optimizations I made wasn't good enough.
I ran the code in GCC using gettimeofday (I'll paste code below) and used g++ -O2 file.cpp and got slightly faster results then C#.
Maybe MS didn't create the optimizations needed in this specific case but after downloading and installing mingw I was tested and found the speed to be near identical.
Justicle Seems to be right. I could have sworn I use clock on my PC and used that to count and found it was slower but problem solved. C++ speed isn't almost twice as slower in the MS compiler.
When my friend informed me of this I couldn't believe it. So I took his code and put some timers onto it.
Instead of Boo I used C#. I constantly got faster results in C#. Why? The .NET version was nearly half the time no matter what number I used.
C++ version:
#include <iostream>
#include <stdio.h>
#include <intrin.h>
#include <windows.h>
using namespace std;
int fib(int n)
{
if (n < 2) return n;
return fib(n - 1) + fib(n - 2);
}
int main()
{
__int64 time = 0xFFFFFFFF;
while (1)
{
int n;
//cin >> n;
n = 41;
if (n < 0) break;
__int64 start = __rdtsc();
int res = fib(n);
__int64 end = __rdtsc();
cout << res << endl;
cout << (float)(end-start)/1000000<<endl;
break;
}
return 0;
}
C# version:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using System.ComponentModel;
using System.Threading;
using System.IO;
using System.Diagnostics;
namespace fibCSTest
{
class Program
{
static int fib(int n)
{
if (n < 2)return n;
return fib(n - 1) + fib(n - 2);
}
static void Main(string[] args)
{
//var sw = new Stopwatch();
//var timer = new PAB.HiPerfTimer();
var timer = new Stopwatch();
while (true)
{
int n;
//cin >> n;
n = 41;
if (n < 0) break;
timer.Start();
int res = fib(n);
timer.Stop();
Console.WriteLine(res);
Console.WriteLine(timer.ElapsedMilliseconds);
break;
}
}
}
}
GCC version:
#include <iostream>
#include <stdio.h>
#include <sys/time.h>
using namespace std;
int fib(int n)
{
if (n < 2) return n;
return fib(n - 1) + fib(n - 2);
}
int main()
{
timeval start, end;
while (1)
{
int n;
//cin >> n;
n = 41;
if (n < 0) break;
gettimeofday(&start, 0);
int res = fib(n);
gettimeofday(&end, 0);
int sec = end.tv_sec - start.tv_sec;
int usec = end.tv_usec - start.tv_usec;
cout << res << endl;
cout << sec << " " << usec <<endl;
break;
}
return 0;
}
When the "Select All" check box is used, it also sends that check box and it's value to the server. How do I remove or omit it from the node list before sending it to the server using jQuery?
Thank You.
When I select a cell in section 0 of my tableview I always get taken to section 1 first ?
I think its somthing to do with my 'if' statments
code : http://pastie.org/868523
Thanks in advance.
When I click a cell in a WPF datagrid, the whole row is selected, and when I press Ctrl + C to copy the content, the whole row i copied...
How do I select and copy the content of a single cell?
Hello,
I'm using the CKEditor 3.1, and find that whereever there is a box on the page, the ckeditor causes a new empty select box to appear next to it (although it has not been applied to that specific element.)
This seems to be a known issue : http://dev.fckeditor.net/ticket/4528
Has anyone been able to get around that?
Is there any other good fckeditors you can suggest?
Thanks!
<div id="id" class="div-style"><img id="1" class="img-style"></div>
I would like to use the id attribute as a way for jQuery to select the element, and the class attribute for CSS to style it.
My guess for jQuery selector ran thusly:
$("#id .div-class")
and
$("#id .img-class")
This returns the error "Selector expected"
I've got this SQL query:
SELECT Foo, Bar, SUM(Values) AS Sum
FROM SomeTable
GROUP BY Foo, Bar
ORDER BY Foo DESC, Sum DESC
This results in an output similar to this:
47 1 100
47 0 10
47 2 10
46 0 100
46 1 10
46 2 10
44 0 2
I'd like to have only the first row per Foo and ignore the rest.
47 1 100
46 0 100
44 0 2
How do I do that?