question_id
int64
4
6.31M
answer_id
int64
7
6.31M
title
stringlengths
9
150
question_body
stringlengths
0
28.8k
answer_body
stringlengths
60
27.2k
question_text
stringlengths
40
28.9k
combined_text
stringlengths
124
39.6k
tags
listlengths
1
6
question_score
int64
0
26.3k
answer_score
int64
0
28.8k
view_count
int64
15
14M
answer_count
int64
0
182
favorite_count
int64
0
32
question_creation_date
stringdate
2008-07-31 21:42:52
2011-06-10 18:12:18
answer_creation_date
stringdate
2008-07-31 22:17:57
2011-06-10 18:14:17
6,250,082
6,250,141
How to install a font without logging off or rebooting a PC?
Is there a way or an API to install a font on the PC for every user, without logging off or restarting the PC?
See the MSDN document, Font Installation and Deletion, for full details. In summary: Copy the font file to the fonts directory ( %windir%\fonts ). Call AddFontResource() to ensure the font is immediately available. Broadcast the WM_FONTCHANGE message. Thanks to @Alex K for cleaning this up and adding the fine detail.
How to install a font without logging off or rebooting a PC? Is there a way or an API to install a font on the PC for every user, without logging off or restarting the PC?
TITLE: How to install a font without logging off or rebooting a PC? QUESTION: Is there a way or an API to install a font on the PC for every user, without logging off or restarting the PC? ANSWER: See the MSDN document, Font Installation and Deletion, for full details. In summary: Copy the font file to the fonts dire...
[ "c", "windows", "fonts" ]
4
8
6,636
1
0
2011-06-06T09:33:48.423000
2011-06-06T09:38:52.447000
6,250,097
6,264,695
seam-gen vs eclipse seam web project
I'm trying to learn how to develop a j2ee web application but is currently figuring out what's the advantage of using seam-gen vs eclipse seam web project or vice versa. Why would I use one over the other? Thanks, czetsuya
Command line seam-gen stuffs the whole application into a single project and included some files that we didn't need (6 versions of the messages file, for example, each in a differnet language). The eclipse jboss tools seam-gen produces a bit more modular, streamlined app. It generates 3 separate projects (4 if you wan...
seam-gen vs eclipse seam web project I'm trying to learn how to develop a j2ee web application but is currently figuring out what's the advantage of using seam-gen vs eclipse seam web project or vice versa. Why would I use one over the other? Thanks, czetsuya
TITLE: seam-gen vs eclipse seam web project QUESTION: I'm trying to learn how to develop a j2ee web application but is currently figuring out what's the advantage of using seam-gen vs eclipse seam web project or vice versa. Why would I use one over the other? Thanks, czetsuya ANSWER: Command line seam-gen stuffs the ...
[ "eclipse", "jakarta-ee", "seam" ]
0
3
756
1
0
2011-06-06T09:35:15.167000
2011-06-07T11:46:22.627000
6,250,109
6,251,796
Mini Wiki In Website Design?
I am designing a website, and am going to be implementing a sort of say "Wiki". I am not doing a script, none of that, it's going to be pure XHTML and CSS. What I want to know from the StackOverflow community, is how I should approach this scenario. I want to be able to pull out an external stylesheet, in which is ligh...
No, this isn't possible. A stylesheet can only be applied to an entire document. You can limit a rule-set to a section of the document by using a descendant combinator.
Mini Wiki In Website Design? I am designing a website, and am going to be implementing a sort of say "Wiki". I am not doing a script, none of that, it's going to be pure XHTML and CSS. What I want to know from the StackOverflow community, is how I should approach this scenario. I want to be able to pull out an external...
TITLE: Mini Wiki In Website Design? QUESTION: I am designing a website, and am going to be implementing a sort of say "Wiki". I am not doing a script, none of that, it's going to be pure XHTML and CSS. What I want to know from the StackOverflow community, is how I should approach this scenario. I want to be able to pu...
[ "css", "xhtml", "html" ]
0
3
96
1
0
2011-06-06T09:36:10.253000
2011-06-06T12:11:12.933000
6,250,114
6,250,152
Java "Bit Shifting" Tutorial?
I would be thankful for a good tutorial, that explain for java newbies how in java all the "bit shifting" work. I always stumble across it, but never understood how it works. It should explain all the operations and concepts that are possible with byteshifting/bitmanipulation in java. This is just an example what I mea...
Well, the official Java tutorial Bitwise and Bit Shift Operators covers the actual operations that are available in Java, and how to invoke them. If you're wondering "what can I do with bit-shifting", then that's not Java specific, and since it's a low-level technique I'm not aware of any list of "cool things you can" ...
Java "Bit Shifting" Tutorial? I would be thankful for a good tutorial, that explain for java newbies how in java all the "bit shifting" work. I always stumble across it, but never understood how it works. It should explain all the operations and concepts that are possible with byteshifting/bitmanipulation in java. This...
TITLE: Java "Bit Shifting" Tutorial? QUESTION: I would be thankful for a good tutorial, that explain for java newbies how in java all the "bit shifting" work. I always stumble across it, but never understood how it works. It should explain all the operations and concepts that are possible with byteshifting/bitmanipula...
[ "java", "bit-manipulation", "bit-shift" ]
45
33
87,541
8
0
2011-06-06T09:36:30.153000
2011-06-06T09:39:45.333000
6,250,117
6,250,253
How to create shaded divs like this with CSS
I need to create shaded divs like those shown in the image below, using only CSS. Any idea about how to create them using less coding? Thank you!
Here's a method using CSS's box-shadow, which is compatible in Firefox 3.5+, Safari 3+, Chrome, Opera 10.5+ and IE9+. http://jsbin.com/usabe4 Multiple box-shadow s are being used to get closer to the desired effect than a single box-shadow is capable of: #box1 { background: yellow; -moz-box-shadow: 1px 1px 0 orange, 2p...
How to create shaded divs like this with CSS I need to create shaded divs like those shown in the image below, using only CSS. Any idea about how to create them using less coding? Thank you!
TITLE: How to create shaded divs like this with CSS QUESTION: I need to create shaded divs like those shown in the image below, using only CSS. Any idea about how to create them using less coding? Thank you! ANSWER: Here's a method using CSS's box-shadow, which is compatible in Firefox 3.5+, Safari 3+, Chrome, Opera ...
[ "html", "css" ]
3
7
5,748
5
0
2011-06-06T09:36:31.417000
2011-06-06T09:49:15.927000
6,250,119
6,250,172
Favorites in a Windows Phone Panorama application
I have a Panorama Application, where one of the panorama items is 'Favorites'. I used a standard Windows Phone project with ItemViewModel and MainViewModel to get started. I replaced the lineone/two/three with a simple string 'Favorite'. I actually load the favorites data from isolated storage in the LoadData() functio...
If your todo list is an ObservableCollection that sends out NotifyPropertyChanged event when it is changed, then you don't need to worry about reloading the list your self, databinding takes care of this itself. For the discoverability, press and hold is quite common i think. The press and hold component (context menu)...
Favorites in a Windows Phone Panorama application I have a Panorama Application, where one of the panorama items is 'Favorites'. I used a standard Windows Phone project with ItemViewModel and MainViewModel to get started. I replaced the lineone/two/three with a simple string 'Favorite'. I actually load the favorites da...
TITLE: Favorites in a Windows Phone Panorama application QUESTION: I have a Panorama Application, where one of the panorama items is 'Favorites'. I used a standard Windows Phone project with ItemViewModel and MainViewModel to get started. I replaced the lineone/two/three with a simple string 'Favorite'. I actually loa...
[ "windows-phone-7", "mvvm", "favorites" ]
0
1
353
1
0
2011-06-06T09:36:35.993000
2011-06-06T09:41:35.613000
6,250,126
6,250,188
catching SIGINT in a multithreaded program
I am writing a multithreaded program where I want to handle a possible Ctrl-C command from the user to terminate execution. As far as I know there is no guarantee that the main thread, which is able to cancel every working thread, will catch the signal. Is it, therefore, necessary to have a different signal handler to ...
You can block signals from the calling thread with pthread_sigmask(). And, as the blocked signals are inherited to newly created threads, you can block SIGINT in the main thread, then launch your other threads, and then unblock it in the main thread, if that is preferable.
catching SIGINT in a multithreaded program I am writing a multithreaded program where I want to handle a possible Ctrl-C command from the user to terminate execution. As far as I know there is no guarantee that the main thread, which is able to cancel every working thread, will catch the signal. Is it, therefore, neces...
TITLE: catching SIGINT in a multithreaded program QUESTION: I am writing a multithreaded program where I want to handle a possible Ctrl-C command from the user to terminate execution. As far as I know there is no guarantee that the main thread, which is able to cancel every working thread, will catch the signal. Is it...
[ "c", "pthreads", "signals", "sigint" ]
8
9
4,586
1
0
2011-06-06T09:36:58.643000
2011-06-06T09:42:54.117000
6,250,133
6,251,944
Populating grid and form with same json?
Is it possible to populate grid with some of the JSON data and a form with other, from the same JSON? Two stores or two models or both? simple example...;-)
Yes, the best way to do this would be to manipulate the reader, which as well as returning records, also stores whatever the raw json sent from the server is. The easiest solution would be to specify the reader parameters for your grid, but then have a listener on the store, which then processed the rawData property fr...
Populating grid and form with same json? Is it possible to populate grid with some of the JSON data and a form with other, from the same JSON? Two stores or two models or both? simple example...;-)
TITLE: Populating grid and form with same json? QUESTION: Is it possible to populate grid with some of the JSON data and a form with other, from the same JSON? Two stores or two models or both? simple example...;-) ANSWER: Yes, the best way to do this would be to manipulate the reader, which as well as returning reco...
[ "json", "forms", "extjs", "extjs4" ]
1
1
527
1
0
2011-06-06T09:37:26.910000
2011-06-06T12:24:59.857000
6,250,135
6,250,169
how to select list-items having index value within a certain range?
I want to assign a class to the list-items of an ul li list having.index() value between 10 to 20. How do I select those elements using jQuery? One Two Three............ li>Thirty So I want something like $('#id').click(function(){ //Assign class 'classname' to those li elements //between 10th and 20th (index numbers) ...
Use slice to get a subset of the elements in a selection: $('li').slice(10, 20).addClass('classname');
how to select list-items having index value within a certain range? I want to assign a class to the list-items of an ul li list having.index() value between 10 to 20. How do I select those elements using jQuery? One Two Three............ li>Thirty So I want something like $('#id').click(function(){ //Assign class 'clas...
TITLE: how to select list-items having index value within a certain range? QUESTION: I want to assign a class to the list-items of an ul li list having.index() value between 10 to 20. How do I select those elements using jQuery? One Two Three............ li>Thirty So I want something like $('#id').click(function(){ //...
[ "jquery" ]
1
4
910
3
0
2011-06-06T09:37:47.283000
2011-06-06T09:41:21.933000
6,250,138
6,251,145
nginx + passenger + rails 3.1 = 502 bad gateway?
I have the latest Nginx running with Passenger, SQLite and Rails 3.1. Somehow, when I have Passenger running for a while, I start getting "502 bad gateway" errors when visiting my website. Here is a snippet from my Nginx error log: 2011/06/27 08:55:33 [error] 20331#0: *11270 upstream prematurely closed connection while...
The "V" in VM is for Virtual. See also answers on other SO questions, e.g. Virtual Memory Usage from Java under Linux, too much memory used. That top 147 MB does not hint of anything unusual whatsoever. Your 502 errors mean something else is wrong with the worker processes from Passenger's point of view. You should che...
nginx + passenger + rails 3.1 = 502 bad gateway? I have the latest Nginx running with Passenger, SQLite and Rails 3.1. Somehow, when I have Passenger running for a while, I start getting "502 bad gateway" errors when visiting my website. Here is a snippet from my Nginx error log: 2011/06/27 08:55:33 [error] 20331#0: *1...
TITLE: nginx + passenger + rails 3.1 = 502 bad gateway? QUESTION: I have the latest Nginx running with Passenger, SQLite and Rails 3.1. Somehow, when I have Passenger running for a while, I start getting "502 bad gateway" errors when visiting my website. Here is a snippet from my Nginx error log: 2011/06/27 08:55:33 [...
[ "ruby-on-rails", "ubuntu", "nginx", "passenger" ]
3
2
11,259
5
0
2011-06-06T09:38:35.180000
2011-06-06T11:11:16.760000
6,250,147
6,250,312
test without breakpoints
I have coded in c++ in visual studio for several years. I am now working in java with eclipse. the java programs are launched from a.bat file so I cannot breakpoint them to debug. Without being able to step through my code i am finding it very hard to find the root cause of the error as the thrown exception is not usua...
You can find the main method, as suggested by Ben J, and run this from Eclipse. To pass arguments to it, edit the run configuration. e.g. Right-click on the main class, click "Run As" and then "Run Configurations...". Select the "Arguments" tab and enter whatever you need. Or since you need to debug this, click "Debug ...
test without breakpoints I have coded in c++ in visual studio for several years. I am now working in java with eclipse. the java programs are launched from a.bat file so I cannot breakpoint them to debug. Without being able to step through my code i am finding it very hard to find the root cause of the error as the thr...
TITLE: test without breakpoints QUESTION: I have coded in c++ in visual studio for several years. I am now working in java with eclipse. the java programs are launched from a.bat file so I cannot breakpoint them to debug. Without being able to step through my code i am finding it very hard to find the root cause of th...
[ "java", "eclipse", "debugging", "breakpoints" ]
0
3
162
2
0
2011-06-06T09:39:25.207000
2011-06-06T09:54:34.273000
6,250,148
6,250,544
jQuery slideToggle menu that will collapse if
anything except the link and the body of the exposed div are clicked after the event is fired and only after the event is fired $(function() { $('#engageNetwork').bind('click', function() { $('.topNavSlide').stop(true,true).slideToggle(1000, 'easeOutExpo'); $('a').click(function() { $('.topNavSlide').stop(true,true).sl...
You can use the:not selector in order to bind the rest of the document click handler that will collapse the menu. The selector and the binding is something like: $(":not(#engageNetwork, #engageNetwork *)").bind("click", function(){ $('.topNavSlide').stop(true,true).slideUp(1000, 'easeOutExpo'); }); (the second referenc...
jQuery slideToggle menu that will collapse if anything except the link and the body of the exposed div are clicked after the event is fired and only after the event is fired $(function() { $('#engageNetwork').bind('click', function() { $('.topNavSlide').stop(true,true).slideToggle(1000, 'easeOutExpo'); $('a').click(fun...
TITLE: jQuery slideToggle menu that will collapse if QUESTION: anything except the link and the body of the exposed div are clicked after the event is fired and only after the event is fired $(function() { $('#engageNetwork').bind('click', function() { $('.topNavSlide').stop(true,true).slideToggle(1000, 'easeOutExpo')...
[ "jquery", "menu", "toggle" ]
0
1
711
1
0
2011-06-06T09:39:25.460000
2011-06-06T10:13:03.230000
6,250,150
6,250,199
Checkbox label should not be clickable
I am using checkbox in android and the state of checkbox is changing once i click on the text of the checkbox. "[CB] Text ". Is there any way to change this behaviour so that the state of checkbox will be changed once i click on the box and not the text. Sorry this question would have already asked in the forum. But i ...
Other than creating your own control, the easiest way would probably be to not display any text with the checkbox and in your layout use a textview for the text instead so you would have [CB][TextView]
Checkbox label should not be clickable I am using checkbox in android and the state of checkbox is changing once i click on the text of the checkbox. "[CB] Text ". Is there any way to change this behaviour so that the state of checkbox will be changed once i click on the box and not the text. Sorry this question would ...
TITLE: Checkbox label should not be clickable QUESTION: I am using checkbox in android and the state of checkbox is changing once i click on the text of the checkbox. "[CB] Text ". Is there any way to change this behaviour so that the state of checkbox will be changed once i click on the box and not the text. Sorry th...
[ "android", "checkbox", "android-widget" ]
2
4
4,735
3
0
2011-06-06T09:39:34.537000
2011-06-06T09:44:15.317000
6,250,155
6,250,283
UINavigation Controller and UITabbarController connumdrum
I have searched and searched but as yet still cannot figure this ole problem out!:-( I have in my main.xib a TabBarController that is setup with five viewControllers. I am trying to get the first viewcontroller to be a nav controller so that if the first tab is selected I can push and pop views into view. But for the l...
For that, you have to add View Controllers in TabBar programatically. Like below: oFirstViewController.title = @"First View"; oFirstViewController.tabBarItem.image = [UIImage imageNamed:@"ico.png"]; UINavigationController *myNavigationController1 = [[UINavigationController alloc] initWithRootViewController:oFirstViewCo...
UINavigation Controller and UITabbarController connumdrum I have searched and searched but as yet still cannot figure this ole problem out!:-( I have in my main.xib a TabBarController that is setup with five viewControllers. I am trying to get the first viewcontroller to be a nav controller so that if the first tab is ...
TITLE: UINavigation Controller and UITabbarController connumdrum QUESTION: I have searched and searched but as yet still cannot figure this ole problem out!:-( I have in my main.xib a TabBarController that is setup with five viewControllers. I am trying to get the first viewcontroller to be a nav controller so that if...
[ "iphone", "uinavigationcontroller", "uitabbarcontroller", "uitabbaritem" ]
0
1
379
4
0
2011-06-06T09:40:08.333000
2011-06-06T09:52:08.373000
6,250,159
6,250,384
How to disable .less (dotLess CSS) syntax analysis in ReSharper 6?
ReSharper 6 considers.less files as.CSS, although they aren't. So instead of proper syntax highlighting, it underlines nearly everything with red (syntax error). How can I disable this "feature"?
Just found a nice trick: // /* Disabling ReSharper;) //.less code goes here // */ It's better than disabling ReSharper for a particular set of files (ReSharper -> Options -> Settings -> Edit items to skip...), since in this case each member of your team doesn't need to repeat this.
How to disable .less (dotLess CSS) syntax analysis in ReSharper 6? ReSharper 6 considers.less files as.CSS, although they aren't. So instead of proper syntax highlighting, it underlines nearly everything with red (syntax error). How can I disable this "feature"?
TITLE: How to disable .less (dotLess CSS) syntax analysis in ReSharper 6? QUESTION: ReSharper 6 considers.less files as.CSS, although they aren't. So instead of proper syntax highlighting, it underlines nearly everything with red (syntax error). How can I disable this "feature"? ANSWER: Just found a nice trick: // /*...
[ "css", "visual-studio-2010", "resharper", "less", "dotless" ]
2
5
1,709
2
0
2011-06-06T09:40:29.937000
2011-06-06T10:00:11.450000
6,250,160
6,250,186
How do I queue database access?
I have a GUI where different parts of the information shown is extracted from a database. In order for the GUI not to freeze up I've tried putting the database queries in BackgroundWorkers. Because these access the database asynchronously I get an exception telling me the database connection is already open and used by...
What is the DB engine you're using? Most modern databases are optimized for concurrent operations, so there's no need to queue anything. The thing you're appaently doing wrong is reusing the same IDbConnection instance across different threads. Thats a no-no: each thread has to have its own instance.
How do I queue database access? I have a GUI where different parts of the information shown is extracted from a database. In order for the GUI not to freeze up I've tried putting the database queries in BackgroundWorkers. Because these access the database asynchronously I get an exception telling me the database connec...
TITLE: How do I queue database access? QUESTION: I have a GUI where different parts of the information shown is extracted from a database. In order for the GUI not to freeze up I've tried putting the database queries in BackgroundWorkers. Because these access the database asynchronously I get an exception telling me t...
[ "c#", "database", "backgroundworker" ]
1
4
677
3
0
2011-06-06T09:40:30.500000
2011-06-06T09:42:42.230000
6,250,176
6,250,634
Use ALTER LOGIN to change User's own Password
I have a stored procedure that runs the following: 'ALTER LOGIN ' + @Login + ' WITH PASSWORD = ''' + @Password + '''' I get the following error message: Cannot alter the login 'aUser', because it does not exist or you do not have permission. HOWEVER, if I make add the user to the SysAdmin role, then it is successful. I...
I think to perform an ordinary password change for a user, who doesn't have ALTER ANY LOGIN, you must supply the OLD_PASSWORD parameter also. This would match the example from the older sp_password stored procedure: The following example shows how to use ALTER LOGIN to change the password for the login Victoria from B3...
Use ALTER LOGIN to change User's own Password I have a stored procedure that runs the following: 'ALTER LOGIN ' + @Login + ' WITH PASSWORD = ''' + @Password + '''' I get the following error message: Cannot alter the login 'aUser', because it does not exist or you do not have permission. HOWEVER, if I make add the user ...
TITLE: Use ALTER LOGIN to change User's own Password QUESTION: I have a stored procedure that runs the following: 'ALTER LOGIN ' + @Login + ' WITH PASSWORD = ''' + @Password + '''' I get the following error message: Cannot alter the login 'aUser', because it does not exist or you do not have permission. HOWEVER, if I ...
[ "sql-server" ]
30
52
59,916
3
0
2011-06-06T09:41:48.340000
2011-06-06T10:22:31.180000
6,250,177
6,250,328
How can I get stop the button control in Windows Phone from making that ugly white flash when clicked?
So I have a few items in a list that I display on my MainPage. I have a button that looks like this: Every time I click on it, the image disappears under this bright white rectangle. I'd rather have it display another image instead. How can I achieve this? Thanks for looking
To do this you'll need to retemplate the button to use a different visual state when clicked. See also these following image button controls/alternatives: http://blogs.msdn.com/b/dohollan/archive/2011/04/22/using-images-as-buttons-on-windows-phone-7.aspx http://web.archive.org/web/20110209105722/http://www.silvergeek.n...
How can I get stop the button control in Windows Phone from making that ugly white flash when clicked? So I have a few items in a list that I display on my MainPage. I have a button that looks like this: Every time I click on it, the image disappears under this bright white rectangle. I'd rather have it display another...
TITLE: How can I get stop the button control in Windows Phone from making that ugly white flash when clicked? QUESTION: So I have a few items in a list that I display on my MainPage. I have a button that looks like this: Every time I click on it, the image disappears under this bright white rectangle. I'd rather have ...
[ "windows-phone-7", "button", "click", "imagesource" ]
2
1
1,133
3
0
2011-06-06T09:41:51.140000
2011-06-06T09:55:30.637000
6,250,178
6,251,147
needs guidance on distributing data on multiple GPUs
I'm currently developing a machine learning toolkit for GPU clusters. I tested logistic regression classifier on multiple GPUs. I'm using a Master-Worker approach, where a master CPU creates several POSIX threads and matrices are divided among GPUs. But the problem I have is how to store large matrices which can't be s...
I'm not sure how big are your matrices but you should check CUDA 4.0 that was released a couple of weeks ago. One of the main features is shared memory across multiple CUDA devices/GPUs
needs guidance on distributing data on multiple GPUs I'm currently developing a machine learning toolkit for GPU clusters. I tested logistic regression classifier on multiple GPUs. I'm using a Master-Worker approach, where a master CPU creates several POSIX threads and matrices are divided among GPUs. But the problem I...
TITLE: needs guidance on distributing data on multiple GPUs QUESTION: I'm currently developing a machine learning toolkit for GPU clusters. I tested logistic regression classifier on multiple GPUs. I'm using a Master-Worker approach, where a master CPU creates several POSIX threads and matrices are divided among GPUs....
[ "cuda", "machine-learning", "gpu", "multi-gpu" ]
0
1
214
1
0
2011-06-06T09:41:57.887000
2011-06-06T11:11:25.780000
6,250,191
6,250,377
MyISAM alternative that is not InnoDB?
I have issues with using the MyISAM engine in my database. It is constantly corrupting and has severely varying query times. Thus I can not use it any more. I have found the InnoDB to be a good alternatve, but here is the problem: Engine Support Comment MyISAM DEFAULT Default engine as of MySQL 3.23 with great perform....
I'd say you're in trouble, since you don't have control over engines you can't do anything. However, for performing full text search on a big database could be done using Apache Lucene. As far as I know, it is faster and more scalable than any sql engine out there. It's implemented in Java, but there are many other imp...
MyISAM alternative that is not InnoDB? I have issues with using the MyISAM engine in my database. It is constantly corrupting and has severely varying query times. Thus I can not use it any more. I have found the InnoDB to be a good alternatve, but here is the problem: Engine Support Comment MyISAM DEFAULT Default engi...
TITLE: MyISAM alternative that is not InnoDB? QUESTION: I have issues with using the MyISAM engine in my database. It is constantly corrupting and has severely varying query times. Thus I can not use it any more. I have found the InnoDB to be a good alternatve, but here is the problem: Engine Support Comment MyISAM DE...
[ "mysql", "myisam" ]
0
1
1,704
2
0
2011-06-06T09:43:23.417000
2011-06-06T09:59:13.477000
6,250,193
6,250,297
GPS signal sharing between android apps
When testing my GPS tracking application, there is a problem with another GPS tracking apps: while GPS coordinates receives another application, my app does not receive them. When I turn off the tracking in another app, my application again starting to get the coordinates. How to make two or more apps simultaneously re...
An application that is registered for location updates through a locationlistener cannot be responsible for another application to not receive location updates anymore. When multiple apps are using the requestLocationUpdates feature, Android will start GPS tracking for these apps, and these apps will all receive GPS lo...
GPS signal sharing between android apps When testing my GPS tracking application, there is a problem with another GPS tracking apps: while GPS coordinates receives another application, my app does not receive them. When I turn off the tracking in another app, my application again starting to get the coordinates. How to...
TITLE: GPS signal sharing between android apps QUESTION: When testing my GPS tracking application, there is a problem with another GPS tracking apps: while GPS coordinates receives another application, my app does not receive them. When I turn off the tracking in another app, my application again starting to get the c...
[ "android", "gps" ]
2
1
763
1
0
2011-06-06T09:43:37.083000
2011-06-06T09:53:28.173000
6,250,198
6,250,263
Python socket-module: How to change the local port on the client side?
I want to get packages from a network using TCP/IP as a client. With... connect((TCP_IP, TCP_PORT))... I can change the port of the peer address. But I change the port of my local computer? EDIT: I want to use a network card with four ports. The network card is connected to a measurement device which sends a lot of dat...
Assume you have a socket named sock... use socket.bind() import socket sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) DESTINATION_ADDR = '1.1.1.1' SOURCE_PORT, DESTINATION_PORT = 31415, 80 sock.bind(('0.0.0.0', SOURCE_PORT)) sock.connect((DESTINATION_ADDR, DESTINATION_PORT)) Now I run tshark (text wireshark )...
Python socket-module: How to change the local port on the client side? I want to get packages from a network using TCP/IP as a client. With... connect((TCP_IP, TCP_PORT))... I can change the port of the peer address. But I change the port of my local computer? EDIT: I want to use a network card with four ports. The net...
TITLE: Python socket-module: How to change the local port on the client side? QUESTION: I want to get packages from a network using TCP/IP as a client. With... connect((TCP_IP, TCP_PORT))... I can change the port of the peer address. But I change the port of my local computer? EDIT: I want to use a network card with f...
[ "python", "sockets", "networking", "tcp", "port" ]
3
12
17,784
3
0
2011-06-06T09:44:13.603000
2011-06-06T09:50:22.777000
6,250,202
6,250,236
Open in a new tab
In my application, I have a map (esri), that runs on javascript. When I click a point, I do a simple identify, no need to dig into details here When the identify is successful, I open up a popup, based on the parameters of the point - no magic here. The current code looks like this if (confirm("Do you want to see my se...
Maybe it's worth to change the way it works - when user clicks on a point display a DIV popup with the link like: google I don't think that there's an easy way to imitate a click on the link.
Open in a new tab In my application, I have a map (esri), that runs on javascript. When I click a point, I do a simple identify, no need to dig into details here When the identify is successful, I open up a popup, based on the parameters of the point - no magic here. The current code looks like this if (confirm("Do you...
TITLE: Open in a new tab QUESTION: In my application, I have a map (esri), that runs on javascript. When I click a point, I do a simple identify, no need to dig into details here When the identify is successful, I open up a popup, based on the parameters of the point - no magic here. The current code looks like this i...
[ "javascript", "popup" ]
2
2
545
1
0
2011-06-06T09:44:36.177000
2011-06-06T09:47:39.483000
6,250,212
6,261,007
How can I submit an fql query using Facebook graph api with only a Facebook appId but without a user signing in?
I'm trying to use the new graph api for using FQL (the old api used https://api.facebook.com/method/fql.query?query=select%20like_count,%20comment_count,%20share_count,%20click_count%20from%20link_stat%20where%20url=%22facebook.com%22 ), but it looks like I need an access token to use the new api ( http://developers.fa...
Just call this url and parse the json response (obviously replacing the google.com with your page): http://graph.facebook.com/?id=http://google.com This url doesn't not require any kind of access token.
How can I submit an fql query using Facebook graph api with only a Facebook appId but without a user signing in? I'm trying to use the new graph api for using FQL (the old api used https://api.facebook.com/method/fql.query?query=select%20like_count,%20comment_count,%20share_count,%20click_count%20from%20link_stat%20whe...
TITLE: How can I submit an fql query using Facebook graph api with only a Facebook appId but without a user signing in? QUESTION: I'm trying to use the new graph api for using FQL (the old api used https://api.facebook.com/method/fql.query?query=select%20like_count,%20comment_count,%20share_count,%20click_count%20from...
[ "facebook", "facebook-graph-api", "facebook-fql" ]
1
2
1,576
1
0
2011-06-06T09:45:32.620000
2011-06-07T05:38:59.693000
6,250,226
6,250,269
php: get variable type hint using reflection
class Expense { /** * @var int */ private $id; } I would like to obtain the type hint of a variable in my class, using reflection, because the default value is null.
Try: getProperties() as $refProperty) { if (preg_match('/@var\s+([^\s]+)/', $refProperty->getDocComment(), $matches)) { list(, $type) = $matches; var_dump($type); } } Output: string(3) "int"
php: get variable type hint using reflection class Expense { /** * @var int */ private $id; } I would like to obtain the type hint of a variable in my class, using reflection, because the default value is null.
TITLE: php: get variable type hint using reflection QUESTION: class Expense { /** * @var int */ private $id; } I would like to obtain the type hint of a variable in my class, using reflection, because the default value is null. ANSWER: Try: getProperties() as $refProperty) { if (preg_match('/@var\s+([^\s]+)/', $refP...
[ "php", "class", "reflection", "types" ]
16
21
9,383
7
0
2011-06-06T09:46:49.810000
2011-06-06T09:51:08.003000
6,250,231
6,250,313
Handling IO exceptions in Java
Basically, I want to open a file, read some bytes, and then close the file. This is what I came up with: try { InputStream inputStream = new BufferedInputStream(new FileInputStream(file)); try { //... inputStream.read(buffer); //... } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } fin...
If you have the same exception handling code for IOException and FileNotFoundException then you can rewrite your example in a more compact way with only one catch clause: try { InputStream input = new BufferedInputStream(new FileInputStream(file)); try { //... input.read(buffer); //... } finally { input.close(); } } ca...
Handling IO exceptions in Java Basically, I want to open a file, read some bytes, and then close the file. This is what I came up with: try { InputStream inputStream = new BufferedInputStream(new FileInputStream(file)); try { //... inputStream.read(buffer); //... } catch (IOException e) { // TODO Auto-generated catch b...
TITLE: Handling IO exceptions in Java QUESTION: Basically, I want to open a file, read some bytes, and then close the file. This is what I came up with: try { InputStream inputStream = new BufferedInputStream(new FileInputStream(file)); try { //... inputStream.read(buffer); //... } catch (IOException e) { // TODO Auto...
[ "java", "exception", "io", "resource-management" ]
14
12
19,851
9
0
2011-06-06T09:46:56.380000
2011-06-06T09:54:41.233000
6,250,246
6,251,646
Fill UIPickerView with an Array Value
i am working on a project in which i have to perform following two work: 1.) Fetch value from CoreData and store it in an NSMutableArray. 2.) Take a UIPickerView and fill it with an Array value. Problem is that size of array is dynamic and i canto fill an array value in UIPickerView. can someone help me.
in order for the UIPickerView to work correctly, you must supply the amount of components (columns) and the number of rows for each component whenever it reloads: as mentioned, use [myPickerView reloadAllComponents]; to reload the view once the array is populated, but you MUST implement also these things after you decl...
Fill UIPickerView with an Array Value i am working on a project in which i have to perform following two work: 1.) Fetch value from CoreData and store it in an NSMutableArray. 2.) Take a UIPickerView and fill it with an Array value. Problem is that size of array is dynamic and i canto fill an array value in UIPickerVie...
TITLE: Fill UIPickerView with an Array Value QUESTION: i am working on a project in which i have to perform following two work: 1.) Fetch value from CoreData and store it in an NSMutableArray. 2.) Take a UIPickerView and fill it with an Array value. Problem is that size of array is dynamic and i canto fill an array va...
[ "iphone", "ipad" ]
3
10
9,342
2
0
2011-06-06T09:48:39.343000
2011-06-06T11:57:26.107000
6,250,259
6,250,339
get information of app in android
hello expert, i want to get information of all apk in mobile, like name,icon,date etc.... i refer check it but there are not satisfied solution. so can you help me?
From your activity you should call List applications = getPackageManager().getInstalledPackages(0); Then you can get the information by running though the applications list. You can check http://developer.android.com/reference/android/content/pm/PackageManager.html#getInstalledApplications(int ) for more info on the fa...
get information of app in android hello expert, i want to get information of all apk in mobile, like name,icon,date etc.... i refer check it but there are not satisfied solution. so can you help me?
TITLE: get information of app in android QUESTION: hello expert, i want to get information of all apk in mobile, like name,icon,date etc.... i refer check it but there are not satisfied solution. so can you help me? ANSWER: From your activity you should call List applications = getPackageManager().getInstalledPackage...
[ "android" ]
0
1
513
2
0
2011-06-06T09:50:08.093000
2011-06-06T09:56:22.450000
6,250,266
6,250,348
Vb.Net's with keyword in java?
Possible Duplicate: WITH statement in Java Hi all, does anyone know if there is the With Keyword in Java? Or something similar..?
There is something similar with chained calls. e.g. StringBuilder sb = new StringBuilder(); sb.append("Hello").append("World").reverse(); This is a common pattern with builder objects. However, it is not Java language feature. From the Guava MapMake example ConcurrentMap graphs = new MapMaker().concurrencyLevel(4).weak...
Vb.Net's with keyword in java? Possible Duplicate: WITH statement in Java Hi all, does anyone know if there is the With Keyword in Java? Or something similar..?
TITLE: Vb.Net's with keyword in java? QUESTION: Possible Duplicate: WITH statement in Java Hi all, does anyone know if there is the With Keyword in Java? Or something similar..? ANSWER: There is something similar with chained calls. e.g. StringBuilder sb = new StringBuilder(); sb.append("Hello").append("World").rever...
[ "c#", "java", ".net", "vb.net", "syntax" ]
1
2
638
4
0
2011-06-06T09:50:43.920000
2011-06-06T09:57:14.637000
6,250,268
6,289,207
How to maintain Selenium Grid?
I have many VMs which are used as part of Grid. Some as RC and some as Hub. Due to the large number of VMs that is being used, it is a big task to maintain the grid now. To change the RC to point to a different hub, I will have to login to that machine kill the current RC run the java command again with a different hub...
you should have a look at selenium grid2.0. It's been designed with exactly what you ask in mind. You can create your own proxy extending either the selenium1 ( RC ) or selenium2 ( webdriver protocol ), and implement a list of interfaces that will allow to react to certain events. You could for instance: have one uniqu...
How to maintain Selenium Grid? I have many VMs which are used as part of Grid. Some as RC and some as Hub. Due to the large number of VMs that is being used, it is a big task to maintain the grid now. To change the RC to point to a different hub, I will have to login to that machine kill the current RC run the java com...
TITLE: How to maintain Selenium Grid? QUESTION: I have many VMs which are used as part of Grid. Some as RC and some as Hub. Due to the large number of VMs that is being used, it is a big task to maintain the grid now. To change the RC to point to a different hub, I will have to login to that machine kill the current R...
[ "selenium", "selenium-rc", "selenium-grid" ]
1
2
1,233
2
0
2011-06-06T09:51:06.940000
2011-06-09T07:02:59.990000
6,250,279
6,250,427
Jquery getting two divs to act as one
I have the following code for my popup menu, the parent link is the top level link. It causes a popup to show. Popup fades in and fades out when the mouse enters and exits parent link. However, I need it to not fade out the popup, if the mouse is over the popup! At the moment, as soon as the mouse enters the popup it f...
You should nest the popup inside the parent. This way when you move the mouse from the parent to the popup, the parent will still be in a mouse-over state because popup's mouse-over event is bubbled onto the parent. When the mouse is out of the parent (plus its children), mouse-out event will fire on the parent. Edit I...
Jquery getting two divs to act as one I have the following code for my popup menu, the parent link is the top level link. It causes a popup to show. Popup fades in and fades out when the mouse enters and exits parent link. However, I need it to not fade out the popup, if the mouse is over the popup! At the moment, as s...
TITLE: Jquery getting two divs to act as one QUESTION: I have the following code for my popup menu, the parent link is the top level link. It causes a popup to show. Popup fades in and fades out when the mouse enters and exits parent link. However, I need it to not fade out the popup, if the mouse is over the popup! A...
[ "javascript", "jquery", "popup", "drop-down-menu" ]
1
2
301
5
0
2011-06-06T09:51:53.150000
2011-06-06T10:03:13.023000
6,250,284
6,250,371
Send JSON data to highcharts pie from asp.net MVC controller in C#
I want to send json data from my asp.net MVC controller in C# and use those datas to draw a highcharts pie chart. So for the moment I use this: Dictionary result = new Dictionary (); result.Add("test1", 45); result.Add("test2", 64); var jsonResult = Json(new { graphDivId = "divGraph", legend = "A legend", stats = resu...
I was playing with this a little this morning and I came up with what i have below-- but it won't work because you'll get [{x:"testx", y:60}....]. So that's no good. You might be able to use it though and override a ToJSON method on the SimpleClass. One other thought I had (and I'm not sure it would work) is to have a ...
Send JSON data to highcharts pie from asp.net MVC controller in C# I want to send json data from my asp.net MVC controller in C# and use those datas to draw a highcharts pie chart. So for the moment I use this: Dictionary result = new Dictionary (); result.Add("test1", 45); result.Add("test2", 64); var jsonResult = Js...
TITLE: Send JSON data to highcharts pie from asp.net MVC controller in C# QUESTION: I want to send json data from my asp.net MVC controller in C# and use those datas to draw a highcharts pie chart. So for the moment I use this: Dictionary result = new Dictionary (); result.Add("test1", 45); result.Add("test2", 64); v...
[ "c#", "asp.net-mvc", "json", "highcharts", "pie-chart" ]
6
3
9,371
4
0
2011-06-06T09:52:09.377000
2011-06-06T09:58:59.893000
6,250,289
6,251,086
Objective C HTML parser error "expected expression before xmlNode"
Was following this Simple libxml2 HTML parsing example, using Objective-c, Xcode, and HTMLparser.h and http://benreeves.co.uk/objective-c-hmtl-parser/ The author notes that there's something wrong with rawContentsOfNode method. NSArray *bodytext = [bodyNode findChildTags:@"td"]; for (HTMLNode *inputBody in bodytext) {...
The example in the StackOverflow answer won't even compile because he has just copy-pasted the note in the original example. This: rawContentsOfNode(xmlNode *bodytext, htmlDocPtr doc); is part of a function prototype not a function call. It's a C function that requires and xmlNode and a htmlDocPtr as parameters. Lookin...
Objective C HTML parser error "expected expression before xmlNode" Was following this Simple libxml2 HTML parsing example, using Objective-c, Xcode, and HTMLparser.h and http://benreeves.co.uk/objective-c-hmtl-parser/ The author notes that there's something wrong with rawContentsOfNode method. NSArray *bodytext = [body...
TITLE: Objective C HTML parser error "expected expression before xmlNode" QUESTION: Was following this Simple libxml2 HTML parsing example, using Objective-c, Xcode, and HTMLparser.h and http://benreeves.co.uk/objective-c-hmtl-parser/ The author notes that there's something wrong with rawContentsOfNode method. NSArray...
[ "objective-c", "ios", "html-parsing" ]
0
2
1,305
1
0
2011-06-06T09:52:30.870000
2011-06-06T11:05:09.260000
6,250,290
6,250,415
Silverlight converter to convert an object to a string and back
I have an Address object in my model which has 6 address lines as separate properties. In my Silverlight view I want this to be displayed in a multiline text box and to be updated using databinding. The View is linked to a ViewModel which has an Address property which is always set. My first thought was to use a ValueC...
You are almost on the right track here! You are right in your observation that the ConvertBack method would need to create a new Address instance. You cannot obtain a reference back to the original address in your converter, the binding framework does not permit this kind of tight coupling. How about using MVVM? create...
Silverlight converter to convert an object to a string and back I have an Address object in my model which has 6 address lines as separate properties. In my Silverlight view I want this to be displayed in a multiline text box and to be updated using databinding. The View is linked to a ViewModel which has an Address pr...
TITLE: Silverlight converter to convert an object to a string and back QUESTION: I have an Address object in my model which has 6 address lines as separate properties. In my Silverlight view I want this to be displayed in a multiline text box and to be updated using databinding. The View is linked to a ViewModel which...
[ "silverlight", "data-binding", "ivalueconverter" ]
1
0
277
1
0
2011-06-06T09:52:46.253000
2011-06-06T10:02:43.023000
6,250,296
6,251,946
Server Signuture turn off need access to php.ini
I want to add the following settings to my server: ServerSignature Off ServerTokens Prod However after research I have to add these settings in my httpd.conf or apache2.conf file. It wont work in my php.ini or.htaccess on my public webroot. If I have not got access to these two server files (httpd.conf or apache2.conf)...
No, you can't configure Apache (as these are apache settings) via php nor any other language. You may hide these values from showing on error pages with a little of mod_rewrite that any request to your server or web application gets directed to a php script that outputs whatever error you want. These values are also sh...
Server Signuture turn off need access to php.ini I want to add the following settings to my server: ServerSignature Off ServerTokens Prod However after research I have to add these settings in my httpd.conf or apache2.conf file. It wont work in my php.ini or.htaccess on my public webroot. If I have not got access to th...
TITLE: Server Signuture turn off need access to php.ini QUESTION: I want to add the following settings to my server: ServerSignature Off ServerTokens Prod However after research I have to add these settings in my httpd.conf or apache2.conf file. It wont work in my php.ini or.htaccess on my public webroot. If I have no...
[ "php", "httpd.conf" ]
0
0
483
1
0
2011-06-06T09:53:20.793000
2011-06-06T12:25:16.910000
6,250,299
6,250,513
Is it possible to load a webpage inside fckeditor?
Is it possible to load a webpage in a fckeditor?
no we can not open a webpage in fck editor we can do only Cut, Paste and Past as Plain Text, Undo and Redo Paste from Word cleanup with auto detection Image insertion, with upload and server browsing support Table creation and editing (add, delete rows, etc)
Is it possible to load a webpage inside fckeditor? Is it possible to load a webpage in a fckeditor?
TITLE: Is it possible to load a webpage inside fckeditor? QUESTION: Is it possible to load a webpage in a fckeditor? ANSWER: no we can not open a webpage in fck editor we can do only Cut, Paste and Past as Plain Text, Undo and Redo Paste from Word cleanup with auto detection Image insertion, with upload and server br...
[ "fckeditor" ]
1
3
101
1
0
2011-06-06T09:53:38.330000
2011-06-06T10:09:59.387000
6,250,300
6,250,584
Is there any option for refering an android project?
I have to create an android project but,it has some dependencies on another project in eclipse.. Is there any option for linking these two projects?
First of all you have to set the project as library project.U can do this via right click the project then properties-->android then set is library checked. And in which you want to use library project add library project. thats all.I hope it will help you.
Is there any option for refering an android project? I have to create an android project but,it has some dependencies on another project in eclipse.. Is there any option for linking these two projects?
TITLE: Is there any option for refering an android project? QUESTION: I have to create an android project but,it has some dependencies on another project in eclipse.. Is there any option for linking these two projects? ANSWER: First of all you have to set the project as library project.U can do this via right click t...
[ "android", "dependencies", "project" ]
0
0
1,041
2
0
2011-06-06T09:53:43.307000
2011-06-06T10:17:34.600000
6,250,304
6,250,396
return a scope in C++
I encountered the following code in a file (looks like header file) iomanip of gcc 4.5.1: inline _Setbase setbase(int __base) { return { __base }; } what is the language definition of returning a scope (block)?
Looks like the new syntax for Uniform initialization in C++0x to me.
return a scope in C++ I encountered the following code in a file (looks like header file) iomanip of gcc 4.5.1: inline _Setbase setbase(int __base) { return { __base }; } what is the language definition of returning a scope (block)?
TITLE: return a scope in C++ QUESTION: I encountered the following code in a file (looks like header file) iomanip of gcc 4.5.1: inline _Setbase setbase(int __base) { return { __base }; } what is the language definition of returning a scope (block)? ANSWER: Looks like the new syntax for Uniform initialization in C++0...
[ "c++", "gcc" ]
17
17
367
2
0
2011-06-06T09:54:03.073000
2011-06-06T10:00:54.897000
6,250,308
6,250,375
How to delete rows that fail a foreign key i want to introduce
In a given SQL Server 2008 table I have a disabled foreign key constraint that should be enabled. I cannot enable this constraint because there are rows in this table that conflict with this foreign key. These rows are invalid. Is there a simple trick that removes data that is conflicting with this constraint?
you have to manually remove all the row that doesn't respect the constrain: probably you will need a T-SQL statement to get all the row you need to remove(perhaps using an outer join) then remove them
How to delete rows that fail a foreign key i want to introduce In a given SQL Server 2008 table I have a disabled foreign key constraint that should be enabled. I cannot enable this constraint because there are rows in this table that conflict with this foreign key. These rows are invalid. Is there a simple trick that ...
TITLE: How to delete rows that fail a foreign key i want to introduce QUESTION: In a given SQL Server 2008 table I have a disabled foreign key constraint that should be enabled. I cannot enable this constraint because there are rows in this table that conflict with this foreign key. These rows are invalid. Is there a ...
[ "sql", "sql-server", "sql-server-2008", "foreign-keys" ]
1
1
1,236
3
0
2011-06-06T09:54:27.287000
2011-06-06T09:59:12.310000
6,250,325
6,250,405
Hide google logo from mapview
On some android devices in mapview google logo are shown as gray or red rectangle. Is it possible to remove it from mapview?
Even though there might be a way of removing it you would be violating the Terms of Service for the Maps API 9.4 Attribution. (a) Content provided to you through the Service may contain the trade names, trademarks, service marks, logos, domain names, and other distinctive brand features of Google, its partners, or othe...
Hide google logo from mapview On some android devices in mapview google logo are shown as gray or red rectangle. Is it possible to remove it from mapview?
TITLE: Hide google logo from mapview QUESTION: On some android devices in mapview google logo are shown as gray or red rectangle. Is it possible to remove it from mapview? ANSWER: Even though there might be a way of removing it you would be violating the Terms of Service for the Maps API 9.4 Attribution. (a) Content ...
[ "android", "google-maps", "android-mapview" ]
3
20
5,545
1
0
2011-06-06T09:55:11.370000
2011-06-06T10:01:26.850000
6,250,346
6,250,460
Maven Spring jar packaging
We have created a jar(Spring project) which we are including using Maven in another Spring project (war) we can use this no problem if we include the required dependancies. If I wanted to ensure the jar contained all it's depenadancies and used them what is the best way to go about this? To avoid having to include the ...
You can use the maven winstone plugin to create a standalone executable jar with all dependencies included of the war, the jar etc.... Adding net.sf.alchim winstone-maven-plugin 1.2 embed install ${project.parent.build.finalName}.jar... will bundle all modules of your app, wars and jars, and any needed dependencies in ...
Maven Spring jar packaging We have created a jar(Spring project) which we are including using Maven in another Spring project (war) we can use this no problem if we include the required dependancies. If I wanted to ensure the jar contained all it's depenadancies and used them what is the best way to go about this? To a...
TITLE: Maven Spring jar packaging QUESTION: We have created a jar(Spring project) which we are including using Maven in another Spring project (war) we can use this no problem if we include the required dependancies. If I wanted to ensure the jar contained all it's depenadancies and used them what is the best way to g...
[ "java", "spring", "maven" ]
1
1
1,915
2
0
2011-06-06T09:57:06.893000
2011-06-06T10:05:46.010000
6,250,351
6,251,475
Selecting a pattern within HTML with jQuery
I'm trying to convert an old Tips plugin from Mootools to jQuery: http://flowplayer.org/tools/tooltip/index.html Everything's in working order, except I'm having trouble re-styling the value of the attribute in the HTML line. For instance, I might have: The effect works perfectly fine, except I want to have the "Header...
Is this what you have in mind: http://jsfiddle.net/g_thom/Za3uY/3/? The jQuery splits the two strings into an array, as Dimitar mentions, and places them into separate divs to be styled differently. Both display on hover over the image. Not sure if this is exactly what you're after. I set the title attribute temporaril...
Selecting a pattern within HTML with jQuery I'm trying to convert an old Tips plugin from Mootools to jQuery: http://flowplayer.org/tools/tooltip/index.html Everything's in working order, except I'm having trouble re-styling the value of the attribute in the HTML line. For instance, I might have: The effect works perfe...
TITLE: Selecting a pattern within HTML with jQuery QUESTION: I'm trying to convert an old Tips plugin from Mootools to jQuery: http://flowplayer.org/tools/tooltip/index.html Everything's in working order, except I'm having trouble re-styling the value of the attribute in the HTML line. For instance, I might have: The ...
[ "jquery", "css", "jquery-selectors", "mootools", "css-selectors" ]
0
1
267
1
0
2011-06-06T09:57:42.573000
2011-06-06T11:39:13.467000
6,250,356
6,259,797
How to use default notification style?
I have the exact same problem as this post. I want my custom notifications text style to match the default notifications (Im just going to add a few extra views). Unfortunately I don't fully understand the accepted answer. I think I am meant to add to the XML code but not sure exactly what... The accepted answer says" ...
Finally figured out what I was doing wrong... (basically I was using features from API 9 when I am only developing on API 8). Firstly, to use a default (platform) style use... style = "@android:style/TextAppearance.Small" For example... Secondly to use the StatusBar default style use.. style = "@android:style/TextAppea...
How to use default notification style? I have the exact same problem as this post. I want my custom notifications text style to match the default notifications (Im just going to add a few extra views). Unfortunately I don't fully understand the accepted answer. I think I am meant to add to the XML code but not sure exa...
TITLE: How to use default notification style? QUESTION: I have the exact same problem as this post. I want my custom notifications text style to match the default notifications (Im just going to add a few extra views). Unfortunately I don't fully understand the accepted answer. I think I am meant to add to the XML cod...
[ "android", "notifications", "styles" ]
12
24
16,759
1
0
2011-06-06T09:58:05.803000
2011-06-07T01:28:22.447000
6,250,360
6,251,898
Textarea value not appearing on $_POST object
Guys, im scratching my head around this one. I have this website that basically contains a few forms that are filled in by the user. The user then can download that information in human readable format (pdf) or machine readable format (xml) but I'm having a slight problem submitting textboxes. I have a few of them, for...
In service_level_library.buttons.prepForSubmit, the textarea is cloned along with the rest of the form via the DOM cloneNode method. This copies HTML element attributes, but not DOM properties. (Sometimes DOM element node properties have a corresponding attribute, so updating the property affects the attribute, which c...
Textarea value not appearing on $_POST object Guys, im scratching my head around this one. I have this website that basically contains a few forms that are filled in by the user. The user then can download that information in human readable format (pdf) or machine readable format (xml) but I'm having a slight problem s...
TITLE: Textarea value not appearing on $_POST object QUESTION: Guys, im scratching my head around this one. I have this website that basically contains a few forms that are filled in by the user. The user then can download that information in human readable format (pdf) or machine readable format (xml) but I'm having ...
[ "php", "forms", "post", "textarea", "submit" ]
0
2
9,271
4
0
2011-06-06T09:58:18.313000
2011-06-06T12:21:00.407000
6,250,367
6,252,210
WCF fault handling
Q How can I get the original exception (occurred on the server) on the client side? I am working with a self-hosted WCF service and C# 4 and trying to set up proper exception handling. I have a client that looks like this private ServiceResponse PerformRemoteAction(ServiceRequest request, ProcessOperations operation) {...
Thanks for all your answers. My problem was in the service interface, namely in the Action property of FaultContractAttribute, it pointed to the incorrect URL. [ServiceContract] public interface IServiceOperation: IOperation {... [OperationContract(Action = "http://tempuri.org/IServiceOperation/VerifyAction", ReplyActi...
WCF fault handling Q How can I get the original exception (occurred on the server) on the client side? I am working with a self-hosted WCF service and C# 4 and trying to set up proper exception handling. I have a client that looks like this private ServiceResponse PerformRemoteAction(ServiceRequest request, ProcessOper...
TITLE: WCF fault handling QUESTION: Q How can I get the original exception (occurred on the server) on the client side? I am working with a self-hosted WCF service and C# 4 and trying to set up proper exception handling. I have a client that looks like this private ServiceResponse PerformRemoteAction(ServiceRequest re...
[ "c#", "wcf", "exception", "wcf-faults" ]
4
1
4,045
4
0
2011-06-06T09:58:36.423000
2011-06-06T12:45:19.670000
6,250,376
6,250,437
What does recursive mean in relation to the git rm -r [filename]
I am working through some tutorials for git and don't understand the difference between running git rm [path/to/file] and git rm -r [path/to/file ] What exactly does the recursive mean? Thanks in advance.
From the git-rm man page: A leading directory name (e.g. dir to remove dir/file1 and dir/file2 ) can be given to remove all files in the directory, and recursively all sub-directories, but this requires the -r option to be explicitly given. Thus git rm -r /path/to/file does the same as git rm /path/to/file and stages t...
What does recursive mean in relation to the git rm -r [filename] I am working through some tutorials for git and don't understand the difference between running git rm [path/to/file] and git rm -r [path/to/file ] What exactly does the recursive mean? Thanks in advance.
TITLE: What does recursive mean in relation to the git rm -r [filename] QUESTION: I am working through some tutorials for git and don't understand the difference between running git rm [path/to/file] and git rm -r [path/to/file ] What exactly does the recursive mean? Thanks in advance. ANSWER: From the git-rm man pag...
[ "git", "unix" ]
2
6
2,375
2
0
2011-06-06T09:59:12.737000
2011-06-06T10:04:04.493000
6,250,383
6,250,754
date in a specific range with NSOrderedAscending and NSOrderedDescending
I have this code: NSComparisonResult compareStart = [firstDate compare: dateSelected]; NSComparisonResult compareEnd = [secondDate compare: dateSelected]; if (((compareStart == NSOrderedAscending) || (compareStart == NSOrderedSame)) && (compareEnd == NSOrderedDescending)) but it don't entry in the "if" when firstDate ...
Are you sure that when firstDate equals dateSelected that date selected is earlier than secondDate? Currently your logic is: firstDate <= dateSelected < secondDate. If you want firstDate <= dateSelected <= secondDate, then you need to implement the code as follows: NSComparisonResult compareStart = [firstDate compare: ...
date in a specific range with NSOrderedAscending and NSOrderedDescending I have this code: NSComparisonResult compareStart = [firstDate compare: dateSelected]; NSComparisonResult compareEnd = [secondDate compare: dateSelected]; if (((compareStart == NSOrderedAscending) || (compareStart == NSOrderedSame)) && (compareEn...
TITLE: date in a specific range with NSOrderedAscending and NSOrderedDescending QUESTION: I have this code: NSComparisonResult compareStart = [firstDate compare: dateSelected]; NSComparisonResult compareEnd = [secondDate compare: dateSelected]; if (((compareStart == NSOrderedAscending) || (compareStart == NSOrderedSa...
[ "objective-c", "ios", "nsdate" ]
0
2
1,677
1
0
2011-06-06T10:00:08.780000
2011-06-06T10:33:27.343000
6,250,390
6,250,480
Visual Studio lost current code on sudden crash
My visual studio 2010 crashed when some carelessness [bit of madness] mistakenly pressed start button and my Acer timeline got unstable. Two projects where open at the time, one in visual studio 2005 [I have both 2005 and 2010 installed]. Unfortunately I lost all the codes I had done at the time along with those coded ...
You can check: C:\Users\ \Documents\Visual Studio 2010\Backup Files\ \ C:\Users\ \Documents\Visual Studio 2005\Backup Files\ \ More information can be found here: Visual Studio 2010 AutoRecover Feature
Visual Studio lost current code on sudden crash My visual studio 2010 crashed when some carelessness [bit of madness] mistakenly pressed start button and my Acer timeline got unstable. Two projects where open at the time, one in visual studio 2005 [I have both 2005 and 2010 installed]. Unfortunately I lost all the code...
TITLE: Visual Studio lost current code on sudden crash QUESTION: My visual studio 2010 crashed when some carelessness [bit of madness] mistakenly pressed start button and my Acer timeline got unstable. Two projects where open at the time, one in visual studio 2005 [I have both 2005 and 2010 installed]. Unfortunately I...
[ "visual-studio", "data-recovery" ]
4
4
22,156
7
0
2011-06-06T10:00:47.907000
2011-06-06T10:06:42.540000
6,250,399
6,250,476
How to get host entries of a domain
We want to get host entries of a domain. Given a domain name (let us say: google.com) I need to get the host records (ex: CNAME, TXT etc..records). Is it possible to get them even when we do not have the control on the domain (i.e domain not purchased by us? Actually, my requirement is that when users enter domain name...
you can only get records from a particular name (hostname or domain name) To get a txt entry from a particular name run: dig TXT [name] more information about dig: http://en.wikipedia.org/wiki/Domain_Information_Groper If you have the control of the dns server of the domain you can allow dns zone transfer which enables...
How to get host entries of a domain We want to get host entries of a domain. Given a domain name (let us say: google.com) I need to get the host records (ex: CNAME, TXT etc..records). Is it possible to get them even when we do not have the control on the domain (i.e domain not purchased by us? Actually, my requirement ...
TITLE: How to get host entries of a domain QUESTION: We want to get host entries of a domain. Given a domain name (let us say: google.com) I need to get the host records (ex: CNAME, TXT etc..records). Is it possible to get them even when we do not have the control on the domain (i.e domain not purchased by us? Actuall...
[ "hosting", "dns" ]
0
2
823
3
0
2011-06-06T10:01:08.430000
2011-06-06T10:06:19.983000
6,250,411
6,251,366
dot product of complex vectors with openMP
I'm using a version of openMP which does not support reduce() for complex argument. I need a fast dot-product function like std::complex< double > dot_prod( std::complex< double > *v1,std::complex< double > *v2,int dim ) { std::complex< double > sum=0.; int i; # pragma omp parallel shared(sum) # pragma omp for for (i=...
Each thread can calculate the private sum as the first step and as the second step it can be composed to the final sum. In that case the critical section is only needed in the final step. std::complex< double > dot_prod( std::complex< double > *v1,std::complex< double > *v2,int dim ) { std::complex< double > sum=0.; in...
dot product of complex vectors with openMP I'm using a version of openMP which does not support reduce() for complex argument. I need a fast dot-product function like std::complex< double > dot_prod( std::complex< double > *v1,std::complex< double > *v2,int dim ) { std::complex< double > sum=0.; int i; # pragma omp pa...
TITLE: dot product of complex vectors with openMP QUESTION: I'm using a version of openMP which does not support reduce() for complex argument. I need a fast dot-product function like std::complex< double > dot_prod( std::complex< double > *v1,std::complex< double > *v2,int dim ) { std::complex< double > sum=0.; int ...
[ "c++", "openmp", "reduce", "dot-product" ]
2
4
2,966
3
0
2011-06-06T10:02:32.470000
2011-06-06T11:29:29.037000
6,250,421
6,250,579
Detecting if memory is low under ocaml
I need a way to detect if memory is low, so that my ocaml program could react on this. Could you point me how to implement or use it? Any hints? Bye Andreas
If you are only allocating inside the heap (you would know if you were allocating outside the heap), use (Gc.quick_stat()).Gc.heap_words to get the size of the heap, a good approximation for the entire memory used by OCaml. As its name indicates, this field is expressed in either 32- or 64-bit words. You must compare t...
Detecting if memory is low under ocaml I need a way to detect if memory is low, so that my ocaml program could react on this. Could you point me how to implement or use it? Any hints? Bye Andreas
TITLE: Detecting if memory is low under ocaml QUESTION: I need a way to detect if memory is low, so that my ocaml program could react on this. Could you point me how to implement or use it? Any hints? Bye Andreas ANSWER: If you are only allocating inside the heap (you would know if you were allocating outside the hea...
[ "memory", "ocaml" ]
4
5
415
1
0
2011-06-06T10:02:57.613000
2011-06-06T10:16:48.920000
6,250,422
6,250,606
How can I drag an image to another position within a DIV (Similar to Facebook's album management)
FOR EXAMPLE: i have 2 pics: pic 1, pic 2. now i want to drag pic 2 in front of pic 1: pic 2, pic 1. so how can i do it? and if its possible please attachs some code. thankful for your answer.
Yes, I guess sortable is best suitable for you. You can also review drag and drop functionality too. Have a look on demo http://jqueryui.com/demos/sortable/
How can I drag an image to another position within a DIV (Similar to Facebook's album management) FOR EXAMPLE: i have 2 pics: pic 1, pic 2. now i want to drag pic 2 in front of pic 1: pic 2, pic 1. so how can i do it? and if its possible please attachs some code. thankful for your answer.
TITLE: How can I drag an image to another position within a DIV (Similar to Facebook's album management) QUESTION: FOR EXAMPLE: i have 2 pics: pic 1, pic 2. now i want to drag pic 2 in front of pic 1: pic 2, pic 1. so how can i do it? and if its possible please attachs some code. thankful for your answer. ANSWER: Yes...
[ "jquery", "asp.net" ]
0
2
108
2
0
2011-06-06T10:03:00.390000
2011-06-06T10:19:38.263000
6,250,425
6,250,547
Modifing associative array keys & values (yes keys too). array_walk or foreach or something else
I am trying to modify an associative array eg. array( 'key1' => 'val1', 'key2' => 'val2', 'key3' => 'val3' ) to something like array( ':key1' => 'val1xx', ':key2' => 'val2xx', ':key3' => 'val3xx' // ^ colen ) You may recognize I am trying to convert it into something I can use in PDOStatement::execute(). I dont current...
There exists a big performance gap between the foreach and the array_map method. The fastest is the foreach construct. This construct can be five to six times as fast as an anonymous function, at least when there is not much to do within the loop. In most scenarios, the time it takes to iterate over the array is neglig...
Modifing associative array keys & values (yes keys too). array_walk or foreach or something else I am trying to modify an associative array eg. array( 'key1' => 'val1', 'key2' => 'val2', 'key3' => 'val3' ) to something like array( ':key1' => 'val1xx', ':key2' => 'val2xx', ':key3' => 'val3xx' // ^ colen ) You may recogn...
TITLE: Modifing associative array keys & values (yes keys too). array_walk or foreach or something else QUESTION: I am trying to modify an associative array eg. array( 'key1' => 'val1', 'key2' => 'val2', 'key3' => 'val3' ) to something like array( ':key1' => 'val1xx', ':key2' => 'val2xx', ':key3' => 'val3xx' // ^ cole...
[ "php", "arrays" ]
1
2
1,724
3
0
2011-06-06T10:03:06.020000
2011-06-06T10:13:39.497000
6,250,426
6,262,343
WCF REST Web API and MVC on same server and port
I'm looking at putting together a REST based system which still has a standard browser style access. My desire is to have both of these on the same machine, but what are my options? Use IIS to host both the web-site and the REST service (different URIs, e.g. http://mysite.com/ and http://mysite.com/api Use IIS and some...
I've ported the contact manager to use MVC 3. It definiately works though we've not done exhaustive testing. The one thing in general to cognizant of with regards to web api is that both MVC Routes and Service Route are greedy. If your default route is first then MVC will try to grab your HTTP Service requests. One thi...
WCF REST Web API and MVC on same server and port I'm looking at putting together a REST based system which still has a standard browser style access. My desire is to have both of these on the same machine, but what are my options? Use IIS to host both the web-site and the REST service (different URIs, e.g. http://mysit...
TITLE: WCF REST Web API and MVC on same server and port QUESTION: I'm looking at putting together a REST based system which still has a standard browser style access. My desire is to have both of these on the same machine, but what are my options? Use IIS to host both the web-site and the REST service (different URIs,...
[ "asp.net-mvc", "wcf-web-api" ]
2
2
1,258
2
0
2011-06-06T10:03:08.373000
2011-06-07T08:09:26.810000
6,250,429
6,250,522
Call Repositories from centralized class based on event listeners?
I have a program that deals with (virtual) money order transactions, and there are many classes that has logic requiring data to be saved to a database. My question is if I shall call my repositories directly from the various classes, or if I shall instead raise events, which a DatabaseManager class object can listen t...
I would pass an IRepository to my classes which they can then call to save data. For one thing it makes testing easier because you can easily inject a mock repository and on the other hand it makes it explicit that your classes have a dependency like that. You might want to search for the term Dependency Injection. Sim...
Call Repositories from centralized class based on event listeners? I have a program that deals with (virtual) money order transactions, and there are many classes that has logic requiring data to be saved to a database. My question is if I shall call my repositories directly from the various classes, or if I shall inst...
TITLE: Call Repositories from centralized class based on event listeners? QUESTION: I have a program that deals with (virtual) money order transactions, and there are many classes that has logic requiring data to be saved to a database. My question is if I shall call my repositories directly from the various classes, ...
[ "c#", ".net", "database", "repository" ]
0
1
75
1
0
2011-06-06T10:03:24.273000
2011-06-06T10:11:19.030000
6,250,439
6,250,506
Transparent UIToolbar
I wrote the following code to make my toolbar transparent. [mtoolbar setBackgroundColor:[UIColor clearColor]]; How do I make UIToolbar transparent?
You can set the property translucent to YES and see if this helps.
Transparent UIToolbar I wrote the following code to make my toolbar transparent. [mtoolbar setBackgroundColor:[UIColor clearColor]]; How do I make UIToolbar transparent?
TITLE: Transparent UIToolbar QUESTION: I wrote the following code to make my toolbar transparent. [mtoolbar setBackgroundColor:[UIColor clearColor]]; How do I make UIToolbar transparent? ANSWER: You can set the property translucent to YES and see if this helps.
[ "ios", "objective-c", "uikit", "uitoolbar" ]
9
12
15,186
7
0
2011-06-06T10:04:13.990000
2011-06-06T10:08:48.830000
6,250,447
6,251,070
Trigger right-click
I am trying to late-bind context menus to elements, using the ContextMenu plugin. So on the first right-click on those elements, I would like to: intercept the right-click through a live event on a certain "uncontextmenued" class, determine if the data('events').contextmenu exists, if not, attach the context-menu (and ...
You can trigger it by $('#element').trigger({ type: 'mousedown', which: 3 }); http://api.jquery.com/trigger/#example-5
Trigger right-click I am trying to late-bind context menus to elements, using the ContextMenu plugin. So on the first right-click on those elements, I would like to: intercept the right-click through a live event on a certain "uncontextmenued" class, determine if the data('events').contextmenu exists, if not, attach th...
TITLE: Trigger right-click QUESTION: I am trying to late-bind context menus to elements, using the ContextMenu plugin. So on the first right-click on those elements, I would like to: intercept the right-click through a live event on a certain "uncontextmenued" class, determine if the data('events').contextmenu exists,...
[ "javascript", "jquery", "contextmenu" ]
19
32
38,829
3
0
2011-06-06T10:05:14.803000
2011-06-06T11:02:55.483000
6,250,451
6,253,312
setfocus() in form or items of j2me application
I had used the normal form in my project. In that form i had used the item 1)textfield 2)ChoiceGroup I want to set focus on choice group when the from appears.How do i get this. Please help me.
You can try Display.getDisplay(this).setCurrentItem(choiceGroup);
setfocus() in form or items of j2me application I had used the normal form in my project. In that form i had used the item 1)textfield 2)ChoiceGroup I want to set focus on choice group when the from appears.How do i get this. Please help me.
TITLE: setfocus() in form or items of j2me application QUESTION: I had used the normal form in my project. In that form i had used the item 1)textfield 2)ChoiceGroup I want to set focus on choice group when the from appears.How do i get this. Please help me. ANSWER: You can try Display.getDisplay(this).setCurrentItem...
[ "java-me" ]
0
2
1,185
1
0
2011-06-06T10:05:24.740000
2011-06-06T14:12:00.897000
6,250,458
6,264,094
iphone applicationWillResignActive - get reason
I wonder, if there's a way to get reason of applicationWillResignActive being called? I'm developing an audio app, and I want to continue recording sound when the screen is auto locked, but I want to stop recording when incoming call occurs. How can I do that?
You can simply use the AVAudioSessionDelegate protocol methods like: beginInterruption and/or endInterruptionWithFlags: to check if the recording is interrupted and than you can do whatever you need. In this case this approach has an advantage over registering to telephony events, because it works all the time recordin...
iphone applicationWillResignActive - get reason I wonder, if there's a way to get reason of applicationWillResignActive being called? I'm developing an audio app, and I want to continue recording sound when the screen is auto locked, but I want to stop recording when incoming call occurs. How can I do that?
TITLE: iphone applicationWillResignActive - get reason QUESTION: I wonder, if there's a way to get reason of applicationWillResignActive being called? I'm developing an audio app, and I want to continue recording sound when the screen is auto locked, but I want to stop recording when incoming call occurs. How can I do...
[ "iphone", "audio", "record", "interruption" ]
1
1
632
2
0
2011-06-06T10:05:40.013000
2011-06-07T10:47:34.483000
6,250,461
6,250,529
Rewrite rule to replace all + with -
My url contains all ' + ' s like path/My+Property+Details but I need to replace all + with '-'.and make it: path/My-Property-Details.
Use String.Replace(..), like so: string s = "path/My+Property+Details"; s = s.Replace("+", "-"); Don't forget the assignment because a string is immutable.
Rewrite rule to replace all + with - My url contains all ' + ' s like path/My+Property+Details but I need to replace all + with '-'.and make it: path/My-Property-Details.
TITLE: Rewrite rule to replace all + with - QUESTION: My url contains all ' + ' s like path/My+Property+Details but I need to replace all + with '-'.and make it: path/My-Property-Details. ANSWER: Use String.Replace(..), like so: string s = "path/My+Property+Details"; s = s.Replace("+", "-"); Don't forget the assignme...
[ "c#", "asp.net" ]
0
3
196
3
0
2011-06-06T10:05:49.840000
2011-06-06T10:11:49.717000
6,250,463
6,250,651
How could I write CASE Clause in sql server 2005?
How could i write CASE Clause in sql server 2005? it errors Here is my code: CASE @accesslevel WHEN 'Order' THEN INSERT INTO Permissions(UserAccountID,PrintOrder) VALUES(@userid,1) WHEN 'Cashier' THEN INSERT INTO Permissions(UserAccountID,PrintInvoice,SaveAndClear) VALUES(@userid,1,1) WHEN 'Supervisor' THEN INSERT IN...
I don't think you can use CASE statement to execute some actions (inserts, updates...), it's used to calculate expressions. You can use IF..ELSE statement: IF @accesslevel = 'Order' INSERT INTO Permissions(UserAccountID,PrintOrder) VALUES(@userid,1) ELSE IF @accesslevel = 'Cashier' INSERT INTO Permissions(UserAccountI...
How could I write CASE Clause in sql server 2005? How could i write CASE Clause in sql server 2005? it errors Here is my code: CASE @accesslevel WHEN 'Order' THEN INSERT INTO Permissions(UserAccountID,PrintOrder) VALUES(@userid,1) WHEN 'Cashier' THEN INSERT INTO Permissions(UserAccountID,PrintInvoice,SaveAndClear) VAL...
TITLE: How could I write CASE Clause in sql server 2005? QUESTION: How could i write CASE Clause in sql server 2005? it errors Here is my code: CASE @accesslevel WHEN 'Order' THEN INSERT INTO Permissions(UserAccountID,PrintOrder) VALUES(@userid,1) WHEN 'Cashier' THEN INSERT INTO Permissions(UserAccountID,PrintInvoice...
[ "sql-server-2005", "t-sql" ]
0
2
326
2
0
2011-06-06T10:05:57.657000
2011-06-06T10:24:24.107000
6,250,466
6,251,299
Subversive: how to add to svn ignore
I am using Subversive and I have the same question as Subclipse svn:ignore, but the solution did not work for me. Anyone knows how to add to svn:ignore files already added to a project with Sobversive? If I delete it and create it again, there is a red exaclamation ('!') icon and I am not able to add it to svn:ignore
You must delete the file and commit the deletion. Then you can re-add the file, and put it under svn:ignore.
Subversive: how to add to svn ignore I am using Subversive and I have the same question as Subclipse svn:ignore, but the solution did not work for me. Anyone knows how to add to svn:ignore files already added to a project with Sobversive? If I delete it and create it again, there is a red exaclamation ('!') icon and I ...
TITLE: Subversive: how to add to svn ignore QUESTION: I am using Subversive and I have the same question as Subclipse svn:ignore, but the solution did not work for me. Anyone knows how to add to svn:ignore files already added to a project with Sobversive? If I delete it and create it again, there is a red exaclamation...
[ "eclipse", "subversive" ]
6
6
3,150
1
0
2011-06-06T10:06:03.367000
2011-06-06T11:24:18.900000
6,250,469
6,250,546
ASIHTTPRequest debugging
I'm using ASIHTTPRequest in my iOS project. i would like to see all the http headers of my request to the server. How I can see this with ASIHTTPRequest? Is there any tool like fiddler in the mac? Thanks for your answer
There is a requestHeaders property. It is NSMutableDictionary, so you can iterate through it. Dictionary key is name of header and dictionary value for this key is value of header with this name.
ASIHTTPRequest debugging I'm using ASIHTTPRequest in my iOS project. i would like to see all the http headers of my request to the server. How I can see this with ASIHTTPRequest? Is there any tool like fiddler in the mac? Thanks for your answer
TITLE: ASIHTTPRequest debugging QUESTION: I'm using ASIHTTPRequest in my iOS project. i would like to see all the http headers of my request to the server. How I can see this with ASIHTTPRequest? Is there any tool like fiddler in the mac? Thanks for your answer ANSWER: There is a requestHeaders property. It is NSMuta...
[ "iphone", "objective-c" ]
3
1
2,691
3
0
2011-06-06T10:06:08.127000
2011-06-06T10:13:19.313000
6,250,470
6,251,048
Three20 - open url for a shared view controller
I know that if map a url with from:toViewController:, then open that url will create a new view controller and if from:toSharedViewController is used then a shared instance will be used. But for example [map from:@"tt://tabbar/(initWithString:)" toSharedViewController:[MyTabbarController class]]; TTOpenURL(@"tt://tabba...
The answer is: no. I.e., init will not be called on an already initialized instance, but a new instance will be allocated and initialized. This is due to Three20 associating the object to its full URL, which in your case is either "tt://tabbar/string" or "tt://tabbar/somethingelse", so that when querying the TTURLMap, ...
Three20 - open url for a shared view controller I know that if map a url with from:toViewController:, then open that url will create a new view controller and if from:toSharedViewController is used then a shared instance will be used. But for example [map from:@"tt://tabbar/(initWithString:)" toSharedViewController:[My...
TITLE: Three20 - open url for a shared view controller QUESTION: I know that if map a url with from:toViewController:, then open that url will create a new view controller and if from:toSharedViewController is used then a shared instance will be used. But for example [map from:@"tt://tabbar/(initWithString:)" toShared...
[ "objective-c", "ios", "three20" ]
3
2
758
1
0
2011-06-06T10:06:08.443000
2011-06-06T11:01:37.740000
6,250,483
6,257,162
script to pick the most recent file created in a folder in a distributed system?
script to pick the most recent file created in a folder? The scenario is as beloow: I have to pick the 2 files which are created recently and i have to copy it to another folder. What script can be used to perform this in a distributed system?
Have you considered to use powershell? It's a great tool for this kind of tasks gci c:\source |? {-not $_.psiscontainer} | sort-object creationtime -desc | select -first 2 | copy-item -destination c:\destination This script searches only files within a specified folder, then it sorts files in reverse order by creation ...
script to pick the most recent file created in a folder in a distributed system? script to pick the most recent file created in a folder? The scenario is as beloow: I have to pick the 2 files which are created recently and i have to copy it to another folder. What script can be used to perform this in a distributed sys...
TITLE: script to pick the most recent file created in a folder in a distributed system? QUESTION: script to pick the most recent file created in a folder? The scenario is as beloow: I have to pick the 2 files which are created recently and i have to copy it to another folder. What script can be used to perform this in...
[ "windows", "powershell", "ant", "vbscript", "batch-file" ]
0
1
233
1
0
2011-06-06T10:06:50.823000
2011-06-06T19:44:17.497000
6,250,508
6,250,650
SQL query problem
SELECT * FROM `friends` AS Friend WHERE ( ( ( Friend.user_id =1618 AND Friend.profile_id =290 ) OR ( Friend.to_user_id =1618 AND Friend.to_profile_id =290 ) ) AND ( ( Friend.user_id!=1817 AND Friend.profile_id!=393 ) OR ( Friend.to_user_id!=1817 AND Friend.to_profile_id!=393 ) ) ) I want those records Which are having ...
Your "not" part of the condition (1817,393) is possibly route of your problem. (user_id!= 1817 AND profile_id!=393) OR (to_user_id!= 1817 AND to_profile_id!=393) For example; If user_id and profile_id don't match (1817,393) then the OR means the to_ parts don't ever need checking. The left hand side of the OR checks ou...
SQL query problem SELECT * FROM `friends` AS Friend WHERE ( ( ( Friend.user_id =1618 AND Friend.profile_id =290 ) OR ( Friend.to_user_id =1618 AND Friend.to_profile_id =290 ) ) AND ( ( Friend.user_id!=1817 AND Friend.profile_id!=393 ) OR ( Friend.to_user_id!=1817 AND Friend.to_profile_id!=393 ) ) ) I want those records...
TITLE: SQL query problem QUESTION: SELECT * FROM `friends` AS Friend WHERE ( ( ( Friend.user_id =1618 AND Friend.profile_id =290 ) OR ( Friend.to_user_id =1618 AND Friend.to_profile_id =290 ) ) AND ( ( Friend.user_id!=1817 AND Friend.profile_id!=393 ) OR ( Friend.to_user_id!=1817 AND Friend.to_profile_id!=393 ) ) ) I ...
[ "mysql", "sql" ]
0
3
92
2
0
2011-06-06T10:08:54.770000
2011-06-06T10:24:12.943000
6,250,509
6,250,594
Constructor chaining and static property parameter and StructureMap
I would like my constructor to call another constructor with parameter but when I do this(MyProperty), then MyProperty must be static. And the problem is in the getter of this static Property, I have to get an instance of ISettingReader from structuremap Container and as it is static, my container contains only two ele...
Why don't you move the code from your getter to the default constructor and put the ISettingReader as a dependency in the constructor. When you request a new MyProjectViewModelService Structuremap will automatically resolve the ISettingReader and supply the instantiated default type for that dependency. So if you would...
Constructor chaining and static property parameter and StructureMap I would like my constructor to call another constructor with parameter but when I do this(MyProperty), then MyProperty must be static. And the problem is in the getter of this static Property, I have to get an instance of ISettingReader from structurem...
TITLE: Constructor chaining and static property parameter and StructureMap QUESTION: I would like my constructor to call another constructor with parameter but when I do this(MyProperty), then MyProperty must be static. And the problem is in the getter of this static Property, I have to get an instance of ISettingRead...
[ "c#", "constructor", "structuremap" ]
0
1
500
1
0
2011-06-06T10:08:58.077000
2011-06-06T10:18:08.433000
6,250,524
6,251,287
Dojo declare - base class is not a callable constructor
I try in Dojo var a=new DATALINK_MSTP(); but I got error base class is not a callable constructor dojo.declare("DATALINK", null, { _id:'', _type:'', _network:'', _mac:'', _hop_count:'', _mqueue:'', constructor: function(){ this._id=''; this._type=''; this._newtwork=''; this._mac=''; this._hop_count=''; this._mqueue=new...
try this: dojo.declare("DATALINK_MSTP", DATALINK, {...}); dojo.declare("DATALINK_BIP", DATALINK, {...});
Dojo declare - base class is not a callable constructor I try in Dojo var a=new DATALINK_MSTP(); but I got error base class is not a callable constructor dojo.declare("DATALINK", null, { _id:'', _type:'', _network:'', _mac:'', _hop_count:'', _mqueue:'', constructor: function(){ this._id=''; this._type=''; this._newtwor...
TITLE: Dojo declare - base class is not a callable constructor QUESTION: I try in Dojo var a=new DATALINK_MSTP(); but I got error base class is not a callable constructor dojo.declare("DATALINK", null, { _id:'', _type:'', _network:'', _mac:'', _hop_count:'', _mqueue:'', constructor: function(){ this._id=''; this._type...
[ "javascript", "dojo" ]
1
2
4,525
1
0
2011-06-06T10:11:28.703000
2011-06-06T11:23:26.433000
6,250,527
6,250,564
C Array of strings
I want to create an array of strings. The problem is that I want to be able to access the length of each string statically. I tried this: char *a[] = {"foo", "foobar"}; The array works fine except that I want to know the length of each element statically. I can't use sizeof(a[0]) because it returns the size of the char...
In short, no, not at compile-time (at least not for an arbitrary number of strings). There are various run-time initialization-like things you can do, as others have pointed out. And there are solutions for a fixed number of strings, as others have pointed out. The type of a[0] must be the same as that of a[1] (obvious...
C Array of strings I want to create an array of strings. The problem is that I want to be able to access the length of each string statically. I tried this: char *a[] = {"foo", "foobar"}; The array works fine except that I want to know the length of each element statically. I can't use sizeof(a[0]) because it returns t...
TITLE: C Array of strings QUESTION: I want to create an array of strings. The problem is that I want to be able to access the length of each string statically. I tried this: char *a[] = {"foo", "foobar"}; The array works fine except that I want to know the length of each element statically. I can't use sizeof(a[0]) be...
[ "c", "arrays", "string" ]
5
4
3,477
7
0
2011-06-06T10:11:31.727000
2011-06-06T10:15:45.720000
6,250,532
6,250,588
The click event handler added with jQuery's live method gets triggered for a disabled asp.net image button
How do I stop a click event handler added with jQuery's live method from getting triggered on an already disabled asp.net image button? Following is the code snippet. $('#<%=imgBtnEdit.ClientID%>').live('click', function () {... });
Add the:enabled pseudo-selector. $('#<%=imgBtnEdit.ClientID%>:enabled').live('click', function () {... });
The click event handler added with jQuery's live method gets triggered for a disabled asp.net image button How do I stop a click event handler added with jQuery's live method from getting triggered on an already disabled asp.net image button? Following is the code snippet. $('#<%=imgBtnEdit.ClientID%>').live('click', f...
TITLE: The click event handler added with jQuery's live method gets triggered for a disabled asp.net image button QUESTION: How do I stop a click event handler added with jQuery's live method from getting triggered on an already disabled asp.net image button? Following is the code snippet. $('#<%=imgBtnEdit.ClientID%>...
[ "jquery" ]
1
0
196
1
0
2011-06-06T10:12:02.603000
2011-06-06T10:17:44.643000
6,250,538
6,250,617
Non-editable UITextField with copy menu
Is there a way to make a UITextField non-editable by the user and provide only a copy menu without subclassing? I.e when the text field is touched it automatically selects all the text and only shows the copy menu. If possible to do this without subclassing what are the interface builder options that need to be selecte...
You can disable editing by setting the enabled property of UITextField to NO. textField.enabled = NO; Note that doing this will also disable the copy/paste options. What you are asking for has been discussed before in this solution: Enable copy and paste on UITextField without making it editable
Non-editable UITextField with copy menu Is there a way to make a UITextField non-editable by the user and provide only a copy menu without subclassing? I.e when the text field is touched it automatically selects all the text and only shows the copy menu. If possible to do this without subclassing what are the interface...
TITLE: Non-editable UITextField with copy menu QUESTION: Is there a way to make a UITextField non-editable by the user and provide only a copy menu without subclassing? I.e when the text field is touched it automatically selects all the text and only shows the copy menu. If possible to do this without subclassing what...
[ "iphone", "objective-c", "ios" ]
8
4
9,148
5
0
2011-06-06T10:12:21.920000
2011-06-06T10:20:31.617000
6,250,541
6,250,991
FluentHibernate: how to specify join-mapped table should never be inserted into
I have the following FluentNHibernate mapping: public AssetMap() { Table("PRASSET"); Id(x => x.Id).Column("PRA_RECNUM").GeneratedBy.Sequence("PRA_RECNUM_GEN");...fields mapped from PRASSET table Join("PRSTOCK", m => { m.Fetch.Join(); m.Optional(); m.KeyColumn("PRS_ASSRN");...fields mapped from PRSTOCK table }); } As th...
According to this blog post, NHibernate will always try to insert join-mapped records if the properties are not null. So I have made the appropriate properties nullable (default null) and hopefully it won't try to insert anymore.
FluentHibernate: how to specify join-mapped table should never be inserted into I have the following FluentNHibernate mapping: public AssetMap() { Table("PRASSET"); Id(x => x.Id).Column("PRA_RECNUM").GeneratedBy.Sequence("PRA_RECNUM_GEN");...fields mapped from PRASSET table Join("PRSTOCK", m => { m.Fetch.Join(); m.Opti...
TITLE: FluentHibernate: how to specify join-mapped table should never be inserted into QUESTION: I have the following FluentNHibernate mapping: public AssetMap() { Table("PRASSET"); Id(x => x.Id).Column("PRA_RECNUM").GeneratedBy.Sequence("PRA_RECNUM_GEN");...fields mapped from PRASSET table Join("PRSTOCK", m => { m.Fe...
[ "nhibernate", "join", "fluent-nhibernate" ]
0
0
178
1
0
2011-06-06T10:12:40.453000
2011-06-06T10:55:15.333000
6,250,543
6,251,055
How to handle transaction in WCF Service with LINQ
I am using WCF Service which performs database transaction. I am finding a way to rollback when any operation fails. public void UpdateFirstTable() { //Linq query to update table1 } public void UpdateSecondTable() { //Linq query to update table2 } if an exception occus while performing any operation in UpdateFirstTabl...
http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx#Y1900
How to handle transaction in WCF Service with LINQ I am using WCF Service which performs database transaction. I am finding a way to rollback when any operation fails. public void UpdateFirstTable() { //Linq query to update table1 } public void UpdateSecondTable() { //Linq query to update table2 } if an exception occu...
TITLE: How to handle transaction in WCF Service with LINQ QUESTION: I am using WCF Service which performs database transaction. I am finding a way to rollback when any operation fails. public void UpdateFirstTable() { //Linq query to update table1 } public void UpdateSecondTable() { //Linq query to update table2 } if...
[ "asp.net", "wcf" ]
0
1
165
1
0
2011-06-06T10:12:48.407000
2011-06-06T11:02:05.827000
6,250,545
6,250,846
How to implement full row selecting in GridView without select button?
I'm implementing a feature that when the user press on any point in the row in a GridView the row will be selected instead of Select button. To implement that, I'm using the following code: protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { ...
You must add this on every postback and not only on databinding. Therefore you should use the RowCreated -Event of the GridView. For example (C#): protected void GridView1_RowCreated(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Attributes["o...
How to implement full row selecting in GridView without select button? I'm implementing a feature that when the user press on any point in the row in a GridView the row will be selected instead of Select button. To implement that, I'm using the following code: protected void GridView1_RowDataBound(object sender, GridVi...
TITLE: How to implement full row selecting in GridView without select button? QUESTION: I'm implementing a feature that when the user press on any point in the row in a GridView the row will be selected instead of Select button. To implement that, I'm using the following code: protected void GridView1_RowDataBound(obj...
[ "c#", "asp.net", "gridview", "selectedindexchanged" ]
29
46
91,070
5
0
2011-06-06T10:13:07.560000
2011-06-06T10:42:09.993000
6,250,549
6,253,161
Gtk+Glade: widgets using same signal handler. How to differ them from each other?
Now that I'm having a window including many buttons which perform similar behavior so it's natural to use same signal handler for them. But however after the signal happens I just can't differ them from each other. Yes, I have the pointer to the object, but I can't tell is it the first button, the second button, or som...
The reason you're getting a value back like "GTKToggleButton" is because you have not manually set the name using gtk_widget_set_name. According to the GTK documentation: Widget names are the type of the widget by default (e.g. "GtkButton") or can be set to an application-specific value with gtk_widget_set_name(). So u...
Gtk+Glade: widgets using same signal handler. How to differ them from each other? Now that I'm having a window including many buttons which perform similar behavior so it's natural to use same signal handler for them. But however after the signal happens I just can't differ them from each other. Yes, I have the pointer...
TITLE: Gtk+Glade: widgets using same signal handler. How to differ them from each other? QUESTION: Now that I'm having a window including many buttons which perform similar behavior so it's natural to use same signal handler for them. But however after the signal happens I just can't differ them from each other. Yes, ...
[ "c", "gtk", "glade" ]
3
3
930
1
0
2011-06-06T10:13:45.820000
2011-06-06T14:00:09.697000
6,250,572
6,263,476
Calling jrxml file from php for pdf generation
i have to generate jasper reports in my php website. I want to know what all are needed to make this work. I was told that i needed php-java bridge. But i hope that is for the sole purpose of generating a.jrxml file. I already have the jrxml file with me. Now how can i call this file from my php code, for generating ja...
Well, i could get what i wanted by using PHP Jasper XML. It is opensource too.
Calling jrxml file from php for pdf generation i have to generate jasper reports in my php website. I want to know what all are needed to make this work. I was told that i needed php-java bridge. But i hope that is for the sole purpose of generating a.jrxml file. I already have the jrxml file with me. Now how can i cal...
TITLE: Calling jrxml file from php for pdf generation QUESTION: i have to generate jasper reports in my php website. I want to know what all are needed to make this work. I was told that i needed php-java bridge. But i hope that is for the sole purpose of generating a.jrxml file. I already have the jrxml file with me....
[ "php", "pdf", "jasper-reports" ]
1
1
5,557
3
0
2011-06-06T10:16:37.953000
2011-06-07T09:49:11.127000
6,250,581
6,250,708
Show image when form is submitted?
Using Javascript I would like to show a working/loading image once a user hits submit on my form. The form is used to upload video's so it can take a while for the file to upload. Once the file is done uploading the page reloads so the loading image would not need to be visible anymore. Can anyone help me with this ple...
Using jquery: you can use as follow within document.ready $("form").submit(function() { //you can assign id to your form and used that id instead of form $("#iamgeid").show(); return true; });
Show image when form is submitted? Using Javascript I would like to show a working/loading image once a user hits submit on my form. The form is used to upload video's so it can take a while for the file to upload. Once the file is done uploading the page reloads so the loading image would not need to be visible anymor...
TITLE: Show image when form is submitted? QUESTION: Using Javascript I would like to show a working/loading image once a user hits submit on my form. The form is used to upload video's so it can take a while for the file to upload. Once the file is done uploading the page reloads so the loading image would not need to...
[ "javascript" ]
3
3
4,418
3
0
2011-06-06T10:16:55.177000
2011-06-06T10:29:21.477000
6,250,587
6,264,617
PowerBuilder - Different encoding PB 6.5 - PB 10.5
I have built an encryption function for an application in PB 6.5, it works fine, it takes the data of a person, encrypts it and stores the resulting string in the database. In the other hand, I have access to this data in an application built in PB 10.5 (because both application share the database). The problem is I ca...
The problem was in my encrypting function: I used a string (ascii_string) with ASCII characters from 1 to 255 to encode the data, but I found there are 'strange' characters in positions 1 until 31. So, in PB6.5 I did: for i=32 to 255 ascii_string += string(char(i)) next and for PB 10.5: for i=32 to 256 aux = Blob(char(...
PowerBuilder - Different encoding PB 6.5 - PB 10.5 I have built an encryption function for an application in PB 6.5, it works fine, it takes the data of a person, encrypts it and stores the resulting string in the database. In the other hand, I have access to this data in an application built in PB 10.5 (because both a...
TITLE: PowerBuilder - Different encoding PB 6.5 - PB 10.5 QUESTION: I have built an encryption function for an application in PB 6.5, it works fine, it takes the data of a person, encrypts it and stores the resulting string in the database. In the other hand, I have access to this data in an application built in PB 10...
[ "encoding", "character-encoding", "powerbuilder" ]
0
0
2,802
1
0
2011-06-06T10:17:41.903000
2011-06-07T11:39:33.700000
6,250,589
6,251,887
Simple search engine with javascript. Any suggestion?
I would to make a simple search engine with javascript. The idea is to read a server-side text file, parse it and find any expression that matches user's query. And yes, I must use client-side scripting. Do you have any suggestion? Thanks. EDIT - Details to answer comments I need to parse 1 single file (max. 10.000 lin...
You will have cross browser problems with the request so using a library that abstracts this IS a smart choice. However here is a possible skeleton for the needed calls. Be assured that storing a large file in a javascript variable is not very cleaver. Beware on what you are doing! var words = []; var query = ""; func...
Simple search engine with javascript. Any suggestion? I would to make a simple search engine with javascript. The idea is to read a server-side text file, parse it and find any expression that matches user's query. And yes, I must use client-side scripting. Do you have any suggestion? Thanks. EDIT - Details to answer c...
TITLE: Simple search engine with javascript. Any suggestion? QUESTION: I would to make a simple search engine with javascript. The idea is to read a server-side text file, parse it and find any expression that matches user's query. And yes, I must use client-side scripting. Do you have any suggestion? Thanks. EDIT - D...
[ "javascript", "search-engine" ]
1
2
1,754
3
0
2011-06-06T10:17:52.837000
2011-06-06T12:19:50.923000
6,250,591
6,251,501
Open a StreamConnection on BlackBerry
I'm trying to get and parse an XML file. I am following the sample code in " How To - Use the XML Parser " but when I put my url in the sample code it just hangs on requesting forever. If I put the same URL in the html demo I get the text of the xml file. I do not understand why one works and the other doesn't. The htm...
you can't use localhost on BlackBerry/MDS, open a command-prompt, type hostname and use that instead.
Open a StreamConnection on BlackBerry I'm trying to get and parse an XML file. I am following the sample code in " How To - Use the XML Parser " but when I put my url in the sample code it just hangs on requesting forever. If I put the same URL in the html demo I get the text of the xml file. I do not understand why on...
TITLE: Open a StreamConnection on BlackBerry QUESTION: I'm trying to get and parse an XML file. I am following the sample code in " How To - Use the XML Parser " but when I put my url in the sample code it just hangs on requesting forever. If I put the same URL in the html demo I get the text of the xml file. I do not...
[ "xml", "sockets", "blackberry", "java-me" ]
0
1
343
1
0
2011-06-06T10:17:58.110000
2011-06-06T11:42:01.847000
6,250,592
6,250,817
Displaying a border around a mask actionscript 3
Is there any way to display a border around the shape that is being used as a mask over an image? I've created a custom shape using points and set it as the mask over an image... But when i set it as the mask the lines between the points disappear. Thanks in advance
if you have a shape / sprite / mc / bitmap and you are using on of them as a mask, no matter what graphics they will have, you will not be able to see any. in the docs it is said: The mask object itself is not drawn so solution for that one is: bordered graphics mask masked item where your bordered graphics is the same...
Displaying a border around a mask actionscript 3 Is there any way to display a border around the shape that is being used as a mask over an image? I've created a custom shape using points and set it as the mask over an image... But when i set it as the mask the lines between the points disappear. Thanks in advance
TITLE: Displaying a border around a mask actionscript 3 QUESTION: Is there any way to display a border around the shape that is being used as a mask over an image? I've created a custom shape using points and set it as the mask over an image... But when i set it as the mask the lines between the points disappear. Than...
[ "flash", "actionscript-3" ]
1
0
252
1
0
2011-06-06T10:18:01.980000
2011-06-06T10:38:51.433000
6,250,600
6,251,027
Copy ARP table to an array
I've been trying to figure out the best way to copy Linux ARP table into an array, I just need IP and MAC address. I have tried copying the /proc/net/arp file, but I do not find it the best way to do it, I read there might appear other entries beside ARP (IPv6 or sth). I am not sure! Is there any other option to get lo...
The ip neighbor list command from iproute2 uses a netlink socket to query the kernel about the neighbour information. It is recommended to use the libnetlink from the same iproute2 package to access this information.
Copy ARP table to an array I've been trying to figure out the best way to copy Linux ARP table into an array, I just need IP and MAC address. I have tried copying the /proc/net/arp file, but I do not find it the best way to do it, I read there might appear other entries beside ARP (IPv6 or sth). I am not sure! Is there...
TITLE: Copy ARP table to an array QUESTION: I've been trying to figure out the best way to copy Linux ARP table into an array, I just need IP and MAC address. I have tried copying the /proc/net/arp file, but I do not find it the best way to do it, I read there might appear other entries beside ARP (IPv6 or sth). I am ...
[ "c", "linux", "networking", "arp" ]
1
2
1,925
1
0
2011-06-06T10:19:00.100000
2011-06-06T10:59:16.590000
6,250,603
6,250,872
Add children to a dynamically added swf before adding to stage
as the title states, I am trying to add children to a dynamically added swf file, using AS3, before I add it to stage, is this possible? Here is the code I have thus far, AS3: var mLoader:Loader = new Loader(); var mRequest:URLRequest = new URLRequest(glo.bal.base_url+"videos/vid_1.swf"); mLoader.contentLoaderInfo.addE...
var mLoader:Loader = new Loader(); var mRequest:URLRequest = new URLRequest(glo.bal.base_url+"videos/vid_1.swf"); mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler_one); mLoader.load(mRequest); function onCompleteHandler_one(loadEvent:Event) { var loadedClip:MovieClip = loadEvent.currentTarg...
Add children to a dynamically added swf before adding to stage as the title states, I am trying to add children to a dynamically added swf file, using AS3, before I add it to stage, is this possible? Here is the code I have thus far, AS3: var mLoader:Loader = new Loader(); var mRequest:URLRequest = new URLRequest(glo.b...
TITLE: Add children to a dynamically added swf before adding to stage QUESTION: as the title states, I am trying to add children to a dynamically added swf file, using AS3, before I add it to stage, is this possible? Here is the code I have thus far, AS3: var mLoader:Loader = new Loader(); var mRequest:URLRequest = ne...
[ "flash", "actionscript-3" ]
0
1
105
1
0
2011-06-06T10:19:11.870000
2011-06-06T10:44:14.270000
6,250,605
6,250,729
Getting error while download file in Firefox
I am facing a problem in my application. I have some section in application from where user can download data in excel file.Code is working absolutely fine in local, Means file is getting download properly in local with every browser. But when we download file from test or live server its shows a popup with following e...
Do you have some FF download manager extension? Anyway, this problem usually happens when your security software stops the download and then resumes it. if the file is being downloaded to you temp folder, FF might have problems accessing this folder and resume the download. Another solution might be to close FF and del...
Getting error while download file in Firefox I am facing a problem in my application. I have some section in application from where user can download data in excel file.Code is working absolutely fine in local, Means file is getting download properly in local with every browser. But when we download file from test or l...
TITLE: Getting error while download file in Firefox QUESTION: I am facing a problem in my application. I have some section in application from where user can download data in excel file.Code is working absolutely fine in local, Means file is getting download properly in local with every browser. But when we download f...
[ "javascript", "asp.net-mvc", "model-view-controller" ]
1
1
3,375
3
0
2011-06-06T10:19:20.320000
2011-06-06T10:30:55.287000
6,250,612
6,251,930
In asp.net-mvc, how can I run an expensive operation without slowing down user experience?
I have an asp.net-mvc website and I am using nhibernate for my ORM. I have a current controller action that does a basic CRUD update (queries an item from the database and then updates a bunch of values and commits back to the db table). It then returns a simple json response to the client to indicate success or error....
I've done this before. The most robust way would be to use Asynchronous Controller's, or better yet an independant service such as a WCF service. But in my experience, i've just needed to do "simple", one-liner task, such as auditing or reporting, as you say. In that example, the easy way - fire off a Task: public Acti...
In asp.net-mvc, how can I run an expensive operation without slowing down user experience? I have an asp.net-mvc website and I am using nhibernate for my ORM. I have a current controller action that does a basic CRUD update (queries an item from the database and then updates a bunch of values and commits back to the db...
TITLE: In asp.net-mvc, how can I run an expensive operation without slowing down user experience? QUESTION: I have an asp.net-mvc website and I am using nhibernate for my ORM. I have a current controller action that does a basic CRUD update (queries an item from the database and then updates a bunch of values and comm...
[ "c#", "asp.net-mvc", "nhibernate" ]
21
51
9,382
9
0
2011-06-06T10:20:11.430000
2011-06-06T12:23:37.567000
6,250,624
6,252,293
ASP.NET MVC - pass htmlAttributes as parameter
I want to pass htmlAttributes as parameter to my HtmlHelper similar as it created in Html.ActionLink("linktext", "Home", null, new{width="100px"} ) How to pass this new{width="100px"} to my method public static string SelectCategoryAdminWithAllItem(this HtmlHelper htmlHelper, string name, **???**) { } and how to parse ...
I looked through the source for MVC2 when trying to figure this one out. In MVC2 they used an overload of RouteValueDictionary in System.Web.Routing to turn an object to a dictionary rather than having a helper method available like in MVC3. public static MvcHtmlString TextBox(this HtmlHelper htmlHelper, string name, o...
ASP.NET MVC - pass htmlAttributes as parameter I want to pass htmlAttributes as parameter to my HtmlHelper similar as it created in Html.ActionLink("linktext", "Home", null, new{width="100px"} ) How to pass this new{width="100px"} to my method public static string SelectCategoryAdminWithAllItem(this HtmlHelper htmlHelp...
TITLE: ASP.NET MVC - pass htmlAttributes as parameter QUESTION: I want to pass htmlAttributes as parameter to my HtmlHelper similar as it created in Html.ActionLink("linktext", "Home", null, new{width="100px"} ) How to pass this new{width="100px"} to my method public static string SelectCategoryAdminWithAllItem(this H...
[ "asp.net-mvc", "asp.net-mvc-2", "html-helper" ]
2
3
2,092
2
0
2011-06-06T10:21:13.880000
2011-06-06T12:52:34.363000
6,250,625
6,250,707
How to know view name in run time in iphone
I have more than 3 views and also one window view ( pdfReader.xib nib file). I have a screen which is containing chapter name that is representing by table view. Whenever any row selected related chapeter is being load. I am controlling with different view. I want to know which view is being load in my "pdfReader.m" fi...
you need to assign an tag value with each of your view. (When you create your views with init method) pdfReader.Chapter1.tag = 1; pdfReader.Chapter2.tag = 2; pdfReader.Chapter3.tag = 3; Now modify your didSelectRowAtIndexPath function -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)inde...
How to know view name in run time in iphone I have more than 3 views and also one window view ( pdfReader.xib nib file). I have a screen which is containing chapter name that is representing by table view. Whenever any row selected related chapeter is being load. I am controlling with different view. I want to know whi...
TITLE: How to know view name in run time in iphone QUESTION: I have more than 3 views and also one window view ( pdfReader.xib nib file). I have a screen which is containing chapter name that is representing by table view. Whenever any row selected related chapeter is being load. I am controlling with different view. ...
[ "iphone", "uiview", "uiviewcontroller" ]
0
0
341
3
0
2011-06-06T10:21:21.433000
2011-06-06T10:29:13.613000
6,250,626
6,250,655
Efficient way to select ancestors in jQuery
Given the following HTML snippet: By I have a link of class vote-link and I want to select both the the link a.load and the a.load img, How can I do it efficiently via jQuery?
First you'll need to go up to a common ancestor with closest. $(this).closest('div.image'); Then you'll need to find the link and the image using find, the multiple selector and the descendant selector: $(this).closest('div.image').find('a.load, a.load img');
Efficient way to select ancestors in jQuery Given the following HTML snippet: By I have a link of class vote-link and I want to select both the the link a.load and the a.load img, How can I do it efficiently via jQuery?
TITLE: Efficient way to select ancestors in jQuery QUESTION: Given the following HTML snippet: By I have a link of class vote-link and I want to select both the the link a.load and the a.load img, How can I do it efficiently via jQuery? ANSWER: First you'll need to go up to a common ancestor with closest. $(this).clo...
[ "jquery", "jquery-selectors" ]
2
6
317
6
0
2011-06-06T10:21:22.570000
2011-06-06T10:24:51.010000
6,250,627
6,250,982
How to get java list and built a drop down list in jsp page
I have a jsp page. if a user enters a certain text a ajax request is sent and and List is retrieved.Bow i want to built a drop down list from the List object and set the default value to the first element of the List Object. How I can do this.
I don't have any AJAX knowledge so I cant help on that end. So my way of solving this would be doing the most I can in java/jsp's and then using javascript/AJAX to fetch the select from an auxiliary jsp like this: <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> ${obj} ${obj} Edit: Actually would be clea...
How to get java list and built a drop down list in jsp page I have a jsp page. if a user enters a certain text a ajax request is sent and and List is retrieved.Bow i want to built a drop down list from the List object and set the default value to the first element of the List Object. How I can do this.
TITLE: How to get java list and built a drop down list in jsp page QUESTION: I have a jsp page. if a user enters a certain text a ajax request is sent and and List is retrieved.Bow i want to built a drop down list from the List object and set the default value to the first element of the List Object. How I can do this...
[ "java", "javascript", "ajax", "jsp" ]
0
0
3,177
3
0
2011-06-06T10:21:29.820000
2011-06-06T10:54:30.163000
6,250,642
6,250,684
Setting default tab as visited
I have some basic tabs in HTML, with CSS to change the colour once the tab has been visited. My problem is that the default tab (that is selected when the page is opened) is not set as visited (as it hasn't been clicked yet). So when the user clicks a second tab, the default is marked as not visited yet. Whats the easi...
Give the default tab a class to make the colour match the colour of a visited tab? a.home_link { color:#xxx; }
Setting default tab as visited I have some basic tabs in HTML, with CSS to change the colour once the tab has been visited. My problem is that the default tab (that is selected when the page is opened) is not set as visited (as it hasn't been clicked yet). So when the user clicks a second tab, the default is marked as ...
TITLE: Setting default tab as visited QUESTION: I have some basic tabs in HTML, with CSS to change the colour once the tab has been visited. My problem is that the default tab (that is selected when the page is opened) is not set as visited (as it hasn't been clicked yet). So when the user clicks a second tab, the def...
[ "html", "css" ]
1
1
171
1
0
2011-06-06T10:23:22.960000
2011-06-06T10:27:35.750000
6,250,645
6,250,670
Remote Xml file parsing using JS/Jquery?
can i parse remote(not local) file using JS/Jquery? i want to display remote xml file in html page without using server side scripting language.
Not in a standard browser security context. If you don't mind using third party hosted server side scripting, then look into YQL.
Remote Xml file parsing using JS/Jquery? can i parse remote(not local) file using JS/Jquery? i want to display remote xml file in html page without using server side scripting language.
TITLE: Remote Xml file parsing using JS/Jquery? QUESTION: can i parse remote(not local) file using JS/Jquery? i want to display remote xml file in html page without using server side scripting language. ANSWER: Not in a standard browser security context. If you don't mind using third party hosted server side scriptin...
[ "javascript", "jquery", "xml", "html-parsing" ]
0
2
798
1
0
2011-06-06T10:23:52.273000
2011-06-06T10:26:33.647000
6,250,649
6,250,709
Javascript performance: Fastest way of building and injecting html
This is for a single page, mobile web-app.... For readability I've been concatenating my html, then injecting. I'm pretty certain there's a more efficient way, and would like to get a js expert's opinion! heres an example of one of my concatenated html strings... var html_str = ''; $.each(events_array, function(k, ev_t...
There is no "Fastest". There is only "Fastest" for a browser. There are 3 common techniques. HTML string manipulation, templating and DOM manipulation. Because templating can use both HTML string manipulation and the DOM internally I would recommend it for readability / maintainability. Here are a few benchmarks Templa...
Javascript performance: Fastest way of building and injecting html This is for a single page, mobile web-app.... For readability I've been concatenating my html, then injecting. I'm pretty certain there's a more efficient way, and would like to get a js expert's opinion! heres an example of one of my concatenated html ...
TITLE: Javascript performance: Fastest way of building and injecting html QUESTION: This is for a single page, mobile web-app.... For readability I've been concatenating my html, then injecting. I'm pretty certain there's a more efficient way, and would like to get a js expert's opinion! heres an example of one of my ...
[ "javascript", "jquery", "html", "performance" ]
2
4
2,504
5
0
2011-06-06T10:24:11.080000
2011-06-06T10:29:27.327000
6,250,653
6,250,776
Drop Mysql table column with Foreign key constraint
How to drop column with all related foreign key and other constraint in mysql?
AFAIK on MySQL you have to manually delete the constraints before dropping the column. The ON DELETE CASCADE clause would affect the table only if you created the constraint with that clause and it is only needed to delete the foreign rows connected with that table with that constraint.
Drop Mysql table column with Foreign key constraint How to drop column with all related foreign key and other constraint in mysql?
TITLE: Drop Mysql table column with Foreign key constraint QUESTION: How to drop column with all related foreign key and other constraint in mysql? ANSWER: AFAIK on MySQL you have to manually delete the constraints before dropping the column. The ON DELETE CASCADE clause would affect the table only if you created the...
[ "mysql" ]
3
2
2,758
4
0
2011-06-06T10:24:48.210000
2011-06-06T10:35:18.440000
6,250,662
6,250,722
How to decrease the size of SHA1?
I have a problem, maybe a silly question, I want to store data in a database after I hash with the SHA1 algorithm. However, at a future time, the size in database will increase because size words in SHA1 is big. Can we decrease the size of SHA1 algorithm, maybe half the size. I'm sorry for my silly question, and for my...
Is 20 bytes per hash(assuming binary storage) really too much? If you currently use hex encoding switching to binary saves you 20 bytes per hash. Base64 saves about 10 bytes compared to hex. If you simply truncate a cryptographic hash it is still a good cryptographic hash, but with a reduced output size. What output si...
How to decrease the size of SHA1? I have a problem, maybe a silly question, I want to store data in a database after I hash with the SHA1 algorithm. However, at a future time, the size in database will increase because size words in SHA1 is big. Can we decrease the size of SHA1 algorithm, maybe half the size. I'm sorry...
TITLE: How to decrease the size of SHA1? QUESTION: I have a problem, maybe a silly question, I want to store data in a database after I hash with the SHA1 algorithm. However, at a future time, the size in database will increase because size words in SHA1 is big. Can we decrease the size of SHA1 algorithm, maybe half t...
[ "java", "algorithm", "security", "sha" ]
7
12
3,033
4
0
2011-06-06T10:25:56.067000
2011-06-06T10:30:34.143000
6,250,663
6,251,374
Add comments or stars to my app in iTunes
I want to show an alert in my app so that user can either make comments or give stars to the app on iTunes. Is it possible.?
You should try the Appirater plugin for you application. This gives you the possibility to: Show a popup to rate your app after a predetermined number of sessions Create a button or link to send the user to the App Store page to rate the app. Integrating the plugin is really easy, and fully documented on the GitHub web...
Add comments or stars to my app in iTunes I want to show an alert in my app so that user can either make comments or give stars to the app on iTunes. Is it possible.?
TITLE: Add comments or stars to my app in iTunes QUESTION: I want to show an alert in my app so that user can either make comments or give stars to the app on iTunes. Is it possible.? ANSWER: You should try the Appirater plugin for you application. This gives you the possibility to: Show a popup to rate your app afte...
[ "iphone", "uialertview", "feedback" ]
2
3
173
1
0
2011-06-06T10:26:03.753000
2011-06-06T11:30:21.253000
6,250,673
6,250,715
problem with a text view
I'm reading some data like speed and curent location using a single ton class....I'm reading them using an AsyncTask thread in a loop....:)....each time I'm reading a new speed and location I'm setting them in a text view above a map. This is how a part of my code looks like: while (true) { speed = ServerManager.getIns...
You should always post UI updates on the UIThread. runOnUiThread(new Runnable() { public void run() { speed_1.setText(Integer.toString(speed)); location.setText(loc1); } }
problem with a text view I'm reading some data like speed and curent location using a single ton class....I'm reading them using an AsyncTask thread in a loop....:)....each time I'm reading a new speed and location I'm setting them in a text view above a map. This is how a part of my code looks like: while (true) { spe...
TITLE: problem with a text view QUESTION: I'm reading some data like speed and curent location using a single ton class....I'm reading them using an AsyncTask thread in a loop....:)....each time I'm reading a new speed and location I'm setting them in a text view above a map. This is how a part of my code looks like: ...
[ "android", "textview" ]
0
3
1,400
2
0
2011-06-06T10:26:47.907000
2011-06-06T10:29:54.377000
6,250,679
6,250,710
<select><option> and action associated with them
I am writing a reservation system. On the main page I would give a choice of category, viewed the equipment available for booking. For example I have code like this: A B C D E I wish that each choice was associated with a separate query to the database, and that was the result of a query dynamically displayed on the sc...
$query = mysql_query("SELECT * FROM choices"); while($row=mysql_fetch_assoc($query)) { echo ' '.$row['value'].' '; } If you need separate query for each choice the code doesns't change much: $query = mysql_query("(SELECT * FROM choices) UNION (SELECT * FROM choices1) [etc]"); while($row=mysql_fetch_assoc($query)) { ech...
<select><option> and action associated with them I am writing a reservation system. On the main page I would give a choice of category, viewed the equipment available for booking. For example I have code like this: A B C D E I wish that each choice was associated with a separate query to the database, and that was the ...
TITLE: <select><option> and action associated with them QUESTION: I am writing a reservation system. On the main page I would give a choice of category, viewed the equipment available for booking. For example I have code like this: A B C D E I wish that each choice was associated with a separate query to the database,...
[ "php", "javascript", "html", "postgresql" ]
0
0
432
3
0
2011-06-06T10:27:11.330000
2011-06-06T10:29:28.763000
6,250,682
6,251,767
Cannot Call .Net Service From C++
I have written a.NET Windows service which has a WCF service built into it. I can call this from a C# client written in Visual Studio 2010. However, I also need to call it from a MFC app written in Visual Studio 6. I have added COM Interop code to try and achieve this, created a snk file, used regasm to register it and...
Perhaps this will help. Looks way more complicated than i would have guessed:) Create WCF service for unmanaged C++ clients good luck
Cannot Call .Net Service From C++ I have written a.NET Windows service which has a WCF service built into it. I can call this from a C# client written in Visual Studio 2010. However, I also need to call it from a MFC app written in Visual Studio 6. I have added COM Interop code to try and achieve this, created a snk fi...
TITLE: Cannot Call .Net Service From C++ QUESTION: I have written a.NET Windows service which has a WCF service built into it. I can call this from a C# client written in Visual Studio 2010. However, I also need to call it from a MFC app written in Visual Studio 6. I have added COM Interop code to try and achieve this...
[ "c#", ".net", "c++", "com", "service" ]
0
0
465
2
0
2011-06-06T10:27:15.610000
2011-06-06T12:08:12.607000
6,250,685
6,250,814
How to set a custom message for a standard validator in JSF?
I created a simple input field for an int variable. I want to add validation to it but, but i see no need to create my own validator for it, since the only thing i need is to avoid negative values and characters other than numbers. So this is what i did: When i try how it works this is the result for negative values: A...
To change these values you basically have to define your own Resources file, override the properties you want custom messages for and register it in web.xml. This link seems to explain it well, so I've included this rather than try and rewrite the content. For a simpler solution and as you are JSF 2 you can also use th...
How to set a custom message for a standard validator in JSF? I created a simple input field for an int variable. I want to add validation to it but, but i see no need to create my own validator for it, since the only thing i need is to avoid negative values and characters other than numbers. So this is what i did: When...
TITLE: How to set a custom message for a standard validator in JSF? QUESTION: I created a simple input field for an int variable. I want to add validation to it but, but i see no need to create my own validator for it, since the only thing i need is to avoid negative values and characters other than numbers. So this i...
[ "java", "validation", "jsf", "jakarta-ee", "jsf-2" ]
13
27
24,912
2
0
2011-06-06T10:27:40.447000
2011-06-06T10:38:38.923000
6,250,690
6,250,739
SQL Server 2008: How to see which option is SET for a database level
I need to know a value of options ANSI_NULLS and QUOTENT_IDENTIFIER on database level. Which SQL statement may I use in order to see whether they are ON or OFF?
Care of here you can use the following to retrieve options are that on. EXEC sp_dboption TestDB
SQL Server 2008: How to see which option is SET for a database level I need to know a value of options ANSI_NULLS and QUOTENT_IDENTIFIER on database level. Which SQL statement may I use in order to see whether they are ON or OFF?
TITLE: SQL Server 2008: How to see which option is SET for a database level QUESTION: I need to know a value of options ANSI_NULLS and QUOTENT_IDENTIFIER on database level. Which SQL statement may I use in order to see whether they are ON or OFF? ANSWER: Care of here you can use the following to retrieve options are ...
[ "sql-server-2008", "settings" ]
2
1
63
2
0
2011-06-06T10:27:52.413000
2011-06-06T10:31:55.237000