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,234,487
6,234,758
ASP.net MVC Global Filtering
This is sort of a broad question, but one I am curious about. What are some examples of uses for MVC Global filters? I.E. public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); filters.Add(new CustomFilterAttribute()); } I have seen many examples of stopwatch...
Most importantly in my opinion is security. You can have security applied to everything by default using a global action filter. Global injecting of content - html or headers for example.
ASP.net MVC Global Filtering This is sort of a broad question, but one I am curious about. What are some examples of uses for MVC Global filters? I.E. public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); filters.Add(new CustomFilterAttribute()); } I have se...
TITLE: ASP.net MVC Global Filtering QUESTION: This is sort of a broad question, but one I am curious about. What are some examples of uses for MVC Global filters? I.E. public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); filters.Add(new CustomFilterAttribu...
[ "asp.net", "asp.net-mvc-3", "action-filter", "actionfilterattribute" ]
0
1
993
1
0
2011-06-04T03:23:16.970000
2011-06-04T04:47:23.260000
6,234,502
6,234,637
BasicConfigurator doesn't log stack traces by default in JUnit Tests
In running some JUnit tests I start with the following to set up Log4J: BasicConfigurator.configure() I'm then calling the following via Commons Logging: LogFactory.getLogger(this.getClass()).fatal(exception) This doesn't print stack traces though (only the exception message). I need to know what steps are necessary to...
This is nothing to do with the logger configurations. Read the javadoc for the fatal(Object) method. It says: "WARNING Note that passing a Throwable to this method will print the name of the Throwable but no stack trace. To print a stack trace use the fatal(Object, Throwable) form instead." If you want the logs to incl...
BasicConfigurator doesn't log stack traces by default in JUnit Tests In running some JUnit tests I start with the following to set up Log4J: BasicConfigurator.configure() I'm then calling the following via Commons Logging: LogFactory.getLogger(this.getClass()).fatal(exception) This doesn't print stack traces though (on...
TITLE: BasicConfigurator doesn't log stack traces by default in JUnit Tests QUESTION: In running some JUnit tests I start with the following to set up Log4J: BasicConfigurator.configure() I'm then calling the following via Commons Logging: LogFactory.getLogger(this.getClass()).fatal(exception) This doesn't print stack...
[ "java", "logging", "log4j", "apache-commons-logging" ]
2
5
526
1
0
2011-06-04T03:28:51.960000
2011-06-04T04:11:17.767000
6,234,503
6,234,548
How can I fix this bug that is causing my app to crash on other's phones, if it isn't crashing on mine, and I have no way of seeing what's going on?
In order to get my feet wet with Android development, I thought I'd hire a guy to lay the foundation of a simple app for me, then I would try and take it from there. So far it's worked really well. I've been able to learn quite a bit. One of the issues I am having though is that I keep getting crash reports about an bu...
If you look at the stack trace you see that the exception occured at line 91 in Language.java. You can tell this from the last part of the exception output: Caused by: java.lang.NullPointerException at com.elan.readerJapanese.Language.onCreate(Language.java:91) at android.app.Instrumentation.callActivityOnCreate(Instru...
How can I fix this bug that is causing my app to crash on other's phones, if it isn't crashing on mine, and I have no way of seeing what's going on? In order to get my feet wet with Android development, I thought I'd hire a guy to lay the foundation of a simple app for me, then I would try and take it from there. So fa...
TITLE: How can I fix this bug that is causing my app to crash on other's phones, if it isn't crashing on mine, and I have no way of seeing what's going on? QUESTION: In order to get my feet wet with Android development, I thought I'd hire a guy to lay the foundation of a simple app for me, then I would try and take it...
[ "android", "debugging", "nullpointerexception", "crash-reports", "oncreate" ]
0
0
291
1
0
2011-06-04T03:29:16.793000
2011-06-04T03:44:14.393000
6,234,509
6,234,535
How can I make MdiChild forms be in tabs in C#?
I have a MDIparent Forma and which has some mdichild forms in it. Can you help me some how put the mdichilds in Tabs like google chrome, firefox, IE, Opera...
There's a good article on MDI forms with TabControls here: http://www.codeproject.com/KB/cs/MDITabBrowsing.aspx
How can I make MdiChild forms be in tabs in C#? I have a MDIparent Forma and which has some mdichild forms in it. Can you help me some how put the mdichilds in Tabs like google chrome, firefox, IE, Opera...
TITLE: How can I make MdiChild forms be in tabs in C#? QUESTION: I have a MDIparent Forma and which has some mdichild forms in it. Can you help me some how put the mdichilds in Tabs like google chrome, firefox, IE, Opera... ANSWER: There's a good article on MDI forms with TabControls here: http://www.codeproject.com/...
[ "c#", "windows", "tabs", "mdichild", "mdiparent" ]
4
3
10,602
2
0
2011-06-04T03:31:21.673000
2011-06-04T03:39:18.320000
6,234,519
6,235,747
Best way to write a Mobile 6 app with Visual Studio 2010
I need to write a simple app for a Symbol MC70 scanner My device is loaded with: Microsoft Windows Mobile 6.1 Premium I have VS 2010 Premium on my desktop. When installing the Window Mobile 6 SDK I get this error: I read this article: Windows Mobile 6 Standard SDK Refresh install issue on Visual Studio 2010 Professiona...
The MC70 device does not support wm7 and vs2010 does not support wm6 development. The only current solution I'm aware off is to develop with vs2008.
Best way to write a Mobile 6 app with Visual Studio 2010 I need to write a simple app for a Symbol MC70 scanner My device is loaded with: Microsoft Windows Mobile 6.1 Premium I have VS 2010 Premium on my desktop. When installing the Window Mobile 6 SDK I get this error: I read this article: Windows Mobile 6 Standard SD...
TITLE: Best way to write a Mobile 6 app with Visual Studio 2010 QUESTION: I need to write a simple app for a Symbol MC70 scanner My device is loaded with: Microsoft Windows Mobile 6.1 Premium I have VS 2010 Premium on my desktop. When installing the Window Mobile 6 SDK I get this error: I read this article: Windows Mo...
[ "mobile", "windows-mobile", "windows-mobile-6", "windows-mobile-6.1" ]
3
5
3,488
2
0
2011-06-04T03:35:34.677000
2011-06-04T08:52:35.123000
6,234,526
6,234,619
Dropping MKMapView into Interface Builder
I'm using XCode 4 and I just created a subclass of UIViewController, status bar enabled (grey), and dropped in a MKMapView. My UIView has x,y and w,h of (0,20) / (320,460) Then I click on my MKMapView and it has coordinates of: (0,0) / (320, 460) Is there a reason that IB doesn't resize itself so the MKMapView will tak...
If you add any subview inside a view(container), then that container is the world for that subview, and it'll have co-ordinate according to that. That's why your map view have coordinate(0,0).
Dropping MKMapView into Interface Builder I'm using XCode 4 and I just created a subclass of UIViewController, status bar enabled (grey), and dropped in a MKMapView. My UIView has x,y and w,h of (0,20) / (320,460) Then I click on my MKMapView and it has coordinates of: (0,0) / (320, 460) Is there a reason that IB doesn...
TITLE: Dropping MKMapView into Interface Builder QUESTION: I'm using XCode 4 and I just created a subclass of UIViewController, status bar enabled (grey), and dropped in a MKMapView. My UIView has x,y and w,h of (0,20) / (320,460) Then I click on my MKMapView and it has coordinates of: (0,0) / (320, 460) Is there a re...
[ "iphone", "interface-builder", "mkmapview" ]
0
1
456
1
0
2011-06-04T03:37:34.640000
2011-06-04T04:06:08.717000
6,234,530
6,234,577
Problems with JTable and JScrollpane size
I have a JScrollPane with a JTable in it. In the JTable I have initially 3 rows. Later on rows get added. The default JTable with my 3 rows is ugly because JScrollPane calls getPreferredScrollableViewportSize from the client ( JTable ) and the return value is always the same. That's why my JTable / JScrollpane with 3 r...
The BoxLayout allows the component to grow up to the maximum size of the component. I guess you need to override the getMaximumSize() of the scrollpane to return the preferred size. When a row gets added I have the command "((JComponent) scrollPane.getParent()).revalidate();" The scrollpane grows with the jtable. That ...
Problems with JTable and JScrollpane size I have a JScrollPane with a JTable in it. In the JTable I have initially 3 rows. Later on rows get added. The default JTable with my 3 rows is ugly because JScrollPane calls getPreferredScrollableViewportSize from the client ( JTable ) and the return value is always the same. T...
TITLE: Problems with JTable and JScrollpane size QUESTION: I have a JScrollPane with a JTable in it. In the JTable I have initially 3 rows. Later on rows get added. The default JTable with my 3 rows is ugly because JScrollPane calls getPreferredScrollableViewportSize from the client ( JTable ) and the return value is ...
[ "java", "swing", "jtable" ]
3
2
18,038
2
0
2011-06-04T03:38:22.587000
2011-06-04T03:54:04.613000
6,234,536
6,234,559
What does PHP assignment operator do?
I happens to read this http://code.google.com/speed/articles/optimizing-php.html It claims that this code $description = strip_tags($_POST['description']); echo $description; should be optimized as below echo strip_tags($_POST['description']); However, in my understanding, assignment operation in PHP is not necessarily...
should be optimized as below It's only a good idea if you don't need to store it, thereby avoiding unnecessary memory consumption. However, if you need to output the same thing again later, it's better to store it in a variable to avoid a another function call. Is that correct? Yes. It's called copy-on-write.
What does PHP assignment operator do? I happens to read this http://code.google.com/speed/articles/optimizing-php.html It claims that this code $description = strip_tags($_POST['description']); echo $description; should be optimized as below echo strip_tags($_POST['description']); However, in my understanding, assignme...
TITLE: What does PHP assignment operator do? QUESTION: I happens to read this http://code.google.com/speed/articles/optimizing-php.html It claims that this code $description = strip_tags($_POST['description']); echo $description; should be optimized as below echo strip_tags($_POST['description']); However, in my under...
[ "php", "memory" ]
6
5
137
3
0
2011-06-04T03:39:34.203000
2011-06-04T03:49:45.730000
6,234,539
6,234,551
Activity indicator not in center of the subview (which is not same size as parentview)
I am trying to center a spinner in the middle of the page using the code below. self.aSpinner.center = self.view.center; However when when I run the program, the spinner does not seem to be in the center Is there any way to fix this? EDIT: I found the problem. It's not that the spinner is not in the center, but instead...
[spinner setCenter:CGPointMake(kScreenWidth/2.0, kScreenHeight/2.0)];
Activity indicator not in center of the subview (which is not same size as parentview) I am trying to center a spinner in the middle of the page using the code below. self.aSpinner.center = self.view.center; However when when I run the program, the spinner does not seem to be in the center Is there any way to fix this?...
TITLE: Activity indicator not in center of the subview (which is not same size as parentview) QUESTION: I am trying to center a spinner in the middle of the page using the code below. self.aSpinner.center = self.view.center; However when when I run the program, the spinner does not seem to be in the center Is there an...
[ "objective-c", "cocoa-touch", "ios", "uiactivityindicatorview" ]
3
9
3,298
3
0
2011-06-04T03:40:35.357000
2011-06-04T03:44:54.710000
6,234,544
6,260,349
How to Play High resolution youtube video in iPhone?
I want to play high resolution YouTube video in my native application this video: http://www.youtube.com/v/279x-tNx_Gw&hl=de_DE&fs=1 in my application so what should i do?
try this it may help. NSString* embedHTML = [NSString stringWithFormat:@"body { background-color: transparent; color: white; } ",videourl]; //NSString* html = [NSString stringWithFormat:embedHTML]; if(webView == nil) { CGRect frame = CGRectMake(0,0,200,200); webView = [[UIWebView alloc] initWithFrame:frame]; [self.view...
How to Play High resolution youtube video in iPhone? I want to play high resolution YouTube video in my native application this video: http://www.youtube.com/v/279x-tNx_Gw&hl=de_DE&fs=1 in my application so what should i do?
TITLE: How to Play High resolution youtube video in iPhone? QUESTION: I want to play high resolution YouTube video in my native application this video: http://www.youtube.com/v/279x-tNx_Gw&hl=de_DE&fs=1 in my application so what should i do? ANSWER: try this it may help. NSString* embedHTML = [NSString stringWithForm...
[ "ios4", "mpmovieplayercontroller" ]
0
0
515
1
0
2011-06-04T03:42:33.397000
2011-06-07T03:35:04.710000
6,234,545
6,234,616
iPhone - trying to draw a line on a CALayer
I have a UIView class that I am using to have a CALayer. This layer will be used to draw lines, based on touch. This is how the class is defined: - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self == nil) { return nil; } self.layer.backgroundColor = [UIColor redColor].CGColor; self.userI...
You are conflating layers and views and using CG api when you could easily use UIKit api's. in your init method do this; - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self == nil) { return nil; } self.backgroundColor = [UIColor redColor]; // YES is the default for UIView, only UIImageVie...
iPhone - trying to draw a line on a CALayer I have a UIView class that I am using to have a CALayer. This layer will be used to draw lines, based on touch. This is how the class is defined: - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self == nil) { return nil; } self.layer.backgroundCo...
TITLE: iPhone - trying to draw a line on a CALayer QUESTION: I have a UIView class that I am using to have a CALayer. This layer will be used to draw lines, based on touch. This is how the class is defined: - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self == nil) { return nil; } self....
[ "iphone", "calayer", "quartz-graphics" ]
0
6
6,429
1
0
2011-06-04T03:42:40.643000
2011-06-04T04:04:54.333000
6,234,552
6,234,583
Show Loader Block / Image Loader whilst content is fetched
Ok not exactly ajax. But we launch a modal window, which fires up straigh away. The content of the modal fetches data from our dB and takes about 3 seconds to load, on a good connection. What I would like to do is wrap the entire content in a loader div. I think thats the correct terminology... So: < div id="main conte...
If you don't mind using a plugin for this, you might have a look at jquery-loading, which makes this whole process as easy as: $.loading({ onAjax: true, align: 'center', img: 'jquery-loading/loading.gif', mask: true }); This assumes that you're using the standard jQuery AJAX functions ( $.ajax(), $.get(), etc), which y...
Show Loader Block / Image Loader whilst content is fetched Ok not exactly ajax. But we launch a modal window, which fires up straigh away. The content of the modal fetches data from our dB and takes about 3 seconds to load, on a good connection. What I would like to do is wrap the entire content in a loader div. I thin...
TITLE: Show Loader Block / Image Loader whilst content is fetched QUESTION: Ok not exactly ajax. But we launch a modal window, which fires up straigh away. The content of the modal fetches data from our dB and takes about 3 seconds to load, on a good connection. What I would like to do is wrap the entire content in a ...
[ "javascript", "jquery", "html" ]
0
1
536
2
0
2011-06-04T03:46:06.267000
2011-06-04T03:56:57.413000
6,234,554
6,234,612
How can I remove temporary folders under Windows with R?
After a session I would like to clean up my temporary folders, like for instance d <- tempfile() dir.create(d) setwd(d) # now work and sweave and latex etc How can I remove d and its elements? file.remove fails.
Try unlink("d", recursive=TRUE). That should delete the folder and its contents.
How can I remove temporary folders under Windows with R? After a session I would like to clean up my temporary folders, like for instance d <- tempfile() dir.create(d) setwd(d) # now work and sweave and latex etc How can I remove d and its elements? file.remove fails.
TITLE: How can I remove temporary folders under Windows with R? QUESTION: After a session I would like to clean up my temporary folders, like for instance d <- tempfile() dir.create(d) setwd(d) # now work and sweave and latex etc How can I remove d and its elements? file.remove fails. ANSWER: Try unlink("d", recursiv...
[ "r", "delete-file" ]
6
7
4,751
2
0
2011-06-04T03:46:35.360000
2011-06-04T04:04:04.963000
6,234,557
6,234,576
php expression question
function createHash($string) { $check1 = $this->stringToNumber($string, 0x1505, 0x21); $check2 = $this->stringToNumber($string, 0, 0x1003F); $factor = 4; $halfFactor = $factor/2; $check1 >>= $halfFactor; $check1 = (($check1 >> $factor) & 0x3FFFFC0 ) | ($check1 & 0x3F); $check1 = (($check1 >> $factor) & 0x3FFC00 ) | (...
It's the equivalent of += for >>. >> is bitwise shift on a binary level. If an integer/byte has the value 0000 1000 performing >> 1 on it would make it's new value 0000 0100, it would slide the bits right inserting zeroes to the left. >> 2 would make it 0000 0010 etc. The effective result would be the same as dividing ...
php expression question function createHash($string) { $check1 = $this->stringToNumber($string, 0x1505, 0x21); $check2 = $this->stringToNumber($string, 0, 0x1003F); $factor = 4; $halfFactor = $factor/2; $check1 >>= $halfFactor; $check1 = (($check1 >> $factor) & 0x3FFFFC0 ) | ($check1 & 0x3F); $check1 = (($check1 >> $...
TITLE: php expression question QUESTION: function createHash($string) { $check1 = $this->stringToNumber($string, 0x1505, 0x21); $check2 = $this->stringToNumber($string, 0, 0x1003F); $factor = 4; $halfFactor = $factor/2; $check1 >>= $halfFactor; $check1 = (($check1 >> $factor) & 0x3FFFFC0 ) | ($check1 & 0x3F); $check...
[ "php" ]
2
1
66
4
0
2011-06-04T03:48:11.377000
2011-06-04T03:54:02.333000
6,234,558
6,234,564
Problem moving Wordpress site from one server to another
I moved an existing wordpress site from one server to another. But when I run it shows database connection error. In which file do we specify new database related information in Wordpress? Please let me know. Thanks!
Database configuration details are located in wp-config.php in the root Wordpress directory.
Problem moving Wordpress site from one server to another I moved an existing wordpress site from one server to another. But when I run it shows database connection error. In which file do we specify new database related information in Wordpress? Please let me know. Thanks!
TITLE: Problem moving Wordpress site from one server to another QUESTION: I moved an existing wordpress site from one server to another. But when I run it shows database connection error. In which file do we specify new database related information in Wordpress? Please let me know. Thanks! ANSWER: Database configurat...
[ "php", "wordpress" ]
1
1
134
2
0
2011-06-04T03:48:30.657000
2011-06-04T03:50:52.913000
6,234,579
6,234,602
$(document).ready(function not loading unless refreshed
I am using jQuery and the $(document).ready event. when i load in IE8 i get an error "Object doesn't support this property or method". When i refresh it works fine. Here is my code: I have the following in my head tag:
Use the jQuery library when you include it, as you are using only the $(document).ready() function. Try this code (it accomplishes the exact same thing as yours): $(document).ready(function() { $.post('loginform.php', $('#id_of_your_login_form').serialize(), function(response) { $('#loginbox').html(response); }); }); T...
$(document).ready(function not loading unless refreshed I am using jQuery and the $(document).ready event. when i load in IE8 i get an error "Object doesn't support this property or method". When i refresh it works fine. Here is my code: I have the following in my head tag:
TITLE: $(document).ready(function not loading unless refreshed QUESTION: I am using jQuery and the $(document).ready event. when i load in IE8 i get an error "Object doesn't support this property or method". When i refresh it works fine. Here is my code: I have the following in my head tag: ANSWER: Use the jQuery lib...
[ "jquery", "document-ready" ]
1
2
2,529
1
0
2011-06-04T03:55:30.160000
2011-06-04T04:01:19.970000
6,234,582
6,234,600
How can I load an external page with PHP and replace content on that page?
I'm building a PHP app that allows a user to upload an ad and preview it on specific pages of a specific website. Right now, I'm doing it by taking screenshots of the webpage, removing the ads, and placing my own s. This seems pretty stupid. What would be the best way to get the contents of a URL and replace code that ...
Load the page source into a DOMDocument object Do a search and replace using XPath on the DOMDocument object Example: strictErrorChecking = false; $dom->loadHTMLFile("http://www.example.com"); $xpath = new DOMXPath($dom); $logoImage = $xpath->query("//div[@id='header-logo']//a//img")->item(0); $logoImage->setAttribut...
How can I load an external page with PHP and replace content on that page? I'm building a PHP app that allows a user to upload an ad and preview it on specific pages of a specific website. Right now, I'm doing it by taking screenshots of the webpage, removing the ads, and placing my own s. This seems pretty stupid. Wha...
TITLE: How can I load an external page with PHP and replace content on that page? QUESTION: I'm building a PHP app that allows a user to upload an ad and preview it on specific pages of a specific website. Right now, I'm doing it by taking screenshots of the webpage, removing the ads, and placing my own s. This seems ...
[ "php" ]
1
5
2,143
2
0
2011-06-04T03:56:49.020000
2011-06-04T04:00:15.627000
6,234,584
6,241,382
My app is rejected. It access '/usr/lib/libpcap.A.dylib' What can I do to avoid it?
I submitted a simple app to the Mac OSX App Store, but it was rejected with the following explanation: "The application is creating files in, writing to, or opening for Read/Write access the following location(s): '/usr/lib/libpcap.A.dylib'" I use some carbon code such as FSMountServerVolumeSync and FSGetCatalogInfo. I...
Since the problem is due to using the airport command-line utility, if you’re targeting Mac OS X v10.6+ I suggest you use the CoreWLAN framework to obtain the SSID of the current wireless interface: #import CWInterface *wif = [CWInterface interface]; if (wif) { // There's an active WiFi connection; get its SSID NSStrin...
My app is rejected. It access '/usr/lib/libpcap.A.dylib' What can I do to avoid it? I submitted a simple app to the Mac OSX App Store, but it was rejected with the following explanation: "The application is creating files in, writing to, or opening for Read/Write access the following location(s): '/usr/lib/libpcap.A.dy...
TITLE: My app is rejected. It access '/usr/lib/libpcap.A.dylib' What can I do to avoid it? QUESTION: I submitted a simple app to the Mac OSX App Store, but it was rejected with the following explanation: "The application is creating files in, writing to, or opening for Read/Write access the following location(s): '/us...
[ "cocoa", "macos", "wifi", "appstore-approval", "ssid" ]
1
6
1,134
2
0
2011-06-04T03:57:25.510000
2011-06-05T06:34:35.383000
6,234,586
6,234,683
We need to pickle any sort of callable
Recently a question was posed regarding some Python code attempting to facilitate distributed computing through the use of pickled processes. Apparently, that functionality has historically been possible, but for security reasons the same functionality is disabled. On the second attempted at transmitting a function obj...
You could marshal the bytecode and pickle the other function things: import marshal import pickle marshaled_bytecode = marshal.dumps(your_function.func_code) # In this process, other function things are lost, so they have to be sent separated. pickled_name = pickle.dumps(your_function.func_name) pickled_arguments = pi...
We need to pickle any sort of callable Recently a question was posed regarding some Python code attempting to facilitate distributed computing through the use of pickled processes. Apparently, that functionality has historically been possible, but for security reasons the same functionality is disabled. On the second a...
TITLE: We need to pickle any sort of callable QUESTION: Recently a question was posed regarding some Python code attempting to facilitate distributed computing through the use of pickled processes. Apparently, that functionality has historically been possible, but for security reasons the same functionality is disable...
[ "python", "distributed-computing" ]
10
14
5,440
1
0
2011-06-04T03:58:07.453000
2011-06-04T04:27:20.117000
6,234,601
6,237,215
Moving Web App from Netbeans to IntelliJ 10
... I have a web app started/developed with Netbeans and would like to move it to Intellij 10, but so far can't do it. Not easily at least. I tried to go the 'Create new project with existing sources' but that doesn't seem to work very well. IntelliJ is bungling the directory structure of the project. That same project...
... checking out the project from svn did the trick. I eventually got the app running on Tomcat, but in all honesty, IntelliJ makes the whole process an ordeal compared to NetBeans. Now I remember why I stuck with NB for web dev. However if there is a better/easier way to accomplish this, please chime in. ps: once the ...
Moving Web App from Netbeans to IntelliJ 10 ... I have a web app started/developed with Netbeans and would like to move it to Intellij 10, but so far can't do it. Not easily at least. I tried to go the 'Create new project with existing sources' but that doesn't seem to work very well. IntelliJ is bungling the directory...
TITLE: Moving Web App from Netbeans to IntelliJ 10 QUESTION: ... I have a web app started/developed with Netbeans and would like to move it to Intellij 10, but so far can't do it. Not easily at least. I tried to go the 'Create new project with existing sources' but that doesn't seem to work very well. IntelliJ is bung...
[ "netbeans", "intellij-idea", "web-applications" ]
2
1
316
1
0
2011-06-04T04:00:57.290000
2011-06-04T14:14:42.320000
6,234,603
6,234,617
Ajax see the old class
I've this: $(".follow").click(function() { var element = $(this); var id = element.attr("id"); var data = "id=" + id; $.ajax({ type: "POST", url: "follow.php", data: data, success: function(result) { element.removeClass("follow"); element.addClass("unfollow"); } }); return false; }); $(".unfollow").click(function() {...
You need to use.live('click',...) instead of.click(...). The former works for all elements matching that selector, now and in the future, whereas the latter only works for elements matching the selector right now. It's not a matter of ajax "seeing" the old class, it's how the event listeners are bound. $(".follow").cli...
Ajax see the old class I've this: $(".follow").click(function() { var element = $(this); var id = element.attr("id"); var data = "id=" + id; $.ajax({ type: "POST", url: "follow.php", data: data, success: function(result) { element.removeClass("follow"); element.addClass("unfollow"); } }); return false; }); $(".unfoll...
TITLE: Ajax see the old class QUESTION: I've this: $(".follow").click(function() { var element = $(this); var id = element.attr("id"); var data = "id=" + id; $.ajax({ type: "POST", url: "follow.php", data: data, success: function(result) { element.removeClass("follow"); element.addClass("unfollow"); } }); return fals...
[ "jquery", "ajax" ]
1
2
41
1
0
2011-06-04T04:01:34.973000
2011-06-04T04:05:47
6,234,606
6,234,716
Another process and thread question
This question is related to Many processes executed by one thread and Socket server or file server implementation using multiple threads: concept not clear. I am still unclear about a few things. Now the client and server of a socket server or a file server need not be in different machines(ofcourse it can be too). The...
Some simple ground work. Your server process contains one or more threads to process requests from any number of client processes. The clients and server can be on either the same or different machines. Clients and server are "connected" by sockets which are used to send requests from the client to the server. The same...
Another process and thread question This question is related to Many processes executed by one thread and Socket server or file server implementation using multiple threads: concept not clear. I am still unclear about a few things. Now the client and server of a socket server or a file server need not be in different m...
TITLE: Another process and thread question QUESTION: This question is related to Many processes executed by one thread and Socket server or file server implementation using multiple threads: concept not clear. I am still unclear about a few things. Now the client and server of a socket server or a file server need not...
[ "c", "linux", "pthreads" ]
0
2
138
1
0
2011-06-04T04:02:12.613000
2011-06-04T04:38:09.593000
6,234,607
6,237,630
Tumblr: How to control CSS with post tagging (UPDATE: Working Method without JQuery!)
Seen this done before, am curious as to how it is done. Example can be found over at http://wordographic.info/ For example, if I tag a post blue, the bg-color of the post turns blue, etc. Anyone know how this is done? Thanks.
Found a way to do this with only HTML/CSS. Pretty simple, just add the {Tag} block to any div class wrapping the post area but make sure it's between {block:Posts} and {block:Text} etc. Now whatever you tag a post now becomes a new class. {block:Posts} {block:Text} {block:Title} {Title} {/block:Title} {Body} {/block:Te...
Tumblr: How to control CSS with post tagging (UPDATE: Working Method without JQuery!) Seen this done before, am curious as to how it is done. Example can be found over at http://wordographic.info/ For example, if I tag a post blue, the bg-color of the post turns blue, etc. Anyone know how this is done? Thanks.
TITLE: Tumblr: How to control CSS with post tagging (UPDATE: Working Method without JQuery!) QUESTION: Seen this done before, am curious as to how it is done. Example can be found over at http://wordographic.info/ For example, if I tag a post blue, the bg-color of the post turns blue, etc. Anyone know how this is done...
[ "javascript", "jquery", "css", "tumblr" ]
0
1
3,232
4
0
2011-06-04T04:02:22.850000
2011-06-04T15:31:17.283000
6,234,608
6,234,640
FancyVideo Light Box - Show on page load
I am using fancyVideo light box (http://chadly.net/demos/video-lightbox.html) to have a light box and YouTube video show when a link is clicked. See coding: Watch this funny video It is a good watch But I would now like to have the lightbox appear on page load ie so no need to click the Watch video link. Options? Ideas...
You will have to trigger the function via jQuery: //.load() waits for EVERYTHING to load. //.ready() waits for the document to be ready (i.e. not all the images have to be loaded). // Swap them and see what happens. $(document).load(function() { your_lightbox_trigger_function(); }); But that's assuming it's even possi...
FancyVideo Light Box - Show on page load I am using fancyVideo light box (http://chadly.net/demos/video-lightbox.html) to have a light box and YouTube video show when a link is clicked. See coding: Watch this funny video It is a good watch But I would now like to have the lightbox appear on page load ie so no need to c...
TITLE: FancyVideo Light Box - Show on page load QUESTION: I am using fancyVideo light box (http://chadly.net/demos/video-lightbox.html) to have a light box and YouTube video show when a link is clicked. See coding: Watch this funny video It is a good watch But I would now like to have the lightbox appear on page load ...
[ "jquery", "html", "lightbox" ]
0
0
603
1
0
2011-06-04T04:02:58.037000
2011-06-04T04:12:23.107000
6,234,618
6,248,133
With Tomcat 5.5, how can I programmatically locate a specific servlet instance or add new mappings?
I understand that this is normally not done, and I've found a number of instances of this question around the web with answers of the sort: "Your design is wrong if you need to do this." Let me explain my goal. I have a web app that at one site somehow caused one servlet's init() method to be called repeatedly. I don't...
You can create a servlet instance like any other class object. Get hold of the servlet config by overriding the method init(ServletConfig config). And create the servlet class instance as many as u want, and call init(ServletConfig config) on all those instances created.
With Tomcat 5.5, how can I programmatically locate a specific servlet instance or add new mappings? I understand that this is normally not done, and I've found a number of instances of this question around the web with answers of the sort: "Your design is wrong if you need to do this." Let me explain my goal. I have a ...
TITLE: With Tomcat 5.5, how can I programmatically locate a specific servlet instance or add new mappings? QUESTION: I understand that this is normally not done, and I've found a number of instances of this question around the web with answers of the sort: "Your design is wrong if you need to do this." Let me explain ...
[ "java", "unit-testing", "tomcat", "servlets", "tomcat5.5" ]
4
1
472
2
0
2011-06-04T04:05:59.587000
2011-06-06T05:35:27.010000
6,234,622
6,234,743
Ruby on Rails - Checking against HTTP errors in controller
Just today I've found my fbgraph implementation has started returning a 400 Bad Request error which is causing an internal server error. The controller looks like: def fb fbclient = FBGraph::Client.new(:client_id => 'ID',:secret_id => 'SECRET') @fbname = fbclient.selection.user('129220333799040').feed.info!['data'][0]....
I think that you should write some tests for this, Its hard to work with Facebooks nightmare of an API. Although if you wanted to catch this error try using that way you can catch the specific error and take some action on it in the rescue portion. begin rescue end If you want me to take a look at the docs and see what...
Ruby on Rails - Checking against HTTP errors in controller Just today I've found my fbgraph implementation has started returning a 400 Bad Request error which is causing an internal server error. The controller looks like: def fb fbclient = FBGraph::Client.new(:client_id => 'ID',:secret_id => 'SECRET') @fbname = fbclie...
TITLE: Ruby on Rails - Checking against HTTP errors in controller QUESTION: Just today I've found my fbgraph implementation has started returning a 400 Bad Request error which is causing an internal server error. The controller looks like: def fb fbclient = FBGraph::Client.new(:client_id => 'ID',:secret_id => 'SECRET'...
[ "ruby-on-rails" ]
0
1
207
1
0
2011-06-04T04:07:49.133000
2011-06-04T04:43:04.330000
6,234,630
6,236,433
activemq how to configure to work with stomp in python
I have activemq installed and running locally, but when I run the following script, I get an error: #!/usr/bin/env python import time import sys import stomp class MyListener(object): def on_error(self, headers, message): print 'received an error %s' % message def on_message(self, headers, message): print 'received a...
At first glance I'd say you are trying to connect to the wrong port. Out of the box ActiveMQ is configured to use OpenWire protocol on port 61616, and Stomp is not enabled. You need to check your ActiveMQ configuration file and ensure that the Stomp transport is enabled, the standard port we use is 61613 for Stomp. See...
activemq how to configure to work with stomp in python I have activemq installed and running locally, but when I run the following script, I get an error: #!/usr/bin/env python import time import sys import stomp class MyListener(object): def on_error(self, headers, message): print 'received an error %s' % message de...
TITLE: activemq how to configure to work with stomp in python QUESTION: I have activemq installed and running locally, but when I run the following script, I get an error: #!/usr/bin/env python import time import sys import stomp class MyListener(object): def on_error(self, headers, message): print 'received an erro...
[ "python", "activemq-classic", "stomp" ]
7
6
10,662
3
0
2011-06-04T04:09:49.877000
2011-06-04T11:20:05.650000
6,234,641
6,234,670
Could not instantiate bean class
I am trying to interact hibernate with spring in my GWT project, below is my code public class MyWebServiceImpl extends RemoteServiceServlet implements MyWebService { public void myfirstmethod() { // TODO Auto-generated method stub } public String signIn(String userid, String password) { ApplicationContext ctx = new...
You are missing slf4j in your classpath as indicated by java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory Get it and add to application.
Could not instantiate bean class I am trying to interact hibernate with spring in my GWT project, below is my code public class MyWebServiceImpl extends RemoteServiceServlet implements MyWebService { public void myfirstmethod() { // TODO Auto-generated method stub } public String signIn(String userid, String passwor...
TITLE: Could not instantiate bean class QUESTION: I am trying to interact hibernate with spring in my GWT project, below is my code public class MyWebServiceImpl extends RemoteServiceServlet implements MyWebService { public void myfirstmethod() { // TODO Auto-generated method stub } public String signIn(String user...
[ "hibernate", "spring" ]
0
1
9,584
2
0
2011-06-04T04:12:44.303000
2011-06-04T04:23:17.247000
6,234,644
6,234,659
Full Column height with footer and header height subtracted
I have what appears to be a fairly common problem. I have a portion of a website that needs to be full-height if the content is less than able to fill the screen. The design is fixed-width...so height is my only concern. I have tried height:100%, in CSS and the min-height for Mozilla. When I do this, it works, except m...
You, sir, are talking about a sticky footer. It sits at the bottom of the screen when the page isn't long enough to push it down, but it slides along with the content when the content is long enough. To implement it, your site needs to have this sort of construction:......... Basically, wrap everything except the foote...
Full Column height with footer and header height subtracted I have what appears to be a fairly common problem. I have a portion of a website that needs to be full-height if the content is less than able to fill the screen. The design is fixed-width...so height is my only concern. I have tried height:100%, in CSS and th...
TITLE: Full Column height with footer and header height subtracted QUESTION: I have what appears to be a fairly common problem. I have a portion of a website that needs to be full-height if the content is less than able to fill the screen. The design is fixed-width...so height is my only concern. I have tried height:1...
[ "javascript", "html", "css" ]
1
1
252
1
0
2011-06-04T04:13:37.367000
2011-06-04T04:19:01.983000
6,234,652
6,234,673
How to compute minimal but fast linear regressions on each column of a response matrix?
I want to compute ordinary least square ( OLS ) estimates in R without using "lm", and this for several reasons. First, "lm" also computes lots of stuff I don't need (such as the fitted values) considering that data size is an issue in my case. Second, I want to be able to implement OLS myself in R before doing it in a...
Have a look at the fastLm() function in the RcppArmadillo package on CRAN. There is also a similar fastLm() in RcppGSL which preceded this -- but you probably want the Armadillo -based solution. I have some slides in older presentations (on HPC with R) that show the speed gains. Also note the hint in the help page abou...
How to compute minimal but fast linear regressions on each column of a response matrix? I want to compute ordinary least square ( OLS ) estimates in R without using "lm", and this for several reasons. First, "lm" also computes lots of stuff I don't need (such as the fitted values) considering that data size is an issue...
TITLE: How to compute minimal but fast linear regressions on each column of a response matrix? QUESTION: I want to compute ordinary least square ( OLS ) estimates in R without using "lm", and this for several reasons. First, "lm" also computes lots of stuff I don't need (such as the fitted values) considering that dat...
[ "algorithm", "r", "optimization", "linear-regression", "least-squares" ]
4
7
4,582
2
0
2011-06-04T04:17:14.223000
2011-06-04T04:24:06.233000
6,234,654
6,247,750
Can't display downloaded image in <canvas> in Firefox
I'm writing a web application using a element. For simplicity, I have stripped it down to the bare essentials needed to show the problem: http://demo.kuehldesign.net/imagetest/ On Safari and Chrome (Mac), the test.png image which is drawn on the canvas always shows, even when it was not previously downloaded. For some ...
Setting image.src = image.src after adding the onload event handler fixed the problem.
Can't display downloaded image in <canvas> in Firefox I'm writing a web application using a element. For simplicity, I have stripped it down to the bare essentials needed to show the problem: http://demo.kuehldesign.net/imagetest/ On Safari and Chrome (Mac), the test.png image which is drawn on the canvas always shows,...
TITLE: Can't display downloaded image in <canvas> in Firefox QUESTION: I'm writing a web application using a element. For simplicity, I have stripped it down to the bare essentials needed to show the problem: http://demo.kuehldesign.net/imagetest/ On Safari and Chrome (Mac), the test.png image which is drawn on the ca...
[ "firefox", "html", "canvas", "firefox4" ]
1
0
998
2
0
2011-06-04T04:17:33.223000
2011-06-06T04:28:02.213000
6,234,657
6,234,679
Jquery plugin. Combobox. Event onChange
I have a problem with this plugin http://jquery.sanchezsalvador.com/jquery/page/jquerycombobox.aspx On my page there are a few select boxes, which transformed by jquery.combobox. As far as it's transformed, it has different html like this I read documentation about events in this plugin. I wanna listen to onChange even...
On the last line, try allsels.onChange = function () {...}; I find this documentation confusing, personally: usage: var elementJQ = $("#id").combobox(); elementJQ.combobox.onChange = function(){}; or $("#id").combobox().onChange = function(){}; So the return result of $('#id').combobox() is a combobox object... with a ...
Jquery plugin. Combobox. Event onChange I have a problem with this plugin http://jquery.sanchezsalvador.com/jquery/page/jquerycombobox.aspx On my page there are a few select boxes, which transformed by jquery.combobox. As far as it's transformed, it has different html like this I read documentation about events in this...
TITLE: Jquery plugin. Combobox. Event onChange QUESTION: I have a problem with this plugin http://jquery.sanchezsalvador.com/jquery/page/jquerycombobox.aspx On my page there are a few select boxes, which transformed by jquery.combobox. As far as it's transformed, it has different html like this I read documentation ab...
[ "jquery", "plugins", "combobox", "onchange", "listen" ]
0
0
1,948
2
0
2011-06-04T04:18:25.750000
2011-06-04T04:26:04.400000
6,234,666
6,234,875
Android Repo init failed
I think i follow instruction from this site very carefully http://source.android.com/source/downloading.html but when i try this repo init -u https://android.googlesource.com/platform/manifest i got the following error. repo init -u https://android.googlesource.com/platform/manifest -b froyo /root/bin/repo: line 1: syn...
Check your repo file. Sometimes the server would return a "server loading too high" page instead of giving you the repo script. In this case, you have to download your repo file again. Alternativly, you can get the source of repo from git: git clone https://android.googlesource.com/tools/repo
Android Repo init failed I think i follow instruction from this site very carefully http://source.android.com/source/downloading.html but when i try this repo init -u https://android.googlesource.com/platform/manifest i got the following error. repo init -u https://android.googlesource.com/platform/manifest -b froyo /r...
TITLE: Android Repo init failed QUESTION: I think i follow instruction from this site very carefully http://source.android.com/source/downloading.html but when i try this repo init -u https://android.googlesource.com/platform/manifest i got the following error. repo init -u https://android.googlesource.com/platform/ma...
[ "android", "git", "ubuntu", "repository", "android-source" ]
14
17
25,719
1
0
2011-06-04T04:21:57.200000
2011-06-04T05:16:13.403000
6,234,667
6,234,714
Round Up/down with Rule Using Math Function only?
Some Math people please help, I want to convert using only Math. Function. (Pow, Floor......etc) with only single statement as possile, not using if else to check if the 5fifth digits after decimals from 1-4 or 6-9. i want to convert 5 digits after decimal to 5 digits after decimal with the following rules, alway 5 and...
For rule #1: var y = (int)((x - 0.00001) * 20000) / 20000.0 + 0.00005; Result: 1.23450 => 1.23450 1.23451 => 1.23455 1.23452 => 1.23455 1.23453 => 1.23455 1.23454 => 1.23455 1.23455 => 1.23455 1.23456 => 1.23460 1.23457 => 1.23460 1.23458 => 1.23460 1.23459 => 1.23460 1.23460 => 1.23460 For rule #2: var y = (int)(x * 2...
Round Up/down with Rule Using Math Function only? Some Math people please help, I want to convert using only Math. Function. (Pow, Floor......etc) with only single statement as possile, not using if else to check if the 5fifth digits after decimals from 1-4 or 6-9. i want to convert 5 digits after decimal to 5 digits a...
TITLE: Round Up/down with Rule Using Math Function only? QUESTION: Some Math people please help, I want to convert using only Math. Function. (Pow, Floor......etc) with only single statement as possile, not using if else to check if the 5fifth digits after decimals from 1-4 or 6-9. i want to convert 5 digits after dec...
[ "c#", ".net", "math" ]
3
3
596
2
0
2011-06-04T04:21:59.127000
2011-06-04T04:37:28.720000
6,234,672
6,234,722
What to learn first, SQLite or SQL?
I'll be using SQLite in C++ so i decided to learn it first. But still my question is, Are SQL commands pretty much like SQLite or Should I learn it before SQLite?
I'd recommend learning standard SQL before SQLite's version of SQL. SQLite allows a lot of things (such as automatic type conversions and incomplete GROUP BY clauses) that a lot of databases don't allow. Also, everything in SQLite is stored as a string but that's not the case for other versions of SQL. Most of your SQL...
What to learn first, SQLite or SQL? I'll be using SQLite in C++ so i decided to learn it first. But still my question is, Are SQL commands pretty much like SQLite or Should I learn it before SQLite?
TITLE: What to learn first, SQLite or SQL? QUESTION: I'll be using SQLite in C++ so i decided to learn it first. But still my question is, Are SQL commands pretty much like SQLite or Should I learn it before SQLite? ANSWER: I'd recommend learning standard SQL before SQLite's version of SQL. SQLite allows a lot of thi...
[ "sql", "sqlite" ]
4
9
4,082
2
0
2011-06-04T04:23:31.593000
2011-06-04T04:38:43.207000
6,234,681
6,234,689
Detecting if user has entered contest on html site
I have a soccer website that will have 6 little buttons that when clicked it will go through a random array and tell the user has won something, or not. What would be the best way to prevent the user from clicking several times until the user won. For example some kind of javascript to detect the users ip and check if ...
JavaScript can't detect your IP address. That is done when the webserver serves content to the browser. You'd have to implement that functionality serverside (via PHP, etc.) and submit a POST request via JavaScript (AJAX) when the person clicks the button. If the person with that IP has submitted within a certain timef...
Detecting if user has entered contest on html site I have a soccer website that will have 6 little buttons that when clicked it will go through a random array and tell the user has won something, or not. What would be the best way to prevent the user from clicking several times until the user won. For example some kind...
TITLE: Detecting if user has entered contest on html site QUESTION: I have a soccer website that will have 6 little buttons that when clicked it will go through a random array and tell the user has won something, or not. What would be the best way to prevent the user from clicking several times until the user won. For...
[ "javascript", "html" ]
1
5
88
3
0
2011-06-04T04:26:40.530000
2011-06-04T04:29:21.030000
6,234,692
6,234,712
why is there a SIGFPE?
for some reason, it used to work. but now i get a SIGFPE.....what's wrong? #include "usefunc.h" long factorial(long num) { if (num > 1) { long counter; long fact = 1; for (counter = num; counter > 0; counter--) fact *= counter; return fact; } else return 0; } long combinations(long n, long k) { return (factorial(n)) ...
your factorial returns 0, which then can cause a divide-by-0 error. shouldn't it be returning 1? jcomeau@intrepid:/tmp$ cat test.c; make test;./test #include int main() { return printf("%f\n", 1L / 0); } cc test.c -o test test.c: In function ‘main’: test.c:3: warning: division by zero Floating point exception
why is there a SIGFPE? for some reason, it used to work. but now i get a SIGFPE.....what's wrong? #include "usefunc.h" long factorial(long num) { if (num > 1) { long counter; long fact = 1; for (counter = num; counter > 0; counter--) fact *= counter; return fact; } else return 0; } long combinations(long n, long k) {...
TITLE: why is there a SIGFPE? QUESTION: for some reason, it used to work. but now i get a SIGFPE.....what's wrong? #include "usefunc.h" long factorial(long num) { if (num > 1) { long counter; long fact = 1; for (counter = num; counter > 0; counter--) fact *= counter; return fact; } else return 0; } long combinations...
[ "c", "signals", "pascals-triangle", "sigfpe" ]
4
8
15,620
2
0
2011-06-04T04:29:53.307000
2011-06-04T04:36:57.940000
6,234,696
6,234,706
PHP Splitting an Array into two arrays - keys array and values array
Is there an easy way to split an array into two arrays, one consisting of all the keys and the other consisting of all the values? This would be a reverse to the action of array_combine. Is there an inbuilt function for doing such a task? Let's use an example array: $array = array('Tiger' => 'Forest', 'Hippo' => 'River...
There are two functions called array_keys and array_values: $array_keys = array_keys($array); $array_values = array_values($array);
PHP Splitting an Array into two arrays - keys array and values array Is there an easy way to split an array into two arrays, one consisting of all the keys and the other consisting of all the values? This would be a reverse to the action of array_combine. Is there an inbuilt function for doing such a task? Let's use an...
TITLE: PHP Splitting an Array into two arrays - keys array and values array QUESTION: Is there an easy way to split an array into two arrays, one consisting of all the keys and the other consisting of all the values? This would be a reverse to the action of array_combine. Is there an inbuilt function for doing such a ...
[ "php", "arrays" ]
21
40
35,395
6
0
2011-06-04T04:32:36.460000
2011-06-04T04:34:55.487000
6,234,698
6,234,744
how to show numbers in the default keyboard initially for UITextField
In my iPhone application I have an address line 1 field. I have assigned the default keyboard to that. But most likely line 1 field will start with apartment number. I want to know how to show numbers in the default keyboard initially for this field.
You may want to use UIKeyboardTypeNumbersAndPunctuation instead, since the user can then go back to the alphabetical keyboard (by pressing the "ABC" button on the bottom of the keyboard) once the street number is entered. If you use the numberPad, only numbers can be entered. To do this in IB, open the Inspector and se...
how to show numbers in the default keyboard initially for UITextField In my iPhone application I have an address line 1 field. I have assigned the default keyboard to that. But most likely line 1 field will start with apartment number. I want to know how to show numbers in the default keyboard initially for this field.
TITLE: how to show numbers in the default keyboard initially for UITextField QUESTION: In my iPhone application I have an address line 1 field. I have assigned the default keyboard to that. But most likely line 1 field will start with apartment number. I want to know how to show numbers in the default keyboard initial...
[ "iphone", "keyboard", "numbers", "uitextfield" ]
9
18
11,158
3
0
2011-06-04T04:33:13.837000
2011-06-04T04:44:09.693000
6,234,701
6,236,264
How to Block Symbols without evaluating them?
Suppose I have a list of names of Symbol s: f1:= Print["f1 is evaluated!"]; list = {"f1", "f2"}; The obvious way to Block these Symbol s leads to evaluation of them: In[19]:= With[{list=Symbol/@list},Block[list,f1//ToString]] During evaluation of In[19]:= f1 is evaluated! During evaluation of In[19]:= f1 is evaluated! ...
Here is yet another technique to do this: SetAttributes[blockAlt,HoldRest]; blockAlt[s: {__String}, body_]:= Replace[Join @@ ToHeldExpression[s], Hold[x__]:> Block[{x}, body]] We save here on pure functions, due to the disruptive nature of rules (they don't respect other scoping constructs, including themselves) EDIT Y...
How to Block Symbols without evaluating them? Suppose I have a list of names of Symbol s: f1:= Print["f1 is evaluated!"]; list = {"f1", "f2"}; The obvious way to Block these Symbol s leads to evaluation of them: In[19]:= With[{list=Symbol/@list},Block[list,f1//ToString]] During evaluation of In[19]:= f1 is evaluated! D...
TITLE: How to Block Symbols without evaluating them? QUESTION: Suppose I have a list of names of Symbol s: f1:= Print["f1 is evaluated!"]; list = {"f1", "f2"}; The obvious way to Block these Symbol s leads to evaluation of them: In[19]:= With[{list=Symbol/@list},Block[list,f1//ToString]] During evaluation of In[19]:= ...
[ "wolfram-mathematica" ]
13
11
1,961
4
0
2011-06-04T04:34:03.140000
2011-06-04T10:46:28.993000
6,234,711
6,234,760
What are the specific differences between an "emulator" and a "virtual machine"?
I see that they are different things but I really can't tell why. Some people say: "emulators are for games; virtual machines are for operating systems" I don't agree with this answers because there are emulators for platforms other than videogame consoles (AMIGA (?) ) Can you help me please?
Virtual machines make use of CPU self-virtualization, to whatever extent it exists, to provide a virtualized interface to the real hardware. Emulators emulate hardware without relying on the CPU being able to run code directly and redirect some operations to a hypervisor controlling the virtual container. A specific x8...
What are the specific differences between an "emulator" and a "virtual machine"? I see that they are different things but I really can't tell why. Some people say: "emulators are for games; virtual machines are for operating systems" I don't agree with this answers because there are emulators for platforms other than v...
TITLE: What are the specific differences between an "emulator" and a "virtual machine"? QUESTION: I see that they are different things but I really can't tell why. Some people say: "emulators are for games; virtual machines are for operating systems" I don't agree with this answers because there are emulators for plat...
[ "emulation", "virtual-machine" ]
57
46
70,346
3
0
2011-06-04T04:36:44.570000
2011-06-04T04:47:56.033000
6,234,721
6,236,604
Fact Tables - CRM - Customer X Events
I am new in DW and I have a simple question. Imagine that I want to create a DW to analytical CRM. I have a fact table called Event and I have a dimension called Customer. The problem is. One event can have N Customers, and one Customer can be in N events. So the relation between Customer(dimension) and Events(fact) ar...
In essence a fact table is a many-to many table in between dimensions. So in your case, Event table is a dimension table. OR There is another fact table Event Participation which shares some dimensions with the Event or has the EventSequenceNumber as a degenerate dimension.
Fact Tables - CRM - Customer X Events I am new in DW and I have a simple question. Imagine that I want to create a DW to analytical CRM. I have a fact table called Event and I have a dimension called Customer. The problem is. One event can have N Customers, and one Customer can be in N events. So the relation between C...
TITLE: Fact Tables - CRM - Customer X Events QUESTION: I am new in DW and I have a simple question. Imagine that I want to create a DW to analytical CRM. I have a fact table called Event and I have a dimension called Customer. The problem is. One event can have N Customers, and one Customer can be in N events. So the ...
[ "crm", "data-warehouse", "fact" ]
0
2
621
1
0
2011-06-04T04:38:34.370000
2011-06-04T11:58:43.717000
6,234,728
6,240,635
Missing method in android.net.wifi.WifiManager
On the site androidjavadoc.com, a method startScanActive is listed in the class WifiManager that makes it possible to perform an active wi-fi scan. It has been discussed here recently, too. Nevertheless, when I try to use that method in Eclipse, it is not found (undefined). startScan is. I tried that with all android.j...
Here goes my own explanation, based on the cited resources: The function is not contained in the Android SDK. In the source code, it is marked with the Javadoc tag @hide ( source ), which causes it to be excluded from the documentation but also not to be compiled for the SDK. For testing purposes, an own jar file may b...
Missing method in android.net.wifi.WifiManager On the site androidjavadoc.com, a method startScanActive is listed in the class WifiManager that makes it possible to perform an active wi-fi scan. It has been discussed here recently, too. Nevertheless, when I try to use that method in Eclipse, it is not found (undefined)...
TITLE: Missing method in android.net.wifi.WifiManager QUESTION: On the site androidjavadoc.com, a method startScanActive is listed in the class WifiManager that makes it possible to perform an active wi-fi scan. It has been discussed here recently, too. Nevertheless, when I try to use that method in Eclipse, it is not...
[ "android", "wifi", "wifimanager" ]
4
2
3,380
3
0
2011-06-04T04:39:30.837000
2011-06-05T02:21:35.050000
6,234,732
6,234,738
Questions about php unset function
I am having questions about unset How to unset all variables.should i use unset($var1,$var2,$var3,...) or any other easy method exists? unseting the variables at the end of functions is good practice?.any difference! unseting the variable is will reduce programming execution time or not? Thanks
You mean unset($var1,$var2,$var3,...) isn't easy enough for you? There's no point to doing so explicitly since local variables will always disappear at the end of a function's scope. This applies to reference variables too, only the references local to the function will disappear, but whatever they reference, if outsid...
Questions about php unset function I am having questions about unset How to unset all variables.should i use unset($var1,$var2,$var3,...) or any other easy method exists? unseting the variables at the end of functions is good practice?.any difference! unseting the variable is will reduce programming execution time or n...
TITLE: Questions about php unset function QUESTION: I am having questions about unset How to unset all variables.should i use unset($var1,$var2,$var3,...) or any other easy method exists? unseting the variables at the end of functions is good practice?.any difference! unseting the variable is will reduce programming e...
[ "php", "function", "unset" ]
3
5
1,604
3
0
2011-06-04T04:40:10.937000
2011-06-04T04:41:56.740000
6,234,733
6,234,776
Using calendar to determine AM or PM dates
Using the calendar class to determine AM or PM times. Calendar c = Calendar.getInstance(); int seconds = c.get(Calendar.SECOND); int minutes = c.get(Calendar.MINUTE); int hours = c.get(Calendar.HOUR); int years = c.get(Calendar.YEAR); int months = 1 + c.get(Calendar.MONTH); int days = c.get(Calendar.DAY_OF_MONTH); int ...
It is normal. Because the index of the Calendar.MONTH starts from 0. So that why you need +1 to get the correct Month.
Using calendar to determine AM or PM dates Using the calendar class to determine AM or PM times. Calendar c = Calendar.getInstance(); int seconds = c.get(Calendar.SECOND); int minutes = c.get(Calendar.MINUTE); int hours = c.get(Calendar.HOUR); int years = c.get(Calendar.YEAR); int months = 1 + c.get(Calendar.MONTH); in...
TITLE: Using calendar to determine AM or PM dates QUESTION: Using the calendar class to determine AM or PM times. Calendar c = Calendar.getInstance(); int seconds = c.get(Calendar.SECOND); int minutes = c.get(Calendar.MINUTE); int hours = c.get(Calendar.HOUR); int years = c.get(Calendar.YEAR); int months = 1 + c.get(C...
[ "android", "class", "calendar" ]
11
9
27,207
4
0
2011-06-04T04:41:07.930000
2011-06-04T04:51:45.263000
6,234,735
6,234,771
Try catch in a final statement?
I am have an asp.net mvc 3 site and when a person edits a task it locks that task so they can edit it and ensure another subscriber does not delete or update the task while they are editing it. They click edit on the task and it goes and grabs the task and locks it. They edit the task and update. now I have something l...
From the situation you don't seem to be getting much benifit from running commit statement in finally again. You can do something like this to deal with db only exception like this: public Task Update(Task task) { isLocked = true; try { //DO OTHER STUFF HERE } catch(Exception ex) { // error logging here } finally { Upd...
Try catch in a final statement? I am have an asp.net mvc 3 site and when a person edits a task it locks that task so they can edit it and ensure another subscriber does not delete or update the task while they are editing it. They click edit on the task and it goes and grabs the task and locks it. They edit the task an...
TITLE: Try catch in a final statement? QUESTION: I am have an asp.net mvc 3 site and when a person edits a task it locks that task so they can edit it and ensure another subscriber does not delete or update the task while they are editing it. They click edit on the task and it goes and grabs the task and locks it. The...
[ "c#", "try-catch" ]
2
2
527
2
0
2011-06-04T04:41:21.833000
2011-06-04T04:50:52.780000
6,234,737
6,234,750
Error when printing results of SELECT FROM WHERE with PHP variable
EDIT: I had a typo in my original post....the issue is a bit more complicated...i had a variable passed in not a raw string. I want to print out stories from a mysql database that are specific to a certain person: so i have code that is similar to: $stuff ="jamie" $query = "SELECT * FROM person_stories WHERE person =$s...
You didn't put single quotes around jamie. Try this: $query = "SELECT * FROM person_stories WHERE person = 'jamie'" Edit: I see the post has been edited. It should now change from this: $stuff ="jamie" $query = "SELECT * FROM person_stories WHERE person =$stuff"; to something like this: $stuff ="jamie" $query = "SELECT...
Error when printing results of SELECT FROM WHERE with PHP variable EDIT: I had a typo in my original post....the issue is a bit more complicated...i had a variable passed in not a raw string. I want to print out stories from a mysql database that are specific to a certain person: so i have code that is similar to: $stu...
TITLE: Error when printing results of SELECT FROM WHERE with PHP variable QUESTION: EDIT: I had a typo in my original post....the issue is a bit more complicated...i had a variable passed in not a raw string. I want to print out stories from a mysql database that are specific to a certain person: so i have code that i...
[ "php", "mysql" ]
1
4
412
4
0
2011-06-04T04:41:32.690000
2011-06-04T04:45:26.270000
6,234,739
6,234,859
C# - how to marshal an array of LPWSTR?
I am trying to marshal a c++ struct that looks like the following: typedef struct _SOME_STRUCT { DWORD count; LPWSTR *items; } "items" is an array of LPWSTR's (the exact number is indicated by "count"). In C# I am representing the struct as: [StructLayoutAttribute(LayoutKind.Sequential)] internal struct SOME_STRUCT { i...
LPWSTR is a 'wide' string, i.e., Unicode. PtrToStringUni will probably work better for you. Also, IntPtr does have the + operator overloaded, you should be able to do IntPtr ptr = mystruct.items + (IntPtr.Size * x)
C# - how to marshal an array of LPWSTR? I am trying to marshal a c++ struct that looks like the following: typedef struct _SOME_STRUCT { DWORD count; LPWSTR *items; } "items" is an array of LPWSTR's (the exact number is indicated by "count"). In C# I am representing the struct as: [StructLayoutAttribute(LayoutKind.Sequ...
TITLE: C# - how to marshal an array of LPWSTR? QUESTION: I am trying to marshal a c++ struct that looks like the following: typedef struct _SOME_STRUCT { DWORD count; LPWSTR *items; } "items" is an array of LPWSTR's (the exact number is indicated by "count"). In C# I am representing the struct as: [StructLayoutAttribu...
[ "c#", "arrays", "string", "marshalling" ]
3
5
1,879
1
0
2011-06-04T04:42:24.990000
2011-06-04T05:11:49.043000
6,234,755
6,234,767
Does #ifdef (or other Preprocessor Directives) Work for Function Declarations (to Test for Function Existence)?
Why doesn’t the following code work as expected? void foobar(int); #ifndef foobar printf("foobar exists"); #endif It always prints the message; it obviously cannot detect the existence of a function as an entity. (Is it an over-loading issue?) Why can’t #ifdef (or its variants) detect function declarations? Declaratio...
Declarations should be available at pre-processing, so it should work, shouldn’t it? The pre-processor operates before the compilation (hence the "pre") so there are no compiled symbols at that point, just text and text expansion. The pre-procesor and the compiler are distinctly separate and work independantly of each ...
Does #ifdef (or other Preprocessor Directives) Work for Function Declarations (to Test for Function Existence)? Why doesn’t the following code work as expected? void foobar(int); #ifndef foobar printf("foobar exists"); #endif It always prints the message; it obviously cannot detect the existence of a function as an en...
TITLE: Does #ifdef (or other Preprocessor Directives) Work for Function Declarations (to Test for Function Existence)? QUESTION: Why doesn’t the following code work as expected? void foobar(int); #ifndef foobar printf("foobar exists"); #endif It always prints the message; it obviously cannot detect the existence of a...
[ "c", "c-preprocessor", "declaration" ]
6
9
12,585
2
0
2011-06-04T04:46:42.923000
2011-06-04T04:49:54.827000
6,234,756
6,234,956
java string function need help
System.out.println(s.toString().substring(0,s.indexOf(".mp3"))); i am downloading file from android application.. i need to name them as 1 2 3 like that.. so.. i'll need to do is increment the max size of it so i've done the System.out.println(s.toString().substring(0,s.indexOf(".mp3"))); from this it will give me 1 2 ...
Well, you could parse each filename (e.g. using Integer.parseInt ). Alternatively, if you knew you'd have less than (say) 100,000 files, you could format the filenames in a sortable fashion to start with - so instead of 141.mp3, you'd have 00141.mp3. That way you could just sort all the filenames and parse the last one...
java string function need help System.out.println(s.toString().substring(0,s.indexOf(".mp3"))); i am downloading file from android application.. i need to name them as 1 2 3 like that.. so.. i'll need to do is increment the max size of it so i've done the System.out.println(s.toString().substring(0,s.indexOf(".mp3")));...
TITLE: java string function need help QUESTION: System.out.println(s.toString().substring(0,s.indexOf(".mp3"))); i am downloading file from android application.. i need to name them as 1 2 3 like that.. so.. i'll need to do is increment the max size of it so i've done the System.out.println(s.toString().substring(0,s....
[ "java", "string", "increment" ]
0
2
88
1
0
2011-06-04T04:46:44.180000
2011-06-04T05:31:12.543000
6,234,762
6,234,805
How Can I return second element of stack without pop() function in C++?
I need help for return second element of stack without pop()? but I don't know how can I use. my code: stack st; st.push(10); st.push(20); st.top(); // return 20 How do can I make this function is return 10 without pop(); Thanks. P.S. sorry for my English.
I presume you're trying to emulate a stack-based machine? Here's the only way to do it with std::stack: stack st; st.push(10); st.push(20); int top = st.top(); // return 20 st.pop(); int second = st.top(); // return 10 st.push(top); If you want other behavior you'll have to do your own implementation of stack that has ...
How Can I return second element of stack without pop() function in C++? I need help for return second element of stack without pop()? but I don't know how can I use. my code: stack st; st.push(10); st.push(20); st.top(); // return 20 How do can I make this function is return 10 without pop(); Thanks. P.S. sorry for my ...
TITLE: How Can I return second element of stack without pop() function in C++? QUESTION: I need help for return second element of stack without pop()? but I don't know how can I use. my code: stack st; st.push(10); st.push(20); st.top(); // return 20 How do can I make this function is return 10 without pop(); Thanks. ...
[ "c++", "data-structures", "stack" ]
6
9
16,673
4
0
2011-06-04T04:48:22.330000
2011-06-04T05:00:55.677000
6,234,765
6,234,830
Dynamic Twitter Follow button
So, I've been testing out Twitter's new Follow buttons, and while browsing ZDNet.com, I noticed that in their author bios, they have follow buttons for each author. Interestingly, the button would change according to who the author was. Here is an example: http://www.zdnet.com/blog/btl/sony-predicts-32-billion-loss-fol...
Instead of the_author() use get_the_author(). the_author() prints the name, latter returns the name.
Dynamic Twitter Follow button So, I've been testing out Twitter's new Follow buttons, and while browsing ZDNet.com, I noticed that in their author bios, they have follow buttons for each author. Interestingly, the button would change according to who the author was. Here is an example: http://www.zdnet.com/blog/btl/son...
TITLE: Dynamic Twitter Follow button QUESTION: So, I've been testing out Twitter's new Follow buttons, and while browsing ZDNet.com, I noticed that in their author bios, they have follow buttons for each author. Interestingly, the button would change according to who the author was. Here is an example: http://www.zdne...
[ "php", "wordpress", "button", "twitter" ]
0
2
1,523
1
0
2011-06-04T04:49:17.643000
2011-06-04T05:06:40.730000
6,234,768
6,234,845
Ruby on Rails API that functions similar to WCF does on ASP.NET
Is there an API similar to WCF for Ruby on Rails? WCF has a lot of advantages and is a very easy method to have a service running and clients using it. I want to know if there is an API similar to WCF for the Ruby on Rails platform
Ruby on Rails uses RESTful web services by default, and you can easily generate routes and controller actions for these "out of the box". Like WCF, Rails supports both JSON and XML formats for data transfer. If you need to support SOAP, there are Rails ad-ons, such as savon. ian.
Ruby on Rails API that functions similar to WCF does on ASP.NET Is there an API similar to WCF for Ruby on Rails? WCF has a lot of advantages and is a very easy method to have a service running and clients using it. I want to know if there is an API similar to WCF for the Ruby on Rails platform
TITLE: Ruby on Rails API that functions similar to WCF does on ASP.NET QUESTION: Is there an API similar to WCF for Ruby on Rails? WCF has a lot of advantages and is a very easy method to have a service running and clients using it. I want to know if there is an API similar to WCF for the Ruby on Rails platform ANSWE...
[ "ruby-on-rails", "wcf", "api" ]
0
1
340
1
0
2011-06-04T04:50:04.757000
2011-06-04T05:09:14.210000
6,234,773
6,234,804
Can I escape HTML special chars in JavaScript?
I want to display text to HTML by a JavaScript function. How can I escape HTML special characters in JavaScript? Is there an API?
Here's a solution that will work in practically every web browser: function escapeHtml(unsafe) { return unsafe.replace(/&/g, "&").replace(/ /g, ">").replace(/"/g, """).replace(/'/g, "'"); } If you only support modern web browsers (2020+), then you can use the new replaceAll function: const escapeHtml = (unsafe) => { re...
Can I escape HTML special chars in JavaScript? I want to display text to HTML by a JavaScript function. How can I escape HTML special characters in JavaScript? Is there an API?
TITLE: Can I escape HTML special chars in JavaScript? QUESTION: I want to display text to HTML by a JavaScript function. How can I escape HTML special characters in JavaScript? Is there an API? ANSWER: Here's a solution that will work in practically every web browser: function escapeHtml(unsafe) { return unsafe.repla...
[ "javascript", "html" ]
367
531
413,762
18
0
2011-06-04T04:50:58.820000
2011-06-04T05:00:43.680000
6,234,775
6,234,785
Explanation needed for missing rows with left join and count()
Can someone please help me understand the following behavior that occurs when I add a WHERE clause to a query that has a LEFT JOIN with COUNT(*)? I have two tables: TABLE 1: customers customer_id | name ------------------ 1 | Bob 2 | James 3 | Fred TABLE 2: orders order_id | customer_id | order_timestamp -------------...
This is because NULL is not greater than or equal to anything; If you change your WHERE clause to where o.order_timestamp is null or o.order_timestamp >= '2011-01-05' then you will get the same behavior as your join clause limit. Note though - I would recommend the join clause approach, as it matches more closely what ...
Explanation needed for missing rows with left join and count() Can someone please help me understand the following behavior that occurs when I add a WHERE clause to a query that has a LEFT JOIN with COUNT(*)? I have two tables: TABLE 1: customers customer_id | name ------------------ 1 | Bob 2 | James 3 | Fred TABLE 2...
TITLE: Explanation needed for missing rows with left join and count() QUESTION: Can someone please help me understand the following behavior that occurs when I add a WHERE clause to a query that has a LEFT JOIN with COUNT(*)? I have two tables: TABLE 1: customers customer_id | name ------------------ 1 | Bob 2 | James...
[ "sql", "postgresql", "aggregate-functions" ]
13
9
24,548
3
0
2011-06-04T04:51:39.337000
2011-06-04T04:56:21.270000
6,234,778
6,234,806
configuring asp.net web.config session
I'm trying to increase the Session timeout without modifying code. Does sessionState time in web.config override the default 20 minute IIS session time? Thank you.
The IIS session timeout value is for classic.asp pages only. For ASP.NET applications, only the web.config specified timeout value applies. That means the Web.Config session settings will override over IIS settings for.aspx pages. Secondly in the ASP.NET/Framework 2.0 you get an ASP.NET tab on IIS where you can manage ...
configuring asp.net web.config session I'm trying to increase the Session timeout without modifying code. Does sessionState time in web.config override the default 20 minute IIS session time? Thank you.
TITLE: configuring asp.net web.config session QUESTION: I'm trying to increase the Session timeout without modifying code. Does sessionState time in web.config override the default 20 minute IIS session time? Thank you. ANSWER: The IIS session timeout value is for classic.asp pages only. For ASP.NET applications, onl...
[ "asp.net", "iis", "session", "web-config" ]
3
1
556
2
0
2011-06-04T04:53:53.983000
2011-06-04T05:01:09.240000
6,234,781
6,234,872
Is Try/Finally actually exception-safe?
Let's say you have a piece of code like: resource = allocateResource(); try { /* dangerous code here */ } finally { free(resource); } I'm not referring to any specific language here, but I guess Java, C#, and C++ would be good examples (assuming you're using __try / __finally in MSVC++). Is this exception-safe? Persona...
I'm not asking about allocateResource throwing an exception, but a situation in which you get an exception after that function has returned, but before resource is assigned. It gets very messy to try to handle this aspect of exception safety, not least because the language constructs don't allow you to install your fin...
Is Try/Finally actually exception-safe? Let's say you have a piece of code like: resource = allocateResource(); try { /* dangerous code here */ } finally { free(resource); } I'm not referring to any specific language here, but I guess Java, C#, and C++ would be good examples (assuming you're using __try / __finally in ...
TITLE: Is Try/Finally actually exception-safe? QUESTION: Let's say you have a piece of code like: resource = allocateResource(); try { /* dangerous code here */ } finally { free(resource); } I'm not referring to any specific language here, but I guess Java, C#, and C++ would be good examples (assuming you're using __t...
[ "c#", "java", "visual-c++", "exception", "exception-safe" ]
1
6
681
7
0
2011-06-04T04:55:23.870000
2011-06-04T05:15:27.820000
6,234,790
6,234,923
How to move tabs within the Microsoft Tab control?
I have an old app with a tab control (says SSTab in properties, says Microsoft Tab ActiveX Control Version 6.0). It has 10 tabs with a multitude of controls on them. I need to add a new tab, but it needs to be the 2nd from the left. However, the new tab will only show up in the right-most position and I don't see a pro...
I'm pretty sure there's no way to do what you want to do with the SSTab. Maybe you can copy each tab's controls in a container (like a PictureBox?) and copy these containers from tab to tab to simulate positioning tabs. You can edit the tabs' captions through the TabCaption property.
How to move tabs within the Microsoft Tab control? I have an old app with a tab control (says SSTab in properties, says Microsoft Tab ActiveX Control Version 6.0). It has 10 tabs with a multitude of controls on them. I need to add a new tab, but it needs to be the 2nd from the left. However, the new tab will only show ...
TITLE: How to move tabs within the Microsoft Tab control? QUESTION: I have an old app with a tab control (says SSTab in properties, says Microsoft Tab ActiveX Control Version 6.0). It has 10 tabs with a multitude of controls on them. I need to add a new tab, but it needs to be the 2nd from the left. However, the new t...
[ "vb6", "tabcontrol" ]
3
3
2,527
2
0
2011-06-04T04:57:31.067000
2011-06-04T05:24:43.320000
6,234,817
6,234,906
Large static data member, inheritance, and performance
I'm not too sure how to ask this question. I need to store a ton of data into a vector at the beginning of the program, but only once. I tried putting that vector, my_vect, inside a constructor in a base class to load all the data into it, but the problem is, that data needs to be used by the derived classes that will ...
Why do you need to inherit from the singleton to use the data it provides? You can make a singleton as the data provider, and make the other classes use it to access the data. In fact, you don't even need a singleton. Just make an ordinary class with a static field and a static method to initialize the field. Then call...
Large static data member, inheritance, and performance I'm not too sure how to ask this question. I need to store a ton of data into a vector at the beginning of the program, but only once. I tried putting that vector, my_vect, inside a constructor in a base class to load all the data into it, but the problem is, that ...
TITLE: Large static data member, inheritance, and performance QUESTION: I'm not too sure how to ask this question. I need to store a ton of data into a vector at the beginning of the program, but only once. I tried putting that vector, my_vect, inside a constructor in a base class to load all the data into it, but the...
[ "c++" ]
2
2
1,827
3
0
2011-06-04T05:03:14.070000
2011-06-04T05:20:40.637000
6,234,819
6,236,691
Regex/CTFG in F#/.net
I would like to know how to do regex, or context free grammers in F#. I have some experience with F#, (I've never seen/used Active patterns, (it was explictly left out of the course i did for timecontraints)) and I've done alittle regex in python, and also regex and grammers from a descrete mathematics point of view. I...
The MSDN documentation for regex isn't so clear to me me. For the simple case of whether a string matches a regex, it couldn't be easier: open System.Text.RegularExpressions let r = Regex("^a*$") r.IsMatch("a") > val it: bool = true r.IsMatch("b") > val it: bool = false Replace a* with the desired regex. Note that you ...
Regex/CTFG in F#/.net I would like to know how to do regex, or context free grammers in F#. I have some experience with F#, (I've never seen/used Active patterns, (it was explictly left out of the course i did for timecontraints)) and I've done alittle regex in python, and also regex and grammers from a descrete mathem...
TITLE: Regex/CTFG in F#/.net QUESTION: I would like to know how to do regex, or context free grammers in F#. I have some experience with F#, (I've never seen/used Active patterns, (it was explictly left out of the course i did for timecontraints)) and I've done alittle regex in python, and also regex and grammers from...
[ "regex", "f#", "context-free-grammar" ]
2
3
422
5
0
2011-06-04T05:03:15.223000
2011-06-04T12:15:57.117000
6,234,823
6,238,077
AS3 - Objects on stage unintentionally disappear
We are making a simple Flash game intended for mobile phones via Flash 5.5 using ActionScript 3.0. We are animating an array of objects vertically until they hit another object at the top of the stage. We instantiate each element of the array with one of 10 MovieClip animations. Each object has two event listeners; one...
I don't see anywhere in that code where objects are instantiated. Instead what I see are already instantiated objects being moved into place. I'm guessing what's happening is that you only have 10 objects instantiated in the first place, so when you try to dispatch a "new" one what you are actually doing is taking an e...
AS3 - Objects on stage unintentionally disappear We are making a simple Flash game intended for mobile phones via Flash 5.5 using ActionScript 3.0. We are animating an array of objects vertically until they hit another object at the top of the stage. We instantiate each element of the array with one of 10 MovieClip ani...
TITLE: AS3 - Objects on stage unintentionally disappear QUESTION: We are making a simple Flash game intended for mobile phones via Flash 5.5 using ActionScript 3.0. We are animating an array of objects vertically until they hit another object at the top of the stage. We instantiate each element of the array with one o...
[ "flash", "actionscript-3", "memory-management", "garbage-collection", "movieclip" ]
1
1
2,083
2
0
2011-06-04T05:03:40.950000
2011-06-04T16:53:37.470000
6,234,826
6,234,837
iPhone: Strange leak
Ok the below problem is solved but now its creating leak for this block NSMutableArray *tempRowArray=[[NSMutableArray alloc] init]; [tempRowArray addObject:[NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 1)]]; [pickerList addObject:tempRowArray]; [tempRowArray release]; for tempRowArray ah...
Every time the view appears you allocate pickerList. Allocate it in viewDidLoad and then release it in viewDidUnload.
iPhone: Strange leak Ok the below problem is solved but now its creating leak for this block NSMutableArray *tempRowArray=[[NSMutableArray alloc] init]; [tempRowArray addObject:[NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 1)]]; [pickerList addObject:tempRowArray]; [tempRowArray release]...
TITLE: iPhone: Strange leak QUESTION: Ok the below problem is solved but now its creating leak for this block NSMutableArray *tempRowArray=[[NSMutableArray alloc] init]; [tempRowArray addObject:[NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 1)]]; [pickerList addObject:tempRowArray]; [tem...
[ "iphone", "memory-leaks" ]
0
4
170
3
0
2011-06-04T05:05:02.437000
2011-06-04T05:07:48.107000
6,234,827
6,234,843
WordPress - Where would I put custom classes and database calls?
I'm working on a WordPress CMS site and I want to add my own classes that make my own calls tot he WordPress database. Where would be the ideal place to put these so they are easily accessible? I'm guessing it would go either in wp-content or wp-includes but I don't know which. Thank you
You should put them in your template folder, in the functions.php file.
WordPress - Where would I put custom classes and database calls? I'm working on a WordPress CMS site and I want to add my own classes that make my own calls tot he WordPress database. Where would be the ideal place to put these so they are easily accessible? I'm guessing it would go either in wp-content or wp-includes ...
TITLE: WordPress - Where would I put custom classes and database calls? QUESTION: I'm working on a WordPress CMS site and I want to add my own classes that make my own calls tot he WordPress database. Where would be the ideal place to put these so they are easily accessible? I'm guessing it would go either in wp-conte...
[ "php", "wordpress" ]
1
3
1,126
1
0
2011-06-04T05:05:15.950000
2011-06-04T05:08:52.280000
6,234,828
6,235,125
Map Select for Conditional Query in Mathematica
Using the following list, list = {{a, b, c, d}, {1, 2, 3, 4}, {5, 6, 7, 8}}; Is it possible to select the lists where the second value is >3. Desired Output below {5, 6, 7, 8} adjusting the following code that currently extract all the values >2 in a list Select[#, # > 2 &] & /@ list[[2;;] Sophisticated solutions for q...
Alternatively, using Select Select[list, #[[2]] > 3 &] Output {{5, 6, 7, 8}}
Map Select for Conditional Query in Mathematica Using the following list, list = {{a, b, c, d}, {1, 2, 3, 4}, {5, 6, 7, 8}}; Is it possible to select the lists where the second value is >3. Desired Output below {5, 6, 7, 8} adjusting the following code that currently extract all the values >2 in a list Select[#, # > 2 ...
TITLE: Map Select for Conditional Query in Mathematica QUESTION: Using the following list, list = {{a, b, c, d}, {1, 2, 3, 4}, {5, 6, 7, 8}}; Is it possible to select the lists where the second value is >3. Desired Output below {5, 6, 7, 8} adjusting the following code that currently extract all the values >2 in a lis...
[ "dictionary", "select", "wolfram-mathematica" ]
4
7
1,889
5
0
2011-06-04T05:06:01.627000
2011-06-04T06:18:27.613000
6,234,832
6,234,965
Code Igniter: Efficient means of setting & passing common meta data to views
I'm new to CI and would like to make loading of views, navigation & meta data done in an efficient way. I've just done the homepage and came up with the following: class Home extends Controller { function index() { // specify extra bits such as page title, section, extra js to load $extra = array( 'title' => 'Funky Boo...
There's nothing wrong with the way you're handling it, but I will offer my opinion: Set some defaults instead of redefining those variables for every time you load a template. You could use a base controller, but since we only need these for the Template library it's better to set them in either the class itself, or in...
Code Igniter: Efficient means of setting & passing common meta data to views I'm new to CI and would like to make loading of views, navigation & meta data done in an efficient way. I've just done the homepage and came up with the following: class Home extends Controller { function index() { // specify extra bits such ...
TITLE: Code Igniter: Efficient means of setting & passing common meta data to views QUESTION: I'm new to CI and would like to make loading of views, navigation & meta data done in an efficient way. I've just done the homepage and came up with the following: class Home extends Controller { function index() { // specif...
[ "codeigniter" ]
1
2
427
1
0
2011-06-04T05:06:53.033000
2011-06-04T05:33:13.400000
6,234,835
6,234,850
Hide and show div using Jquery
I am trying to hide a div which is easily done with hide function in jquery. But it is not working.The div is <%= Html.RadioButton("antivirusAlertType", 0, antivirusAlertType == AntivirusAlertType.AlertMe? true: false)%> Alert Me <%= Html.RadioButton("antivirusAlertType", 0, antivirusAlertType == AntivirusAlertType.Don...
Use.toggle(). However, you need to actually bind it to some event. For example, if the HTML looked like this: Click to toggle Then in a document ready handler, $('#clickme').click(function () { $('#antivirusAlertDiv').toggle(); }); Demo: http://jsfiddle.net/mattball/rPYLK/ N.B. you can simplify the existing code as fol...
Hide and show div using Jquery I am trying to hide a div which is easily done with hide function in jquery. But it is not working.The div is <%= Html.RadioButton("antivirusAlertType", 0, antivirusAlertType == AntivirusAlertType.AlertMe? true: false)%> Alert Me <%= Html.RadioButton("antivirusAlertType", 0, antivirusAler...
TITLE: Hide and show div using Jquery QUESTION: I am trying to hide a div which is easily done with hide function in jquery. But it is not working.The div is <%= Html.RadioButton("antivirusAlertType", 0, antivirusAlertType == AntivirusAlertType.AlertMe? true: false)%> Alert Me <%= Html.RadioButton("antivirusAlertType"...
[ "jquery" ]
1
2
1,589
1
0
2011-06-04T05:07:43.007000
2011-06-04T05:10:27.807000
6,234,838
6,235,144
MediaPlayer pause doesnt work in android
I use the following code to pause the play of an audio file. but it doesn't pause. What is wrong with the code. Any suggesstion... boolean play=false; int flag=0; mPlay.setOnClickListener(new OnClickListener() { public void onClick(View v) { mPlayer = new MediaPlayer(); if(play==false) { flag++; if(flag==1) { playAudi...
Problem lays here: mPlayer = new MediaPlayer(); You're initializing your player on every click, so what you're trying to pause is a completely new player that cannot be paused, cause it doesn't play. You must initialize the player outside of onClick method.
MediaPlayer pause doesnt work in android I use the following code to pause the play of an audio file. but it doesn't pause. What is wrong with the code. Any suggesstion... boolean play=false; int flag=0; mPlay.setOnClickListener(new OnClickListener() { public void onClick(View v) { mPlayer = new MediaPlayer(); if(play...
TITLE: MediaPlayer pause doesnt work in android QUESTION: I use the following code to pause the play of an audio file. but it doesn't pause. What is wrong with the code. Any suggesstion... boolean play=false; int flag=0; mPlay.setOnClickListener(new OnClickListener() { public void onClick(View v) { mPlayer = new Medi...
[ "android", "media-player" ]
0
6
3,643
1
0
2011-06-04T05:08:00.557000
2011-06-04T06:23:55.020000
6,234,846
6,234,878
Problem with positive lookbehind and repeating pattern
Consider the following string: ab(cd.xz) e(ab(fg).xz)) ab(hi.xz) I want to match every substring that starts after ab( and ends with z. So I've written the following Regular Expression: (?<=a.*?\().*?z This should attempt to do the following according to RegexBuddy: Assert that the regex below can be matched, with the ...
The regex is working as designed:) In the second example, the lookbehind expression matches ab(cd.xz) e(. The lookbehind match is always attempted from the start of the string onward (moving ahead if necessary), so the.*? matches more than you think. It is not (as one might expect) actually performed backwards from the...
Problem with positive lookbehind and repeating pattern Consider the following string: ab(cd.xz) e(ab(fg).xz)) ab(hi.xz) I want to match every substring that starts after ab( and ends with z. So I've written the following Regular Expression: (?<=a.*?\().*?z This should attempt to do the following according to RegexBuddy...
TITLE: Problem with positive lookbehind and repeating pattern QUESTION: Consider the following string: ab(cd.xz) e(ab(fg).xz)) ab(hi.xz) I want to match every substring that starts after ab( and ends with z. So I've written the following Regular Expression: (?<=a.*?\().*?z This should attempt to do the following accor...
[ ".net", "regex" ]
3
4
489
2
0
2011-06-04T05:09:44.987000
2011-06-04T05:16:27.817000
6,234,851
6,236,853
Android : How to use ThreadPoolExecutor to download list of tasks in sequence in Android?
In my application, i need to run set of tasks sequentially. Each task unzip file and update data to database. But am getting fallowing exception while updating data from different threads. java.lang.IllegalStateException: database not open` To prevent this, am using ThreadPoolExecutor to execute tasks sequentially so t...
Use asynctask. It itself uses threadpoolexecutor and is quite handy to use. If you want to run tasks sequentially, be sure to call the next asynctask in the predecessing asynctask's onpostexecute.
Android : How to use ThreadPoolExecutor to download list of tasks in sequence in Android? In my application, i need to run set of tasks sequentially. Each task unzip file and update data to database. But am getting fallowing exception while updating data from different threads. java.lang.IllegalStateException: database...
TITLE: Android : How to use ThreadPoolExecutor to download list of tasks in sequence in Android? QUESTION: In my application, i need to run set of tasks sequentially. Each task unzip file and update data to database. But am getting fallowing exception while updating data from different threads. java.lang.IllegalStateE...
[ "android", "threadpool" ]
0
0
2,034
3
0
2011-06-04T05:10:45.830000
2011-06-04T12:56:11.863000
6,234,855
6,235,061
get multiple values of checkbox
how can i get multiple checked box values in codeigniter with this code Keyur Ritesh Saurabh Maulik at the controller $data1 = $this->input->post('assign[]'); i do that but can't get values,where i make mistake????
Use this: $this->input->post('assign'); It will be an array, the same thing as $_POST['assign']. Example: // This assumes we know the post key is set and is an array, // but you should definitely check first foreach ($this->input->post('assign') as $key => $value) { echo "Index {$key}'s value is {$value}."; } Unfortuna...
get multiple values of checkbox how can i get multiple checked box values in codeigniter with this code Keyur Ritesh Saurabh Maulik at the controller $data1 = $this->input->post('assign[]'); i do that but can't get values,where i make mistake????
TITLE: get multiple values of checkbox QUESTION: how can i get multiple checked box values in codeigniter with this code Keyur Ritesh Saurabh Maulik at the controller $data1 = $this->input->post('assign[]'); i do that but can't get values,where i make mistake???? ANSWER: Use this: $this->input->post('assign'); It wil...
[ "php", "codeigniter" ]
9
6
18,454
3
0
2011-06-04T05:11:29.157000
2011-06-04T06:00:15.430000
6,234,857
6,238,379
Using the Properties Window to identify controls on a form
With a control selected on a form, at the very top of the Properties Window the name and type of the control are displayed, and on the dropdown menu underneath there's a list with some more controls. If I click on one of the list items, it selects that control on the form. 1) What is the proper name for this dropdown m...
I'd call it the Property Windows dropdown. It seems the controls are displayed in a hierarchical/outlined manner, although not always an intuitive one. For example, I’ll refer to a form with a Frame, a Multipage and a Commandbutton control, which I’ll call the “top-level” controls. There are two levels of control selec...
Using the Properties Window to identify controls on a form With a control selected on a form, at the very top of the Properties Window the name and type of the control are displayed, and on the dropdown menu underneath there's a list with some more controls. If I click on one of the list items, it selects that control ...
TITLE: Using the Properties Window to identify controls on a form QUESTION: With a control selected on a form, at the very top of the Properties Window the name and type of the control are displayed, and on the dropdown menu underneath there's a list with some more controls. If I click on one of the list items, it sel...
[ "vba", "excel", "userform" ]
2
2
488
2
0
2011-06-04T05:11:40.183000
2011-06-04T17:41:05.220000
6,234,863
6,235,138
Professional development-deployment strategy for a lone freelancer working on a website?
I'm a freelancer and prefer working on large projects all by my own self. Till now, I've been using FileZilla to upload the projects I work and after discovering bugs, I used to edit the file with FileZilla. I wish to use SVN ( or GIT? is it better for this particular scenario? ) to develop and deploy my projects or pu...
If you're not familiar with revision control systems, I suggest you start with Subversion to learn the basic concepts and get used to the workflow. Git is very powerful but can be a bit daunting at first if you've never worked with a SCM tool before. The easiest way to get a SVN repository running is using Apache to ac...
Professional development-deployment strategy for a lone freelancer working on a website? I'm a freelancer and prefer working on large projects all by my own self. Till now, I've been using FileZilla to upload the projects I work and after discovering bugs, I used to edit the file with FileZilla. I wish to use SVN ( or ...
TITLE: Professional development-deployment strategy for a lone freelancer working on a website? QUESTION: I'm a freelancer and prefer working on large projects all by my own self. Till now, I've been using FileZilla to upload the projects I work and after discovering bugs, I used to edit the file with FileZilla. I wis...
[ "php", "eclipse", "svn", "deployment", "project-management" ]
3
2
330
1
0
2011-06-04T05:13:22.457000
2011-06-04T06:21:47.797000
6,234,864
6,234,882
how to change php variable name in a loop?
Lets say I have a variable called $file and the for loop: for($i=1; $i <= 5; $i++) {} For each iteration of the for loop, the $i value will be appended to the $file variable name so after the for loop ends, I should have five variables: $file1, $file2, $file3, $file4, and $file5.
Use ${'varname'} syntax: for($i=1; $i <= 5; $i++) { ${'file'. $i} = $i; } However, it's often better to use arrays instead of this.
how to change php variable name in a loop? Lets say I have a variable called $file and the for loop: for($i=1; $i <= 5; $i++) {} For each iteration of the for loop, the $i value will be appended to the $file variable name so after the for loop ends, I should have five variables: $file1, $file2, $file3, $file4, and $fil...
TITLE: how to change php variable name in a loop? QUESTION: Lets say I have a variable called $file and the for loop: for($i=1; $i <= 5; $i++) {} For each iteration of the for loop, the $i value will be appended to the $file variable name so after the for loop ends, I should have five variables: $file1, $file2, $file3...
[ "php", "variables", "loops", "for-loop" ]
30
74
57,743
5
0
2011-06-04T05:13:26.403000
2011-06-04T05:17:05.030000
6,234,867
6,234,976
Use java as a linux shell script language?
I used cshell/tcshell before and than turned to python. Now I am going to integrate all my shell scripts, gui, database, webpages together. Python is good at most of works but it's relatively weak at GUI, general performance and 3rd part libraries. So I am going to try java as my main development language. Is it good a...
Java by itself may not be the greatest shell language, because of slow boot times, lack of built-in libraries to work with the operating system, commands and files (I mean, there is even no way to copy a file in Java without resorting to creating two input and output streams and piping the data, yack!). However! There ...
Use java as a linux shell script language? I used cshell/tcshell before and than turned to python. Now I am going to integrate all my shell scripts, gui, database, webpages together. Python is good at most of works but it's relatively weak at GUI, general performance and 3rd part libraries. So I am going to try java as...
TITLE: Use java as a linux shell script language? QUESTION: I used cshell/tcshell before and than turned to python. Now I am going to integrate all my shell scripts, gui, database, webpages together. Python is good at most of works but it's relatively weak at GUI, general performance and 3rd part libraries. So I am go...
[ "java", "shell" ]
3
3
1,967
4
0
2011-06-04T05:13:36.803000
2011-06-04T05:35:09.090000
6,234,870
6,235,888
git deploying project - stashing warnings
I'm using git to deploy my site, however, I'm trying to figure out why using the following script, files keep accumulating in my list of working copy. Meaning that, every different file that I commit and push to my bare repository gets listed as: M filename.php Also, I'm wondering what does the following warnings mean?...
This means your destination repo, which isn't bare (i.e. there is a.git plus a working copy checked out), isn't "clean": the " git status " would not return on that remote repo a clean status, like " nothing to commit (working directory clean) ". That is why you see stashing warning (Git tries to save the files "being ...
git deploying project - stashing warnings I'm using git to deploy my site, however, I'm trying to figure out why using the following script, files keep accumulating in my list of working copy. Meaning that, every different file that I commit and push to my bare repository gets listed as: M filename.php Also, I'm wonder...
TITLE: git deploying project - stashing warnings QUESTION: I'm using git to deploy my site, however, I'm trying to figure out why using the following script, files keep accumulating in my list of working copy. Meaning that, every different file that I commit and push to my bare repository gets listed as: M filename.ph...
[ "git", "deployment", "push" ]
2
2
110
2
0
2011-06-04T05:14:46.323000
2011-06-04T09:23:30.590000
6,234,883
6,234,952
OpenGL full screen texture brings framerate down to 12fps
I installed linux (Debian) on an old laptop and have been writing an OpenGL application with it. The framerate cruises at about 80fps when drawing a texture on a small portion of the screen. When I draw the texture on a bigger and bigger portion of the screen, the framerate drastically drops. A full-screen texture drop...
If switching from BILINEAR (GL_LINEAR) to NEAREST makes the framerate better, you are definitely running software renderer. Please do this, from the command line (this is from my OSX, but should be similar on linux): # glxinfo | grep OpenGL OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: NVIDIA GeForce...
OpenGL full screen texture brings framerate down to 12fps I installed linux (Debian) on an old laptop and have been writing an OpenGL application with it. The framerate cruises at about 80fps when drawing a texture on a small portion of the screen. When I draw the texture on a bigger and bigger portion of the screen, t...
TITLE: OpenGL full screen texture brings framerate down to 12fps QUESTION: I installed linux (Debian) on an old laptop and have been writing an OpenGL application with it. The framerate cruises at about 80fps when drawing a texture on a small portion of the screen. When I draw the texture on a bigger and bigger portio...
[ "linux", "performance", "opengl", "debian", "blit" ]
2
0
1,060
1
0
2011-06-04T05:17:10.987000
2011-06-04T05:30:47.333000
6,234,887
6,243,294
Problem with equivalence of a few things while porting encryption code from java to c#
I am trying to port the below Java code to C#, but I am having some difficulty figuring out what would be the equivalent for: SecretKey skey SecretKeySpec skey_spec IvParameterSpec iv_spec KeyPair rsaKey KeyGenerator kgen Would appreciate if some one could help me out with those... package entry; public class Encrypt ...
The closest conversion I came down to was this one, where I get the parameters using the CastleBouncy method, the random and some other things from the java code was never needed to reproduce the conversion and encryption on c# public class Encrypt { private byte[] skey; private byte[] iv; private ParametersWithIV skey...
Problem with equivalence of a few things while porting encryption code from java to c# I am trying to port the below Java code to C#, but I am having some difficulty figuring out what would be the equivalent for: SecretKey skey SecretKeySpec skey_spec IvParameterSpec iv_spec KeyPair rsaKey KeyGenerator kgen Would appre...
TITLE: Problem with equivalence of a few things while porting encryption code from java to c# QUESTION: I am trying to port the below Java code to C#, but I am having some difficulty figuring out what would be the equivalent for: SecretKey skey SecretKeySpec skey_spec IvParameterSpec iv_spec KeyPair rsaKey KeyGenerato...
[ "c#", "java", "encryption", "equivalent", "aes" ]
2
0
374
4
0
2011-06-04T05:17:34.390000
2011-06-05T13:42:00.643000
6,234,902
6,235,031
how to use the SharedPreferrence value in another activity in android app
in my app i am storing a value in Shared Preference and it gets stored successfully. Following is a piece of my code SharedPreferences prefs = getSharedPreferences( "idValue", 0 ); Editor editor = prefs.edit(); editor.putString( "idValue", chap.getid() ); editor.commit(); Log.e("Shared Pref",""+chap.getid()); Now i wan...
You can simply use SharedPreferences prefs = this.getSharedPreferences("idValue", MODE_WORLD_WRITEABLE); String idvalue = prefs.getString("idValue", ""); in any activity you need
how to use the SharedPreferrence value in another activity in android app in my app i am storing a value in Shared Preference and it gets stored successfully. Following is a piece of my code SharedPreferences prefs = getSharedPreferences( "idValue", 0 ); Editor editor = prefs.edit(); editor.putString( "idValue", chap.g...
TITLE: how to use the SharedPreferrence value in another activity in android app QUESTION: in my app i am storing a value in Shared Preference and it gets stored successfully. Following is a piece of my code SharedPreferences prefs = getSharedPreferences( "idValue", 0 ); Editor editor = prefs.edit(); editor.putString(...
[ "android", "sharedpreferences" ]
0
2
985
2
0
2011-06-04T05:20:02.867000
2011-06-04T05:51:43.480000
6,234,912
6,235,058
C++ Pass by const reference syntax
I know the topic of pass by reference vs. pass by pointer is heavily covered... Pretty sure I understood all the nuances until I read this: http://carlo17.home.xs4all.nl/cpp/const.qualifier.html which reads (in case the link goes dead) The prototype for foobar can have any of the following footprints: void foobar(TYPE)...
If TYPE is a #define for something like int*, the placement of const does matter. In that case you will get const int* or int* const depending on the placement of const. If TYPE is a typedef or a template parameter, the const will affect the whole type either way. To me this looks more like another argument against mac...
C++ Pass by const reference syntax I know the topic of pass by reference vs. pass by pointer is heavily covered... Pretty sure I understood all the nuances until I read this: http://carlo17.home.xs4all.nl/cpp/const.qualifier.html which reads (in case the link goes dead) The prototype for foobar can have any of the foll...
TITLE: C++ Pass by const reference syntax QUESTION: I know the topic of pass by reference vs. pass by pointer is heavily covered... Pretty sure I understood all the nuances until I read this: http://carlo17.home.xs4all.nl/cpp/const.qualifier.html which reads (in case the link goes dead) The prototype for foobar can ha...
[ "c++", "syntax", "reference" ]
7
9
4,063
3
0
2011-06-04T05:21:53.700000
2011-06-04T05:59:02.003000
6,234,913
6,236,315
Wrapping multiple sequences of list elements using XSL transformation (XML to XML)
I have some input long (about 3k lines) XML document, which generally looks as: someTitle multiple paragraphs... - some text - some other text multiple other paragraphs... 1. some text 2. some other text multiple other paragraphs... What I want is to wrap every scattered (I mean between paragraphs, tables, illustration...
Here is an XSLT 2.0 stylesheet: When I use Saxon 9.3 with that stylesheet and the sample input someTitle multiple paragraphs... - some text - some other text multiple other paragraphs... 1. some text 2. some other text multiple other paragraphs... I get the following output: someTitle multiple paragraphs... some text s...
Wrapping multiple sequences of list elements using XSL transformation (XML to XML) I have some input long (about 3k lines) XML document, which generally looks as: someTitle multiple paragraphs... - some text - some other text multiple other paragraphs... 1. some text 2. some other text multiple other paragraphs... What...
TITLE: Wrapping multiple sequences of list elements using XSL transformation (XML to XML) QUESTION: I have some input long (about 3k lines) XML document, which generally looks as: someTitle multiple paragraphs... - some text - some other text multiple other paragraphs... 1. some text 2. some other text multiple other ...
[ "xml", "xslt", "transformation" ]
4
3
1,617
2
0
2011-06-04T05:22:25.840000
2011-06-04T10:56:02.227000
6,234,921
6,235,008
Cant run my Executable on .Net Framework 2.0
My problem is simple I have my application which was perfectly executing under framework 2.0, but recently I upgraded my code to add few lines. ServicePointManager.DnsRefreshTimeout = 500 ServicePointManager.DefaultConnectionLimit = 100 ServicePointManager.EnableDnsRoundRobin = False ServicePointManager.MaxServicePoint...
Your problem line is ServicePointManager.SetTcpKeepAlive and is supported only in.NET 2.0 SP2 and up.
Cant run my Executable on .Net Framework 2.0 My problem is simple I have my application which was perfectly executing under framework 2.0, but recently I upgraded my code to add few lines. ServicePointManager.DnsRefreshTimeout = 500 ServicePointManager.DefaultConnectionLimit = 100 ServicePointManager.EnableDnsRoundRobi...
TITLE: Cant run my Executable on .Net Framework 2.0 QUESTION: My problem is simple I have my application which was perfectly executing under framework 2.0, but recently I upgraded my code to add few lines. ServicePointManager.DnsRefreshTimeout = 500 ServicePointManager.DefaultConnectionLimit = 100 ServicePointManager....
[ "vb.net", ".net-2.0", "httpwebrequest" ]
0
2
165
1
0
2011-06-04T05:24:28.077000
2011-06-04T05:43:50.843000
6,234,929
6,235,029
Trigger something like click() on iOS using Javascript?
I'm developing an iOS-specific version of my site, and am looking for a way to trigger a when the user taps a different image. I'm using jQuery (and can use jQuery mobile), but am open to other options, as well. I'm stuck, and have trid triggering click(), touchStart(), and tap(), and no luck this far. Does anybody kno...
According to quirksmode.com, iOS fires the click event on a tap. So couldn't you use an event listener on the (or whatever tag you're enclosing the image in) to activate the select?
Trigger something like click() on iOS using Javascript? I'm developing an iOS-specific version of my site, and am looking for a way to trigger a when the user taps a different image. I'm using jQuery (and can use jQuery mobile), but am open to other options, as well. I'm stuck, and have trid triggering click(), touchSt...
TITLE: Trigger something like click() on iOS using Javascript? QUESTION: I'm developing an iOS-specific version of my site, and am looking for a way to trigger a when the user taps a different image. I'm using jQuery (and can use jQuery mobile), but am open to other options, as well. I'm stuck, and have trid triggerin...
[ "javascript", "jquery", "ios", "jquery-mobile", "mobile-website" ]
1
0
1,326
1
0
2011-06-04T05:25:45.823000
2011-06-04T05:51:36.753000
6,234,934
6,234,950
How to retain the session id if the cookie containing the session_id is deleted?
I was reading about cookie and session's relativity, and a question prompted into my mind as How to retain the session id if the cookie containing the session_id is deleted? So guide me in this case.. Thanks In Advance...
You could store ip->session relation in a table and reference it (stored sessions database), but I would advise against that for multiple reasons (including if you log in at an internet cafe and another user on the same network accesses the page, they now "own" the other user's session). The other options is to apply S...
How to retain the session id if the cookie containing the session_id is deleted? I was reading about cookie and session's relativity, and a question prompted into my mind as How to retain the session id if the cookie containing the session_id is deleted? So guide me in this case.. Thanks In Advance...
TITLE: How to retain the session id if the cookie containing the session_id is deleted? QUESTION: I was reading about cookie and session's relativity, and a question prompted into my mind as How to retain the session id if the cookie containing the session_id is deleted? So guide me in this case.. Thanks In Advance......
[ "php", "session", "cookies", "session-cookies" ]
0
3
325
3
0
2011-06-04T05:26:23.840000
2011-06-04T05:30:23.333000
6,234,941
6,234,999
Partitioning tables in SQL Server, will it affect my software?
Do I need to update my software to support partitioned table? Does partitioning tables in SQL Server change my database table?
Refering to Partitioned Tables and Indexes in SQL Server 2005: SQL Server 2005 offers a way to easily and consistently manage large tables and indexes through partitioning, which allows you to manage subsets of your data outside of the active table. This provides simplified management, increased performance, and abstra...
Partitioning tables in SQL Server, will it affect my software? Do I need to update my software to support partitioned table? Does partitioning tables in SQL Server change my database table?
TITLE: Partitioning tables in SQL Server, will it affect my software? QUESTION: Do I need to update my software to support partitioned table? Does partitioning tables in SQL Server change my database table? ANSWER: Refering to Partitioned Tables and Indexes in SQL Server 2005: SQL Server 2005 offers a way to easily a...
[ "c#", "sql-server", "sql-server-2008", "storage", "database-partitioning" ]
0
3
839
2
0
2011-06-04T05:28:52.663000
2011-06-04T05:40:48.813000
6,234,946
6,234,990
Returning a string according to the arguments
How do I write a function: mymessage("2011-02-27", "Aravind") that will return Hello Aravind, you entered the following date: Friday February 27, 2011
Well, Rails works with a model view controller design pattern, so ideally, to do this, you would need to create code in all three components. For simplicity, i will assume that you want to do this inside a helper, and i will only write the method. First of all, take a look at how you can construct the date: ROR + Ruby ...
Returning a string according to the arguments How do I write a function: mymessage("2011-02-27", "Aravind") that will return Hello Aravind, you entered the following date: Friday February 27, 2011
TITLE: Returning a string according to the arguments QUESTION: How do I write a function: mymessage("2011-02-27", "Aravind") that will return Hello Aravind, you entered the following date: Friday February 27, 2011 ANSWER: Well, Rails works with a model view controller design pattern, so ideally, to do this, you would...
[ "ruby-on-rails", "ruby" ]
0
4
95
2
0
2011-06-04T05:29:47.327000
2011-06-04T05:38:32.710000
6,234,947
6,234,985
Disable drag and drop image to desktop from a webpage
Is there a way to disable drag and drop the image from a webpage to desktop? I know it can be done by javascript onmousedown event, but it is possible that the user might disable the javascript? So i am thinking of another way... Thanks.
I was in the same problem some days ago.. and short out my problem by these tech. 1) If you are designing your site in 's. You can do something like a transparent gif as an image overlay. Like lets say that this is your coding. I haven't tested this but it's an interesting idea. They will be copying a transparent gif i...
Disable drag and drop image to desktop from a webpage Is there a way to disable drag and drop the image from a webpage to desktop? I know it can be done by javascript onmousedown event, but it is possible that the user might disable the javascript? So i am thinking of another way... Thanks.
TITLE: Disable drag and drop image to desktop from a webpage QUESTION: Is there a way to disable drag and drop the image from a webpage to desktop? I know it can be done by javascript onmousedown event, but it is possible that the user might disable the javascript? So i am thinking of another way... Thanks. ANSWER: I...
[ "html", "drag-and-drop" ]
1
3
2,237
3
0
2011-06-04T05:29:52.783000
2011-06-04T05:37:15.220000
6,234,953
6,238,156
How to modify the URI routing for a MVC PHP site?
I'm trying rewrite an ASP.NET MVC 2 site I built using PHP/Apache for fun. I've built a basic MVC framework which serves requests. The request are executed through index.php?controller= &action= &otherstuff=123123 I'd like to be able to navigate my site by typing in /controller/action?otherstuff=123123 The webhost supp...
I think I'd recommend that you use the Query String Append / qsa directive. This means that if a query string is not passed, your rewrite will continue to work just fine. RewriteEngine On RewriteCond %{REQUEST_FILENAME}!-f RewriteCond %{REQUEST_FILENAME}!-d RewriteRule ^/([^/]+)/([^/]+)$ index.php?controller=$1&action=...
How to modify the URI routing for a MVC PHP site? I'm trying rewrite an ASP.NET MVC 2 site I built using PHP/Apache for fun. I've built a basic MVC framework which serves requests. The request are executed through index.php?controller= &action= &otherstuff=123123 I'd like to be able to navigate my site by typing in /co...
TITLE: How to modify the URI routing for a MVC PHP site? QUESTION: I'm trying rewrite an ASP.NET MVC 2 site I built using PHP/Apache for fun. I've built a basic MVC framework which serves requests. The request are executed through index.php?controller= &action= &otherstuff=123123 I'd like to be able to navigate my sit...
[ "php", "apache", "model-view-controller", "mod-rewrite", "uri" ]
1
1
900
3
0
2011-06-04T05:30:51.873000
2011-06-04T17:04:45.583000
6,234,954
6,234,991
Ant tool working problem
I installed Ant1.8 using WintAnt SetUp and in the command prompt i tried to use the ant its saying "C:\Documents and Settings\shakti>ant Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\li b\tools.jar Buildfile: build.xml does not exist! Build failed C:\Documents and Settings\shakti>" Can ...
Do you have the JDK installed as well as the JRE? You'll need the JDK installed for the compiler, I believe. At that point, change your JAVA_HOME environment variable to refer to the JDK directory instead of the JRE directory. You should be able to find tools.jar in the lib directory under JAVA_HOME. See the Ant instal...
Ant tool working problem I installed Ant1.8 using WintAnt SetUp and in the command prompt i tried to use the ant its saying "C:\Documents and Settings\shakti>ant Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\li b\tools.jar Buildfile: build.xml does not exist! Build failed C:\Documents a...
TITLE: Ant tool working problem QUESTION: I installed Ant1.8 using WintAnt SetUp and in the command prompt i tried to use the ant its saying "C:\Documents and Settings\shakti>ant Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\li b\tools.jar Buildfile: build.xml does not exist! Build fail...
[ "java", "ant" ]
0
1
100
1
0
2011-06-04T05:31:05.347000
2011-06-04T05:38:41.683000
6,234,959
6,234,981
how to clear error
How to clear the following error: Only one instance of a ScriptManager can be added to the page. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System...
Why did you add the ScriptManager two times on your page? You can only add one, and that's what the error says. Only one ScriptManager instance is allowed per page. Please remove the ScriptManager2 and it will work for you. Secondly ScriptManger should be under Form Tag. like..
how to clear error How to clear the following error: Only one instance of a ScriptManager can be added to the page. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Except...
TITLE: how to clear error QUESTION: How to clear the following error: Only one instance of a ScriptManager can be added to the page. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated i...
[ "asp.net", "ajax", "scriptmanager" ]
0
0
2,668
4
0
2011-06-04T05:31:32.657000
2011-06-04T05:35:44.857000
6,234,960
6,235,127
Error while running a windows service
I have created a windows service and I had installed it on my PC. When I click Start Service from Control Panel. Then I get the following error message. What could be wrong? Error Message in Event Viewer: Description: Service cannot be started. System.ServiceModel.EndpointNotFoundException: There was no endpoint listen...
Make sure the system you are running the service from can see the end point (the asmx address). I've tried the address myself and it works (I hope this is authenticated some how). I would be guessing this may be a firewall issue or connectivity issue for the server running the service (assuming you can confirm this ser...
Error while running a windows service I have created a windows service and I had installed it on my PC. When I click Start Service from Control Panel. Then I get the following error message. What could be wrong? Error Message in Event Viewer: Description: Service cannot be started. System.ServiceModel.EndpointNotFoundE...
TITLE: Error while running a windows service QUESTION: I have created a windows service and I had installed it on my PC. When I click Start Service from Control Panel. Then I get the following error message. What could be wrong? Error Message in Event Viewer: Description: Service cannot be started. System.ServiceModel...
[ ".net", ".net-3.5", "service", "windows-services" ]
0
1
1,260
1
0
2011-06-04T05:32:09.140000
2011-06-04T06:19:41.487000
6,234,961
6,238,168
How to print 1000 decimals places of pi value?
I would like to print e.g. 1000 or 2000 or 15000 decimals of pi value using R? Now I get only six > pi [1] 3.141593 How to achieve this?
Using the R package bc (which is available at the foregoing link, not on CRAN): > library(bc) > bc("4 * a(1)", scale = 1000) [1] "3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294...
How to print 1000 decimals places of pi value? I would like to print e.g. 1000 or 2000 or 15000 decimals of pi value using R? Now I get only six > pi [1] 3.141593 How to achieve this?
TITLE: How to print 1000 decimals places of pi value? QUESTION: I would like to print e.g. 1000 or 2000 or 15000 decimals of pi value using R? Now I get only six > pi [1] 3.141593 How to achieve this? ANSWER: Using the R package bc (which is available at the foregoing link, not on CRAN): > library(bc) > bc("4 * a(1)"...
[ "math", "r", "pi" ]
17
12
11,738
7
0
2011-06-04T05:32:18.327000
2011-06-04T17:07:21.107000
6,234,964
6,235,118
Factorial-time algorithms and P/NP
It's quite easy to see that n! grows slower than almost anything to the N power (say, 100^N) and so, if a problems is considered NP complete and one happened upon a n! algorithm that approximates the solution, one would do the Snoopy dance. I have 2 questions about this situation: Would the n! algorithm be considered a...
No. factorial time is not polynomial time. Polynomial time normally means an equation of the form O(N k ), where N = number of items being processed, and k = some constant. The important part is that the exponent is a constant -- you're multiplying N by itself some number of that's fixed -- not dependent on N itself. A...
Factorial-time algorithms and P/NP It's quite easy to see that n! grows slower than almost anything to the N power (say, 100^N) and so, if a problems is considered NP complete and one happened upon a n! algorithm that approximates the solution, one would do the Snoopy dance. I have 2 questions about this situation: Wou...
TITLE: Factorial-time algorithms and P/NP QUESTION: It's quite easy to see that n! grows slower than almost anything to the N power (say, 100^N) and so, if a problems is considered NP complete and one happened upon a n! algorithm that approximates the solution, one would do the Snoopy dance. I have 2 questions about t...
[ "algorithm", "np-complete" ]
10
42
13,100
2
0
2011-06-04T05:32:38.937000
2011-06-04T06:16:20.270000
6,234,968
6,235,740
Add as Facebook friend on click iPhone
In my app I need to implement +add as friend type button to send Facebook friend requests. And if the user is not logged in then the login dialog should appear. I searched in Google and also in Stack Overflow and one or two questions for iOS add as friend button but with no answer, so I could not get anything working.
It's as simple as having a link like this: ADD AS FRIEND So the URL to use is: http://www.facebook.com/dialog/friends/?id=FACEBOOK_PROFILE_ID&app_id=FACEBOOK_APP_ID&redirect_uri=SOME_URL And you have to replace FACEBOOK_PROFILE_ID, FACEBOOK_APP_ID, and SOME_URL by the real values. On the iPhone, I would open a UIWebVie...
Add as Facebook friend on click iPhone In my app I need to implement +add as friend type button to send Facebook friend requests. And if the user is not logged in then the login dialog should appear. I searched in Google and also in Stack Overflow and one or two questions for iOS add as friend button but with no answer...
TITLE: Add as Facebook friend on click iPhone QUESTION: In my app I need to implement +add as friend type button to send Facebook friend requests. And if the user is not logged in then the login dialog should appear. I searched in Google and also in Stack Overflow and one or two questions for iOS add as friend button ...
[ "xcode", "ios4", "iphone-sdk-3.0", "facebook" ]
2
1
1,430
1
0
2011-06-04T05:33:32.647000
2011-06-04T08:50:47.823000
6,234,993
6,237,082
What is the RESTful way to add an untitled item to a set?
Say I want to write an interface exposing the set of books a user has read. Since I want URIs to be human-readable, they'll be of the form /books/War-and-Peace. Adding a book to the set seems like a PUT operation, as it 1) creates a new resource, and 2) is idempotent, since a set cannot have duplicate elements. However...
How about? GET /BookSlug?title=War%20and%20Peace => 200 OK Content-Type: text/plain war-and-peace followed by PUT /Book/war-and-peace => 201 Created
What is the RESTful way to add an untitled item to a set? Say I want to write an interface exposing the set of books a user has read. Since I want URIs to be human-readable, they'll be of the form /books/War-and-Peace. Adding a book to the set seems like a PUT operation, as it 1) creates a new resource, and 2) is idemp...
TITLE: What is the RESTful way to add an untitled item to a set? QUESTION: Say I want to write an interface exposing the set of books a user has read. Since I want URIs to be human-readable, they'll be of the form /books/War-and-Peace. Adding a book to the set seems like a PUT operation, as it 1) creates a new resourc...
[ "http", "rest" ]
1
0
301
2
0
2011-06-04T05:39:14.003000
2011-06-04T13:45:40.813000
6,234,997
6,235,090
Possible to set a tempory ignore on a field in nhibernate(so it won't update that field on commit)
I am wondering when I get my object back(Lets say File) and I make these modifications to it. File.Name = "test"; File.Id = 1; File.Date = "6/3/2011 12:00:00 am"; File.IsLocked = false so I get back this file object but Date is not in local time. So when I get it back I right away convert it to local time. I do this ri...
If you use an interceptor class you can call convertToLocalTime() without let the programmer have to! public class TestInterceptor: EmptyInterceptor, IInterceptor { private readonly IInterceptor innerInterceptor; public TestInterceptor(IInterceptor innerInterceptor) { this.innerInterceptor = this.innerInterceptor?? ne...
Possible to set a tempory ignore on a field in nhibernate(so it won't update that field on commit) I am wondering when I get my object back(Lets say File) and I make these modifications to it. File.Name = "test"; File.Id = 1; File.Date = "6/3/2011 12:00:00 am"; File.IsLocked = false so I get back this file object but D...
TITLE: Possible to set a tempory ignore on a field in nhibernate(so it won't update that field on commit) QUESTION: I am wondering when I get my object back(Lets say File) and I make these modifications to it. File.Name = "test"; File.Id = 1; File.Date = "6/3/2011 12:00:00 am"; File.IsLocked = false so I get back this...
[ "nhibernate" ]
0
0
110
1
0
2011-06-04T05:40:33.647000
2011-06-04T06:09:20.723000
6,235,001
6,235,045
return a variable from a event listener
I have a generic function for XMLHttpRequests. as follows: function XMLRequest(address, data){ this.html = "null"; this.xml = null; this.stat = null; req = new XMLHttpRequest(); req.addEventListener('readystatechange', function(this) { console.log("from event listener, this.html = "+this.html); this.ready = req.ready...
Store the variables you need before using them, then reference them (as you'd typically do to avoid scope problems: function MyObject(){ this.publicFoo = 'BAR'; var privateFoo = 'bar'; this.CallMe = function(){ // set them as something referenceable when not within the object's scope var iSee_publicFoo = this.publicFo...
return a variable from a event listener I have a generic function for XMLHttpRequests. as follows: function XMLRequest(address, data){ this.html = "null"; this.xml = null; this.stat = null; req = new XMLHttpRequest(); req.addEventListener('readystatechange', function(this) { console.log("from event listener, this.htm...
TITLE: return a variable from a event listener QUESTION: I have a generic function for XMLHttpRequests. as follows: function XMLRequest(address, data){ this.html = "null"; this.xml = null; this.stat = null; req = new XMLHttpRequest(); req.addEventListener('readystatechange', function(this) { console.log("from event ...
[ "javascript" ]
0
2
3,176
1
0
2011-06-04T05:41:22.887000
2011-06-04T05:54:54.250000
6,235,006
6,235,078
add Webview start url to sharedpreference for webview
I'm still learning Java. I'm trying to get use SharedPreferences to set the url in my WebView, so that I can set the page that is displayed the next time the app starts up. And trying to set/change the value using a menu. Here is what I have so far: public class test extends Activity { public static final String PREFS...
Try this: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mPrefs = getSharedPreferences(PREFS_NAME, 0); webview = new WebView(this) { }; webChromeClient = new WebChromeClient() { }; webview.setWebChromeClient(webChromeClient); webview.setWebViewClient(webViewClient);...
add Webview start url to sharedpreference for webview I'm still learning Java. I'm trying to get use SharedPreferences to set the url in my WebView, so that I can set the page that is displayed the next time the app starts up. And trying to set/change the value using a menu. Here is what I have so far: public class tes...
TITLE: add Webview start url to sharedpreference for webview QUESTION: I'm still learning Java. I'm trying to get use SharedPreferences to set the url in my WebView, so that I can set the page that is displayed the next time the app starts up. And trying to set/change the value using a menu. Here is what I have so far...
[ "android", "webview", "sharedpreferences" ]
0
1
2,421
1
0
2011-06-04T05:43:41.920000
2011-06-04T06:04:41.707000
6,235,009
6,235,796
Error resolving wikipedia url with unicode character with Java URL
I'm having trouble getting wikipedia urls including unicode! Given a page title like: 1992\u201393_UE_Lleida_seasonnow Just plain url... http://en.wikipedia.org/wiki/1992 \u201393_UE_Lleida_seasonnow Using URLEncoder (set to UTF-8).... http://en.wikipedia.org/wiki/1992%5Cu201393_UE_Lleida_seasonnow When I try to resolv...
The correct URI is http://en.wikipedia.org/wiki/2009%E2%80%9310_UE_Lleida_season. Many browsers display literals instead of percent-encoded escape sequences. This is considered to be more user-friendly. However, correctly encoded URIs must use percent encoding for characters not permitted in the path part: path = path-...
Error resolving wikipedia url with unicode character with Java URL I'm having trouble getting wikipedia urls including unicode! Given a page title like: 1992\u201393_UE_Lleida_seasonnow Just plain url... http://en.wikipedia.org/wiki/1992 \u201393_UE_Lleida_seasonnow Using URLEncoder (set to UTF-8).... http://en.wikiped...
TITLE: Error resolving wikipedia url with unicode character with Java URL QUESTION: I'm having trouble getting wikipedia urls including unicode! Given a page title like: 1992\u201393_UE_Lleida_seasonnow Just plain url... http://en.wikipedia.org/wiki/1992 \u201393_UE_Lleida_seasonnow Using URLEncoder (set to UTF-8).......
[ "java", "url", "unicode", "utf-8", "wikipedia" ]
4
2
2,326
4
0
2011-06-04T05:44:10.373000
2011-06-04T09:04:34.130000
6,235,010
6,235,023
problem with a HashSet's Iterator
I'm trying to see if HashSet would be the solution for my next project so i'm doing some very easy test to check functionalities. I have a simple class Klant: public class Klant { private int klantNummer; public Klant(int nummer) { this.klantNummer = nummer; } public int getKlantNummer() { return this.klantNummer; } ...
In your class definition, you have public class MySet { That Klant is being interpreted as a type parameter for your class (just like E is for Collection or K and V are for Map ). It is overriding your actual class Klant when you subsequently use it within MySet, and since its erasure is Object (as you specified no upp...
problem with a HashSet's Iterator I'm trying to see if HashSet would be the solution for my next project so i'm doing some very easy test to check functionalities. I have a simple class Klant: public class Klant { private int klantNummer; public Klant(int nummer) { this.klantNummer = nummer; } public int getKlantNumm...
TITLE: problem with a HashSet's Iterator QUESTION: I'm trying to see if HashSet would be the solution for my next project so i'm doing some very easy test to check functionalities. I have a simple class Klant: public class Klant { private int klantNummer; public Klant(int nummer) { this.klantNummer = nummer; } publi...
[ "java", "generics", "iterator", "hashset", "downcast" ]
1
9
691
1
0
2011-06-04T05:44:51.757000
2011-06-04T05:49:54.093000
6,235,014
6,235,041
Textfield in appearing multiple times UItableViewGrouped
I found some example code of how to implement a textfield into a cell here: Having a UITextField in a UITableViewCell However the textfield appears multiple times on my table in the 1st section of the table, even though i specified it to only appear when it comes up to the 2nd section of the table and the first row of ...
Try having two different cells, one with a textField and one without. Use different CellIdentifier strings for the two different types of cells. That should resolve it.
Textfield in appearing multiple times UItableViewGrouped I found some example code of how to implement a textfield into a cell here: Having a UITextField in a UITableViewCell However the textfield appears multiple times on my table in the 1st section of the table, even though i specified it to only appear when it comes...
TITLE: Textfield in appearing multiple times UItableViewGrouped QUESTION: I found some example code of how to implement a textfield into a cell here: Having a UITextField in a UITableViewCell However the textfield appears multiple times on my table in the 1st section of the table, even though i specified it to only ap...
[ "iphone", "uitextfield", "uitableview" ]
2
3
391
3
0
2011-06-04T05:45:45.943000
2011-06-04T05:54:21.627000