How can MVC website benefit from the new parallelism features in .net 4? don't websites support parallelism by default since multiple users access them at the same time? Can someone clarify this?
I created a custom widget for wordpress. But I can only use it once. I can't assign multiple instances of the widget to my sidebars.
Can anyone show me sample code on how to make my custom widgets re-useable?
Hi all,
How to search multiple values separated by commas.
ex:
table name : searchTest
id name keyword
1 trophy1 test1,test2,test3
2 trophy2 test2,test5
Points:
If i search for test2 both results trophy1 and trophy2 should be display.
If i search for trophy1 then trophy1 should be as result.
How to solve this issue.
thanks in advance
Can we call send from one thread and recv from another on the same socket?
Can we call multiple sends parallely from different threads on the same socket?
I know that a good design should avoid this, but I am not clear how these system APIs will behave. I am unable to find a good documentation also for the same.
Any pointers in the direction will be helpful.
I have a property
public ObservableCollection<string> Name
{
get
{
return _nameCache;
}
}
_nameCache is updated by multiple threads in other class methods. The updates are guarded by a lock. The question is: should I use the same lock around my return statement? Will not using a lock lead to a race condition?
Hello, I'm trying to figure out the right way to read lucene index only once whilst running the application multiple times, how can I do that in java?
Because indexed data will not change so reading them each time would not be necessary. Can someone explain me the logic of it reading them only once? thank you
Hi,
I'm trying to a create an update statement along the following lines:
TABLE car: id | owner_id | type | status
An owner can have multiple cars.
UPDATE car c
SET c.type = 1
WHERE c.owner_id IN ($ids)
AND c.status = [1 IF IT EXISTS, ELSE 0]
$ids is reasonably small (under 50 values).
It seems simple but I can't seem to get my head around it because I can't use a SELECT subquery with an UPDATE to the same table.
Anyone?
Thanks
I am working on a testing project using mutating technique. My project requires to manipulate a Java classfile and re-execute the classfile multiple times for testing. My implementation need to re-execute the whole system again after one manipulation, and that is not efficient. I am wondering whether I can save the JVM state right before executing a desired instruction in the classfile, so that I can start from that state after each manipulation.
Thank you.
I have multiple ToolStrips with buttons on my form. I'd like to move some buttons from one ToolStrip to another. However, the Visual Studio IDE is not allowing me to drag the buttons off of a ToolStrip. I could go and edit the designer file for the form, but I try to avoid that as much as possible. So is there some way to do this through the IDE?
I have following multi threaded environment scenario - Requests are coming to a method and I want to avoid the duplicate processing of concurrent requests coming. As multiple similar requests might be waiting for being processed in blocked state. I used hashtable to keep track of processed request, but it will create memory leaks, so how should keep track of processed request and avoid the same requests to be processed which may be in blocking state.
I was wondering if its possible to have some kind of SQL error reporting that sends me an email that includes the error and the website that it's been found on.
I'd like to take this precaution because of hosting multiple drupal systems.
There is a PHP error variant:
http://drupal.org/project/php_errors
Hope you guys know a way to become aware of any possible SQL errors by not loggin in to check the error report.
public static void main(String[] args) {
int x = 1 + + + + + + + + + 2;
System.out.println(x);
}
I can compile above method. Is there any explanation about the allowed multiple "+" operator?
I have a query which returns multiple columns from the database using LINQ
var donors = from d2 in db.Donors
where d2.Status == "Pending"
select new { donorID = d2.donorID, bloodGroup = d2.bloodGroup, contactNo = d2.contactMobile, status = d2.Status };
now I want to display the results in different Labels accessing one column value from donors resultset.
ex:
Label1.Text = donorID;
Label2.Text = bloodGroup; ...and so on
please help me achieve this.
I have multiple active branches that I need to work on at the same time. Clearly I can create two working directories with a distinct branch per directory. Is that the only way to do it without having to "commit" and "checkout" in order to switch from one branch to another?
I've been playing around with the structure of my project, and I'd like to reset the namespaces of my classes to what the default would be. That is, the default namespace for the project, plus each of the folders in the hierarchy.
It's not as simple as just find + replace, since I've both added and renamed some folders, and files from some namespaces were split into multiple other namespaces. I'm using VS 2010.
I need to establish and send/read over/from an https connection (to a website of course) but through an http proxy or SOCKS proxy. A few other requirements
supports blocking (I can't use non-blocking/nio)
isn't set as an environment or some other global scope property (there are multiple threads accessing)
I was looking into HttpCore components but I did not see any support for blocking https.
hi
How can I have a combobox with multiple fields of its data source as its display member without adding additional columns to its data source?
I mean I wanna to have a combobox with displaymember like "ID" + "-" "Name" .
1 - Black
2 - White
3 - Red
I DO NOT want to add additional column to its data source.
Thank you
Does anybody have tips for working with projects with very, very long compile times? The longest I have had to deal with is 20 minutes to compile and 5 to deploy. If anybody can suggest "coping mechanisms" for such an environment (e.g.: multiple workstations) I would be interested to hear.
Hi There,
I am struggling alot with some PHP I am needing to implement a next and previous link, basically I have a search function on my site, that returns multiple results and click on a result navigates to that results page, I want to then be able to click next on that page, and be taken to the next result in the sequence that was returned by the users original search? Is this possible, and how? I have no clue.
I am attempting to write a regular expression to process a string of key value(s) pairs formatted like so
KEY/VALUE KEY/VALUE VALUE KEY/VALUE
A key can have multiple values separated by a space.
I want to match a keys values together, so the result on the above string would be
VALUE
VALUE VALUE
VALUE
I currently have the following as my regex
[A-Z0-9]+/([A-Z0-9 ]+)(?:(?!^[A-Z0-9]+/))
but this returns
VALUE KEY
as the first result.
I need to encode streams of 8 byte such that encoded stream has only digits (zero to nine) in them. Are their any standard encoding mechanism for doing this? If there are multiple ways to do it, which one is efficient in terms of length of encoded string (shorter is better)?
I am building an iphone app and would like to keep track of how many times it has been opened so that I can prompt the user to do certain actions after it has been opened X number of times. I have thought about storing a variable in Core Data which I update every time it is opened, but this seems like a waste since it is a singleton data, not multiple instances of an object. What is the best way to store data like this and access it without slowing down the app opening time?
hello.
Is there significant cpu/memory overhead associated with using automatic arrays with g++/Intel on 64-bit x86 linux platform?
int function(int N) {
double array[N];
overhead compared to allocating array before hand (assuming function is called multiple times)
overhead compared to using new
overhead compared to using malloc
range of N maybe from 1kb to 16kb roughly, stack overrun is not a problem
Thank you
My Activity has multiple lists so I have defined MyClickListener as below:
My question is how I should instantiate this class:
MyClickListener mMyClickListener = new MyClickListener();
Or maybe it is better to instantiate inside the onCreate(Bundle) and just define above. Whats considered the better way? I don't want too much in onCreate() its already full of stuff. Any thoughts on the declaration and instatiation? Whats the best way?
private class MyClickListener implements OnClickListener
{
@Override
public void onClick(View view) {
}
}