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,198,463
6,198,685
how can i create a dynamic page in asp.net (C#)?
I added a page "First.aspx" in my website application. Inside First.aspx page i have a button named btnbutton. "onclick" Event of "btnbutton" a new dynamic page should open. how can i do this.? Please Remember the new dynamic page created, is not in existing in the application. This page should be created at runtime an...
If you are asking about generating ASP.NET pages at runtime, that is impossible. The reason is the following: You need to compile the code of the ASP.NET page before run it. And that is impossible after your web application has started. However, if you are asking about navigation between pages, then, you could use Resp...
how can i create a dynamic page in asp.net (C#)? I added a page "First.aspx" in my website application. Inside First.aspx page i have a button named btnbutton. "onclick" Event of "btnbutton" a new dynamic page should open. how can i do this.? Please Remember the new dynamic page created, is not in existing in the appli...
TITLE: how can i create a dynamic page in asp.net (C#)? QUESTION: I added a page "First.aspx" in my website application. Inside First.aspx page i have a button named btnbutton. "onclick" Event of "btnbutton" a new dynamic page should open. how can i do this.? Please Remember the new dynamic page created, is not in exi...
[ "c#", "asp.net" ]
4
2
15,556
2
0
2011-06-01T08:43:53.583000
2011-06-01T09:03:52.713000
6,198,476
6,198,565
can I check youtube videos on simulator using this code?
I am using this code to see youtube videos - (YouTubeView *)initWithStringAsURL:(NSString *)urlString frame:(CGRect)frame; { if (self = [super init]) { // Create webview with requested frame size self = [[UIWebView alloc] initWithFrame:frame]; // HTML to embed YouTube video NSString *youTubeVideoHTML = @" \ \ \ "; //...
You can't see Youtube video in simulator. If white webview is showing, I think your code works. Try installing on your iPhone/iPod touch.
can I check youtube videos on simulator using this code? I am using this code to see youtube videos - (YouTubeView *)initWithStringAsURL:(NSString *)urlString frame:(CGRect)frame; { if (self = [super init]) { // Create webview with requested frame size self = [[UIWebView alloc] initWithFrame:frame]; // HTML to embed Y...
TITLE: can I check youtube videos on simulator using this code? QUESTION: I am using this code to see youtube videos - (YouTubeView *)initWithStringAsURL:(NSString *)urlString frame:(CGRect)frame; { if (self = [super init]) { // Create webview with requested frame size self = [[UIWebView alloc] initWithFrame:frame]; ...
[ "iphone", "objective-c", "ios", "uiwebview", "youtube" ]
1
1
630
1
0
2011-06-01T08:44:53.120000
2011-06-01T08:53:42.807000
6,198,481
6,198,550
File upload control not working while running through IIS
This is my coding for the upload to eport to excel...it is working fine when i run through local in case while running through IIS it is not working..... This is my code.... protected void btnImport_Click(object sender, EventArgs e) { if (RevenueDumpFileUpload.HasFile) { string strFilePathOnServer = ConfigurationManage...
In fact Fileupload will work and should save the file, but there is problem in the connection string when you try to read the uploaded file. It should be the same file path as you are using to save the file. String sConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + strFilePathOnServer + RevenueDump...
File upload control not working while running through IIS This is my coding for the upload to eport to excel...it is working fine when i run through local in case while running through IIS it is not working..... This is my code.... protected void btnImport_Click(object sender, EventArgs e) { if (RevenueDumpFileUpload.H...
TITLE: File upload control not working while running through IIS QUESTION: This is my coding for the upload to eport to excel...it is working fine when i run through local in case while running through IIS it is not working..... This is my code.... protected void btnImport_Click(object sender, EventArgs e) { if (Reven...
[ "c#", "asp.net", "file-upload" ]
0
0
1,521
2
0
2011-06-01T08:45:09.003000
2011-06-01T08:52:20.543000
6,198,486
6,201,049
Can I re-use a Actionscript 3 NetConnection?
this is probably a noob question, but since I am new to Flash and AS3, here it goes... Can I somehow re-use a AS3 NetConnection? I am trying to create a AMFPHP class, that handles the connection, so I can re-use that initial connection whenever I want to make a call to a AMFPHP method. Here is my code thus far, package...
That's right, your solution is workable. One little thing what I say because you said you are are new to as3. Your function can't return with the connection object, because the return value is set to void. All the best. Tamas
Can I re-use a Actionscript 3 NetConnection? this is probably a noob question, but since I am new to Flash and AS3, here it goes... Can I somehow re-use a AS3 NetConnection? I am trying to create a AMFPHP class, that handles the connection, so I can re-use that initial connection whenever I want to make a call to a AMF...
TITLE: Can I re-use a Actionscript 3 NetConnection? QUESTION: this is probably a noob question, but since I am new to Flash and AS3, here it goes... Can I somehow re-use a AS3 NetConnection? I am trying to create a AMFPHP class, that handles the connection, so I can re-use that initial connection whenever I want to ma...
[ "flash", "actionscript-3", "amfphp" ]
3
2
405
1
0
2011-06-01T08:45:34.057000
2011-06-01T12:21:59.927000
6,198,494
6,198,626
android add contact to phone
I am trying to add a contact to the phone itself. i have the code working for adding it to say gmail or facebook account but what is the accounttype and name for phone.I did a list of all accounts and there is nothing like phone in there. thanks
If you pass null as the account's type and name, it will be stored in phone's address book. But some devices add such contacts to the first available account or to the address book if no accounts were added.
android add contact to phone I am trying to add a contact to the phone itself. i have the code working for adding it to say gmail or facebook account but what is the accounttype and name for phone.I did a list of all accounts and there is nothing like phone in there. thanks
TITLE: android add contact to phone QUESTION: I am trying to add a contact to the phone itself. i have the code working for adding it to say gmail or facebook account but what is the accounttype and name for phone.I did a list of all accounts and there is nothing like phone in there. thanks ANSWER: If you pass null a...
[ "android", "contacts" ]
1
1
1,632
2
0
2011-06-01T08:46:10.790000
2011-06-01T08:58:36.437000
6,198,496
6,198,632
writeToFile always crashes with stringByAppendingPathComponent
I am sitting on this problem for hours and I am blind now.;-) I have this code here: - (id) initWithImage:(UIImageView*)imageView andPath: (NSString*) path{ [super init]; drawImage = imageView; imageFilePath = [NSString stringWithString: path]; NSLog(@"fath: %@", imageFilePath); return self; } NSData *imageData = [NS...
The code imageFilePath = [NSString stringWithString: path]; gives you an object that you do not own, hence you cannot depend on it being available later in your code. Change this to: imageFilePath = [[NSString alloc] initWithString: path]; and you should be fine.
writeToFile always crashes with stringByAppendingPathComponent I am sitting on this problem for hours and I am blind now.;-) I have this code here: - (id) initWithImage:(UIImageView*)imageView andPath: (NSString*) path{ [super init]; drawImage = imageView; imageFilePath = [NSString stringWithString: path]; NSLog(@"fat...
TITLE: writeToFile always crashes with stringByAppendingPathComponent QUESTION: I am sitting on this problem for hours and I am blind now.;-) I have this code here: - (id) initWithImage:(UIImageView*)imageView andPath: (NSString*) path{ [super init]; drawImage = imageView; imageFilePath = [NSString stringWithString: ...
[ "iphone", "objective-c", "writetofile" ]
0
3
1,367
1
0
2011-06-01T08:46:21.547000
2011-06-01T08:59:13.987000
6,198,501
6,198,542
Generate unique pin numbers (6 digits) using current time and username + password?
I need to use current time because later on, another program will need to know when I generated the pin and whats the username and password. Summary: Username + password + current time = pin [6 digits] Reverse, generated pin, I need to know which particular, and check if its already pass 1 minute. I am not asking for d...
999999 minutes, gives ~694 days, ~1.9 years. So if you used all the entropy available just for recording the current time, you'd cycle the value in less than 2 years. And things will be much worse if you want to include the username and password, and avoid easy guessing. With 6 decimal digits, you can store about 19 bi...
Generate unique pin numbers (6 digits) using current time and username + password? I need to use current time because later on, another program will need to know when I generated the pin and whats the username and password. Summary: Username + password + current time = pin [6 digits] Reverse, generated pin, I need to k...
TITLE: Generate unique pin numbers (6 digits) using current time and username + password? QUESTION: I need to use current time because later on, another program will need to know when I generated the pin and whats the username and password. Summary: Username + password + current time = pin [6 digits] Reverse, generate...
[ "c++", "one-time-password" ]
0
5
2,797
2
0
2011-06-01T08:46:35.007000
2011-06-01T08:51:44.017000
6,198,502
6,198,627
Problem in creating url string
NSString *sttr=[[NSString alloc]init ]; NSURL *jsonURL; NSString *strurl; sttr =@"|7 Harvard Drive, Plymouth, MA, 02360, |9121 SW 174th St., Miami, FL, 33157, |7 Harvard Drive, Plymouth, MA, 02360, |"; NSLog(@"StringToSend=%@",sttr); strurl = [[NSString alloc]initWithFormat:@"http://maps.googleapis.com/maps/api/direct...
You can separate the components of the string to individual strings and then pass it to the necessary url string. Try this and see if it works NSURL *jsonURL; NSString *strurl; NSString *sourceString = @"|7 Harvard Drive, Plymouth, MA, 02360, |9121 SW 174th St."; NSString *destString = @"Miami, FL, 33157, |7 Harvard Dr...
Problem in creating url string NSString *sttr=[[NSString alloc]init ]; NSURL *jsonURL; NSString *strurl; sttr =@"|7 Harvard Drive, Plymouth, MA, 02360, |9121 SW 174th St., Miami, FL, 33157, |7 Harvard Drive, Plymouth, MA, 02360, |"; NSLog(@"StringToSend=%@",sttr); strurl = [[NSString alloc]initWithFormat:@"http://maps...
TITLE: Problem in creating url string QUESTION: NSString *sttr=[[NSString alloc]init ]; NSURL *jsonURL; NSString *strurl; sttr =@"|7 Harvard Drive, Plymouth, MA, 02360, |9121 SW 174th St., Miami, FL, 33157, |7 Harvard Drive, Plymouth, MA, 02360, |"; NSLog(@"StringToSend=%@",sttr); strurl = [[NSString alloc]initWithFo...
[ "iphone", "xcode", "url", "nsurlconnection" ]
0
1
294
4
0
2011-06-01T08:46:38.860000
2011-06-01T08:58:40.833000
6,198,506
6,198,703
deploy netbeans Java EE web project
Hi I am new to deploying web projects. I want to deploy my Java EE Netbeans project on a different remote server. I just kept the.war file in the tomcat webapp folder and it worked fine. But I could not see the images and CSS effects in the webpage. How do I bundle my images, CSS files, scripts etc. in the.war file?
If you have a Netbeans web application project there is a folder WebPages under the project node. You can for example create a folder resources (right click on WebPages --> new folder) and put all your images, css files and scripts in it. Then they are automatically included in the war. (The WebPages folder in the proj...
deploy netbeans Java EE web project Hi I am new to deploying web projects. I want to deploy my Java EE Netbeans project on a different remote server. I just kept the.war file in the tomcat webapp folder and it worked fine. But I could not see the images and CSS effects in the webpage. How do I bundle my images, CSS fil...
TITLE: deploy netbeans Java EE web project QUESTION: Hi I am new to deploying web projects. I want to deploy my Java EE Netbeans project on a different remote server. I just kept the.war file in the tomcat webapp folder and it worked fine. But I could not see the images and CSS effects in the webpage. How do I bundle ...
[ "deployment", "netbeans", "jakarta-ee" ]
0
0
2,465
2
0
2011-06-01T08:47:38.307000
2011-06-01T09:04:52.690000
6,198,507
6,198,666
Simple jQuery selector
I am trying to select the surround element when a image within the span is clicked 'remove()', but I am a little new to jQuery and can't figure out how to do it. I can't use a unique id as the element are generated dynamically. For example: Example I want to select the span when the image is clicked.
Here is an example to hide the parent element of the image: Example The trick is to use "this" and the parent()-function. Cheers, Chris
Simple jQuery selector I am trying to select the surround element when a image within the span is clicked 'remove()', but I am a little new to jQuery and can't figure out how to do it. I can't use a unique id as the element are generated dynamically. For example: Example I want to select the span when the image is clic...
TITLE: Simple jQuery selector QUESTION: I am trying to select the surround element when a image within the span is clicked 'remove()', but I am a little new to jQuery and can't figure out how to do it. I can't use a unique id as the element are generated dynamically. For example: Example I want to select the span when...
[ "jquery-selectors" ]
0
0
45
3
0
2011-06-01T08:47:50.030000
2011-06-01T09:02:06.970000
6,198,510
6,199,669
Remove from scrape
Hey all, I've successfully created a website scraper getting the top 40 from the record industry website, however one of the columns in the table I'm scraping might sometimes not be there. Basically what I need is a way to remove any instances of this from my scrape: Here's what I've got from a tutorial so far. $url = ...
Try using PHP Simple HTML DOM Parser instead of complex regex http://simplehtmldom.sourceforge.net/ require_once 'simple_html_dom.php'; $html = file_get_html('http://www.ariacharts.com.au/pages/charts_display_singles.asp?chart=1U50'); $table = $html->find('table.chartTable'); foreach ($table[0]->find('tr') as $row) {...
Remove from scrape Hey all, I've successfully created a website scraper getting the top 40 from the record industry website, however one of the columns in the table I'm scraping might sometimes not be there. Basically what I need is a way to remove any instances of this from my scrape: Here's what I've got from a tutor...
TITLE: Remove from scrape QUESTION: Hey all, I've successfully created a website scraper getting the top 40 from the record industry website, however one of the columns in the table I'm scraping might sometimes not be there. Basically what I need is a way to remove any instances of this from my scrape: Here's what I'v...
[ "php", "preg-replace", "web-scraping" ]
0
3
767
2
0
2011-06-01T08:47:58.393000
2011-06-01T10:24:16.100000
6,198,516
6,198,807
Symmetrical matrix with numpy
from random import * N = 100 gamma = 0.7 connect = zeros((N,N)) for i in range(N): for j in range(i+1): if random() < gamma: connect[i,j] = 1 connect[j,i] = 1 else: connect[i,j] = 0 connect[j,i] = 0 What I try to do is to create a symmetrical matrix, filled with zeros and ones (ones with a probability of 0.7). Here is...
You could use the numpy random module to generate random vectors, and use those vectors to seed the matrix. For example: import numpy as np N = 100 gamma = 0.7 connect = np.zeros((N,N),dtype=np.int32) for i in range(0,N): dval = np.diag((np.random.random_sample(size=(N-i)) 0): connect += dval.T does this diagonally u...
Symmetrical matrix with numpy from random import * N = 100 gamma = 0.7 connect = zeros((N,N)) for i in range(N): for j in range(i+1): if random() < gamma: connect[i,j] = 1 connect[j,i] = 1 else: connect[i,j] = 0 connect[j,i] = 0 What I try to do is to create a symmetrical matrix, filled with zeros and ones (ones with ...
TITLE: Symmetrical matrix with numpy QUESTION: from random import * N = 100 gamma = 0.7 connect = zeros((N,N)) for i in range(N): for j in range(i+1): if random() < gamma: connect[i,j] = 1 connect[j,i] = 1 else: connect[i,j] = 0 connect[j,i] = 0 What I try to do is to create a symmetrical matrix, filled with zeros an...
[ "loops", "matrix", "numpy", "symmetric" ]
1
2
1,308
1
0
2011-06-01T08:48:47.600000
2011-06-01T09:13:47.807000
6,198,518
6,198,699
Injecting an Open Generic Interface with a non Generic implementation using Castle
I have an open generic interface, which i implement with a non generic class, and i want to inject this class using castle windsor, but am struggling..... Lets say i have the following interface public interface IMyInterface { bool DoSomething(T param); } And then i have the following class that implements this interfa...
We use the fluent interface in my team so it's been a while since I've looked at the config file syntax. The basic principle is this: your service is IMyInterface and the implementing type is MyClass. So I think it would be something like this: You say you get an error. What is the error? I guess it is because you have...
Injecting an Open Generic Interface with a non Generic implementation using Castle I have an open generic interface, which i implement with a non generic class, and i want to inject this class using castle windsor, but am struggling..... Lets say i have the following interface public interface IMyInterface { bool DoSom...
TITLE: Injecting an Open Generic Interface with a non Generic implementation using Castle QUESTION: I have an open generic interface, which i implement with a non generic class, and i want to inject this class using castle windsor, but am struggling..... Lets say i have the following interface public interface IMyInte...
[ "c#", ".net", "generics", "dependency-injection", "castle-windsor" ]
2
4
896
1
0
2011-06-01T08:48:57.560000
2011-06-01T09:04:30.757000
6,198,522
6,198,569
reading classical ini file on iPhone
does anybody knows how to parse an ini file? I guess I need a regular expression or something. I have only this pattern in the file: varName=value; Thanks a lot! update: here you go: https://github.com/DrMoriarty/MetroEditor/tree/master/MetroEditor/ini
There's an INI file parser written in objective C available here - either use it directly, or read the source to pick up a few tips. EDIT: as that link appears dead, try this alternative - thanks mc007
reading classical ini file on iPhone does anybody knows how to parse an ini file? I guess I need a regular expression or something. I have only this pattern in the file: varName=value; Thanks a lot! update: here you go: https://github.com/DrMoriarty/MetroEditor/tree/master/MetroEditor/ini
TITLE: reading classical ini file on iPhone QUESTION: does anybody knows how to parse an ini file? I guess I need a regular expression or something. I have only this pattern in the file: varName=value; Thanks a lot! update: here you go: https://github.com/DrMoriarty/MetroEditor/tree/master/MetroEditor/ini ANSWER: The...
[ "iphone", "ini" ]
2
4
3,105
1
0
2011-06-01T08:49:10.633000
2011-06-01T08:54:14.290000
6,198,524
6,223,916
jqplot show labels using date axis renderer
i'm using jqplot 1.0.0b1_r746. i want to display some time periods using the date axis renderer. the chart looks like as follows: now i would like to show the begin and end date as labels of one period. i have tried to use the pointLables plugin, but with no success.
the usage point lables labels was the right approch. the label is the last element of each point, e.g. var line1=[['2008-06-30',1,'line1'], ['2008-7-30',1,'line1']]; then you have to use the point lables configuration, e.g. pointLabels: { show: true } }, see the docs for futher information: http://www.jqplot.com/docs/f...
jqplot show labels using date axis renderer i'm using jqplot 1.0.0b1_r746. i want to display some time periods using the date axis renderer. the chart looks like as follows: now i would like to show the begin and end date as labels of one period. i have tried to use the pointLables plugin, but with no success.
TITLE: jqplot show labels using date axis renderer QUESTION: i'm using jqplot 1.0.0b1_r746. i want to display some time periods using the date axis renderer. the chart looks like as follows: now i would like to show the begin and end date as labels of one period. i have tried to use the pointLables plugin, but with no...
[ "jquery", "jquery-plugins", "graph", "charts", "jqplot" ]
1
1
1,740
1
0
2011-06-01T08:49:20.063000
2011-06-03T06:50:33.863000
6,198,531
6,201,706
R + ggplot2 - Cannot allocate vector of size 128.0 Mb
I have a file of 4.5MB (9,223,136 lines) with the following information: 0 0 0.0147938 3.67598e-07 0.0226194 7.35196e-07 0.0283794 1.10279e-06 0.033576 1.47039e-06 0.0383903 1.83799e-06 0.0424806 2.20559e-06 0.0465545 2.57319e-06 0.0499759 2.94079e-06 In each column a value is represented a value from 0 to 100 meaning ...
Are you sure you have 9 million lines in a 4.5MB file ( edit: perhaps your file is 4.5 GB??)? It must be heavily compressed -- when I create a file that is one tenth the size, it's 115Mb... n <- 9e5 set.seed(1001) z <- rnorm(9e5) z <- cumsum(z)/sum(z) d <- data.frame(V1=seq(0,1,length=n),V2=z) ff <- gzfile("lgfile2.gz"...
R + ggplot2 - Cannot allocate vector of size 128.0 Mb I have a file of 4.5MB (9,223,136 lines) with the following information: 0 0 0.0147938 3.67598e-07 0.0226194 7.35196e-07 0.0283794 1.10279e-06 0.033576 1.47039e-06 0.0383903 1.83799e-06 0.0424806 2.20559e-06 0.0465545 2.57319e-06 0.0499759 2.94079e-06 In each column...
TITLE: R + ggplot2 - Cannot allocate vector of size 128.0 Mb QUESTION: I have a file of 4.5MB (9,223,136 lines) with the following information: 0 0 0.0147938 3.67598e-07 0.0226194 7.35196e-07 0.0283794 1.10279e-06 0.033576 1.47039e-06 0.0383903 1.83799e-06 0.0424806 2.20559e-06 0.0465545 2.57319e-06 0.0499759 2.94079e...
[ "r", "ggplot2" ]
3
12
4,599
1
0
2011-06-01T08:49:57.537000
2011-06-01T13:13:11.083000
6,198,547
6,200,150
How to markup a complex status indicator in HTML5?
I'm currently trying to come up with a good and accessible way to format a status indicator which should be rendered within a set of wizard-like pages on a website. The website should provide a multipage form with a status indicator on top of it as demonstrated in the wireframe below: Given the new progress -tag in HTM...
According to whatwg, you're not supposed to assign progressbar role to elements. I'd just ditch and describe progress using (surprise) phrasing content: Task Progress You're now at "Right now" step. Update: You're right, progress doesn't suit here, it's more like an interactive form widget. I should've checked first, b...
How to markup a complex status indicator in HTML5? I'm currently trying to come up with a good and accessible way to format a status indicator which should be rendered within a set of wizard-like pages on a website. The website should provide a multipage form with a status indicator on top of it as demonstrated in the ...
TITLE: How to markup a complex status indicator in HTML5? QUESTION: I'm currently trying to come up with a good and accessible way to format a status indicator which should be rendered within a set of wizard-like pages on a website. The website should provide a multipage form with a status indicator on top of it as de...
[ "html", "accessibility", "wai-aria" ]
6
2
1,800
1
0
2011-06-01T08:52:02.537000
2011-06-01T11:06:13.553000
6,198,549
6,198,783
C++ .dll files what exactly can they be used for and how to create them
i have been doing some looking at dlls. what exactly are all the uses of dlls...can they be used to store graphics? im guessing the main way to use them is to store code...or am i wrong? how do you go about creating dlls(with source and graphics? if possible). any help would be appreciated. i am using Code::Blocks ide ...
You're right, DLLs are meant for holding execution code. However they can be used to embed images, using resources in Visual C++ but I don't think it's possible with Code::Blocks. To create a DLL with Code::Blocks, simply create a new project with template "Dynamic Link Library".
C++ .dll files what exactly can they be used for and how to create them i have been doing some looking at dlls. what exactly are all the uses of dlls...can they be used to store graphics? im guessing the main way to use them is to store code...or am i wrong? how do you go about creating dlls(with source and graphics? i...
TITLE: C++ .dll files what exactly can they be used for and how to create them QUESTION: i have been doing some looking at dlls. what exactly are all the uses of dlls...can they be used to store graphics? im guessing the main way to use them is to store code...or am i wrong? how do you go about creating dlls(with sour...
[ "c++", "dll", "codeblocks" ]
0
1
3,266
2
0
2011-06-01T08:52:16.257000
2011-06-01T09:11:32.393000
6,198,552
6,198,706
Binding from Html Dom elements to json objects
I am working on a search panel, where I want to bind the data entered in these input elements to a search parameter json object. This search parameter will then be used for, you guessed it right, searching. For example, user when searching for another person and he can specify the name, age or sex of the person on the ...
I think you are confusing your terminology: presumably you mean a Javascript object. Anyway, your object or json string need to be constructed when the user clicks "Search". It will be difficult/fiddly to assign these as the user enters text into the input fields. You could use the onblur event but you're just making u...
Binding from Html Dom elements to json objects I am working on a search panel, where I want to bind the data entered in these input elements to a search parameter json object. This search parameter will then be used for, you guessed it right, searching. For example, user when searching for another person and he can spe...
TITLE: Binding from Html Dom elements to json objects QUESTION: I am working on a search panel, where I want to bind the data entered in these input elements to a search parameter json object. This search parameter will then be used for, you guessed it right, searching. For example, user when searching for another per...
[ "javascript", "jquery", "jquery-plugins" ]
0
0
1,472
1
0
2011-06-01T08:52:27.503000
2011-06-01T09:05:20.787000
6,198,556
6,198,996
how to update easily an entity directly from a wcf call?
This is what I Have in my WCF service public long Generic_Save(Product p, ObjectSet os) { if (p.Id == 0) { os.AddObject(p); } else { // UPDATE Product original = os.Single (o => o.Id == p.Id); original.Name = p.Name; original.Items = p.Items; // doesn't work! } dataEntities.SaveChanges(); return p.Id; } Product p i...
Badly. It is possible only with Product p itself ( update detached entity ) but it is really hard with items. The problem is that you must manually say EF exactly which item has changes, which is new and also which were deleted. The longer discussion of the problem is here. Common solutions are: Do it exactly as you di...
how to update easily an entity directly from a wcf call? This is what I Have in my WCF service public long Generic_Save(Product p, ObjectSet os) { if (p.Id == 0) { os.AddObject(p); } else { // UPDATE Product original = os.Single (o => o.Id == p.Id); original.Name = p.Name; original.Items = p.Items; // doesn't work! }...
TITLE: how to update easily an entity directly from a wcf call? QUESTION: This is what I Have in my WCF service public long Generic_Save(Product p, ObjectSet os) { if (p.Id == 0) { os.AddObject(p); } else { // UPDATE Product original = os.Single (o => o.Id == p.Id); original.Name = p.Name; original.Items = p.Items; ...
[ "c#", "wcf", "entity-framework-4" ]
0
0
174
1
0
2011-06-01T08:52:48.560000
2011-06-01T09:27:38.600000
6,198,559
6,198,587
sql server - join on null values
I have two tables. One has a list of links and the other one holds thier styles if available. The later is a sparse table, i.e. it does not have corresponding rows when their values are null. I run the following query: select hl.*, hls.colorCode, hls.bold from HeaderLinks hl, HeaderLinkStyles hls where hl.LinkId = hls....
Left Join Select hl.*, hls.colorCode, hls.bold From HeaderLinks hl Left Join HeaderLinkStyles hls on hl.LinkId = hls.linkID order by row asc,[column] ASC
sql server - join on null values I have two tables. One has a list of links and the other one holds thier styles if available. The later is a sparse table, i.e. it does not have corresponding rows when their values are null. I run the following query: select hl.*, hls.colorCode, hls.bold from HeaderLinks hl, HeaderLink...
TITLE: sql server - join on null values QUESTION: I have two tables. One has a list of links and the other one holds thier styles if available. The later is a sparse table, i.e. it does not have corresponding rows when their values are null. I run the following query: select hl.*, hls.colorCode, hls.bold from HeaderLi...
[ "sql", "sql-server", "t-sql", "sql-server-2008", "left-join" ]
3
4
5,417
5
0
2011-06-01T08:53:06.020000
2011-06-01T08:55:35.903000
6,198,560
6,198,641
how to share data between views with navigation controller iphone
i have a view which is fetching data from an Array and presenting the data in a tableview. This view has a navigation controller with a button in it. The button is meant to take you to another view for advanced searching. Let's say that in this new view i have a picker, when the user selects a value from the picker and...
What you need here is reasoning a bit in terms of the Model-View-Controller design pattern. Views should get their data through the model. So in your advanced search view, when the user selects some value, this value is stored in the model. When you go back, the first view redraw itself by reading the current search va...
how to share data between views with navigation controller iphone i have a view which is fetching data from an Array and presenting the data in a tableview. This view has a navigation controller with a button in it. The button is meant to take you to another view for advanced searching. Let's say that in this new view ...
TITLE: how to share data between views with navigation controller iphone QUESTION: i have a view which is fetching data from an Array and presenting the data in a tableview. This view has a navigation controller with a button in it. The button is meant to take you to another view for advanced searching. Let's say that...
[ "iphone", "objective-c", "cocoa-touch" ]
0
0
356
2
0
2011-06-01T08:53:10.150000
2011-06-01T08:59:57.810000
6,198,563
6,199,068
Entity Framework Proxy creation
We can stop creation of proxy in the context constructor by using this.Configuration.ProxyCreationEnabled = false; What are the advantages and disadvantages of creating proxies in EF 4.1?
Proxies are necessary for two features: Lazy loading - navigation properties are loaded once accessed first time Dynamic change tracking - if you modify any property in the entity the context is notified about this change and set the state of the entity. If dynamic change tracking is not used, context must use snapshot...
Entity Framework Proxy creation We can stop creation of proxy in the context constructor by using this.Configuration.ProxyCreationEnabled = false; What are the advantages and disadvantages of creating proxies in EF 4.1?
TITLE: Entity Framework Proxy creation QUESTION: We can stop creation of proxy in the context constructor by using this.Configuration.ProxyCreationEnabled = false; What are the advantages and disadvantages of creating proxies in EF 4.1? ANSWER: Proxies are necessary for two features: Lazy loading - navigation propert...
[ "c#", "entity-framework-4.1" ]
17
20
10,240
2
0
2011-06-01T08:53:25.047000
2011-06-01T09:32:40.050000
6,198,570
6,198,682
Shuffled result in ORM query
Let say that I have a table of some data. I want am running a query using ORM in Kohana 2.3. ORM::factory('somemodel')->find_all(); // ordered by $sort I want to modify that query to return shuffled results.
Use rand. Here is the example for it http://docs.kohanaphp.com/libraries/database/builder#orderby
Shuffled result in ORM query Let say that I have a table of some data. I want am running a query using ORM in Kohana 2.3. ORM::factory('somemodel')->find_all(); // ordered by $sort I want to modify that query to return shuffled results.
TITLE: Shuffled result in ORM query QUESTION: Let say that I have a table of some data. I want am running a query using ORM in Kohana 2.3. ORM::factory('somemodel')->find_all(); // ordered by $sort I want to modify that query to return shuffled results. ANSWER: Use rand. Here is the example for it http://docs.kohanap...
[ "php", "orm", "kohana" ]
0
1
145
1
0
2011-06-01T08:54:14.443000
2011-06-01T09:03:36.733000
6,198,589
6,199,660
How to get the magento developer ip?
I use this code to have a js popup on each side telling visitors that the shop is not productive: You are a developer You are a visitor My question is, how can I use the developer Ip from the magento backend in this code ->System -> Configuration -> Developer -> Developer Client Restrictions
you can get this like any other config value Mage::getStoreConfig('dev/restrict/allow_ips', $storeId) Mage::getStoreConfig('dev/restrict/allow_ips') and then or just getRemoteAddr()))? true: false;?> or just (as pointed by MagePsycho in comments) if(Mage::helper('core')->isDevAllowed()){ }
How to get the magento developer ip? I use this code to have a js popup on each side telling visitors that the shop is not productive: You are a developer You are a visitor My question is, how can I use the developer Ip from the magento backend in this code ->System -> Configuration -> Developer -> Developer Client Res...
TITLE: How to get the magento developer ip? QUESTION: I use this code to have a js popup on each side telling visitors that the shop is not productive: You are a developer You are a visitor My question is, how can I use the developer Ip from the magento backend in this code ->System -> Configuration -> Developer -> De...
[ "magento", "ip" ]
0
12
3,039
3
0
2011-06-01T08:55:47.620000
2011-06-01T10:23:36.793000
6,198,593
6,211,436
Connecting to remote TFS 2010 instance gives TF30063 error
I connect to a remote TFS 2010 instance using Visual Studio 2010. I can Get Latest for all files within a particular project except for one database backup file. When I try to Get Latest on this file I get the following error: TF30063: You are not authorized to access Microsoft-IIS/6.0 I've tried clearing my local VS c...
Ok, so I've fixed it. I took the size of the database backup file down to 1.5Mb by removing obsolete data sets from it and it worked. Not sure if it was a TFS problem or a work proxy problem - maybe a 25Mb file transfer limit imposed. The latter seems more likely to me.
Connecting to remote TFS 2010 instance gives TF30063 error I connect to a remote TFS 2010 instance using Visual Studio 2010. I can Get Latest for all files within a particular project except for one database backup file. When I try to Get Latest on this file I get the following error: TF30063: You are not authorized to...
TITLE: Connecting to remote TFS 2010 instance gives TF30063 error QUESTION: I connect to a remote TFS 2010 instance using Visual Studio 2010. I can Get Latest for all files within a particular project except for one database backup file. When I try to Get Latest on this file I get the following error: TF30063: You are...
[ "iis", "tfs", "iis-6" ]
1
1
2,365
2
0
2011-06-01T08:56:07.860000
2011-06-02T06:59:04.423000
6,198,607
6,198,647
Uploading image error
Hey folks, im trying to get an image to upload to the specified directory and all im getting as an output is 'There was an error uploading the file, please try again!' $upload_dir = "blog/wp-content/uploads/products"; if (file_exists($upload_dir) && is_writable($upload_dir)) { echo "Directory exists and is fine...."; }...
If you do not receive an warning, this is the only reason: If filename is not a valid upload file, then no action will occur, and move_uploaded_file() will return FALSE. an quote from the documentation. Check the upload using.is_uploaded_file.
Uploading image error Hey folks, im trying to get an image to upload to the specified directory and all im getting as an output is 'There was an error uploading the file, please try again!' $upload_dir = "blog/wp-content/uploads/products"; if (file_exists($upload_dir) && is_writable($upload_dir)) { echo "Directory exis...
TITLE: Uploading image error QUESTION: Hey folks, im trying to get an image to upload to the specified directory and all im getting as an output is 'There was an error uploading the file, please try again!' $upload_dir = "blog/wp-content/uploads/products"; if (file_exists($upload_dir) && is_writable($upload_dir)) { ec...
[ "php", "debugging", "image-processing", "error-handling" ]
0
0
83
1
0
2011-06-01T08:56:47.547000
2011-06-01T09:00:20.750000
6,198,609
6,198,638
Transparency for WPF UI elements
Is it possible in WPF to make a certain element - say, a Canvas containing a button - semi-transparent? All I could find so far is how to make a whole window transparent or making the background of WPF shapes transparent; but that's not what I need. Please provide the answers either in XAML or C# - I don't speak Visual...
Something along the lines of this perhaps? Opacity is probably what you are looking for Click Me!
Transparency for WPF UI elements Is it possible in WPF to make a certain element - say, a Canvas containing a button - semi-transparent? All I could find so far is how to make a whole window transparent or making the background of WPF shapes transparent; but that's not what I need. Please provide the answers either in ...
TITLE: Transparency for WPF UI elements QUESTION: Is it possible in WPF to make a certain element - say, a Canvas containing a button - semi-transparent? All I could find so far is how to make a whole window transparent or making the background of WPF shapes transparent; but that's not what I need. Please provide the ...
[ "wpf", "transparency" ]
1
7
1,228
1
0
2011-06-01T08:56:55.787000
2011-06-01T08:59:41.287000
6,198,617
6,199,607
How do I measure the dimensions of a form?
i have just designed a business information dashboard for the customer. The initial design was for a 1280x1024 screen res but it now appears that the customer has a 1024 x 768 res. This BI form is a child window of a MDI interface and as such there is a header and statusbar which means if the application is fullsized t...
I've not done any MDI stuff, but from a quick playaround I believe this might help. I put the below into a child form. label1.Text = this.Parent.ClientRectangle.Width.ToString() + "x" + this.Parent.ClientRectangle.Height.ToString(); It seemed to return the inner size of the MDI parent. As I added more toolstrips and a ...
How do I measure the dimensions of a form? i have just designed a business information dashboard for the customer. The initial design was for a 1280x1024 screen res but it now appears that the customer has a 1024 x 768 res. This BI form is a child window of a MDI interface and as such there is a header and statusbar wh...
TITLE: How do I measure the dimensions of a form? QUESTION: i have just designed a business information dashboard for the customer. The initial design was for a 1280x1024 screen res but it now appears that the customer has a 1024 x 768 res. This BI form is a child window of a MDI interface and as such there is a heade...
[ "wpf", "winforms", "resolution" ]
0
0
197
1
0
2011-06-01T08:58:00.867000
2011-06-01T10:18:21.317000
6,198,623
6,198,931
When is umask() useful?
umask(0); fd = open("/dev/null", O_RDWR); Here's man 2 umask: umask() sets the calling process’s file mode creation mask (umask) to mask & 0777. But it doesn't make sense for me,as when we call open,we will also provide a mode parameter. So what's the point of umask?
The umask is applied to all modes used in file system operations. From the manual open(2): The permissions of the created file are (mode & ~umask) So with a single call to umask, you can influence the mode of all create files. This is usually used when a program wants the user to allow to overrule the default grants fo...
When is umask() useful? umask(0); fd = open("/dev/null", O_RDWR); Here's man 2 umask: umask() sets the calling process’s file mode creation mask (umask) to mask & 0777. But it doesn't make sense for me,as when we call open,we will also provide a mode parameter. So what's the point of umask?
TITLE: When is umask() useful? QUESTION: umask(0); fd = open("/dev/null", O_RDWR); Here's man 2 umask: umask() sets the calling process’s file mode creation mask (umask) to mask & 0777. But it doesn't make sense for me,as when we call open,we will also provide a mode parameter. So what's the point of umask? ANSWER: ...
[ "c", "umask" ]
12
8
23,559
4
0
2011-06-01T08:58:24.583000
2011-06-01T09:23:23.640000
6,198,630
6,198,663
Why isn't there an HTML tag to diminish content?
Yesterday I was building a template for a newspage. I wanted a that contains the date of the news item. Since I wanted the date to be less important than the rest of the text in the I went looking for an HTML tag that can semantically diminish content. But this doesn't exist. So why isn't there something like a ( dimin...
I've seen people using the small tag for this kind of semantics. What I've used before was time with a pubdate attribute. That should satisfy the semantics even more.
Why isn't there an HTML tag to diminish content? Yesterday I was building a template for a newspage. I wanted a that contains the date of the news item. Since I wanted the date to be less important than the rest of the text in the I went looking for an HTML tag that can semantically diminish content. But this doesn't e...
TITLE: Why isn't there an HTML tag to diminish content? QUESTION: Yesterday I was building a template for a newspage. I wanted a that contains the date of the news item. Since I wanted the date to be less important than the rest of the text in the I went looking for an HTML tag that can semantically diminish content. ...
[ "html" ]
1
1
71
3
0
2011-06-01T08:58:58.343000
2011-06-01T09:01:52.367000
6,198,633
6,198,760
What is jQuery $.fly plugin used for?
I've stumbled across jQuery.fly() - flyweight pattern performance benchmark and after looking at the testing code and the plugin code itself (also see below), I can't work out what use is it? I've searched the internet and cannot find any useful information about the plugin itself. Is it a more efficient way of looping...
Disclaimer: You get an instance of the global fly that changes state every time you call $.fly. If you store it in a variable it will break. This is a micro optimisation and should not be used unless properly benchmarked. Optimisation: Any situation where you can justify using $.fly because using $ is a bottleneck then...
What is jQuery $.fly plugin used for? I've stumbled across jQuery.fly() - flyweight pattern performance benchmark and after looking at the testing code and the plugin code itself (also see below), I can't work out what use is it? I've searched the internet and cannot find any useful information about the plugin itself....
TITLE: What is jQuery $.fly plugin used for? QUESTION: I've stumbled across jQuery.fly() - flyweight pattern performance benchmark and after looking at the testing code and the plugin code itself (also see below), I can't work out what use is it? I've searched the internet and cannot find any useful information about ...
[ "javascript", "jquery", "performance", "jquery-plugins" ]
9
11
779
1
0
2011-06-01T08:59:14.173000
2011-06-01T09:09:48.977000
6,198,636
6,203,361
ml datatype (with primitive functions) how to make?
i have this datatype datatype e = X | Const of int | P of e*e | S of e*e | M of e*e | D of e*e; and this procedure val rec evl = fn (Const k)=>(fn x=>k)| X=> (fn x=>x)| P(e1,e2)=> (fn x=> (evl e1 x)+(evl e2 x))| S(e1,e2)=> (fn x=> (evl e1 x)-(evl e2 x))| M(e1,e2)=> (fn x=> (evl e1 x)*(evl e2 x))| D(e1,e2)=> (fn x=> (ev...
Some notes about your datatype and function: X is a redundant case, it has no meaning in context of arithmetic expression. You overused lamda functions, it makes your code so hard to understand. S (subtract) and D (divide) are not commutative, it is a bad idea to do those operations on a list of arguments. I demonstrat...
ml datatype (with primitive functions) how to make? i have this datatype datatype e = X | Const of int | P of e*e | S of e*e | M of e*e | D of e*e; and this procedure val rec evl = fn (Const k)=>(fn x=>k)| X=> (fn x=>x)| P(e1,e2)=> (fn x=> (evl e1 x)+(evl e2 x))| S(e1,e2)=> (fn x=> (evl e1 x)-(evl e2 x))| M(e1,e2)=> (f...
TITLE: ml datatype (with primitive functions) how to make? QUESTION: i have this datatype datatype e = X | Const of int | P of e*e | S of e*e | M of e*e | D of e*e; and this procedure val rec evl = fn (Const k)=>(fn x=>k)| X=> (fn x=>x)| P(e1,e2)=> (fn x=> (evl e1 x)+(evl e2 x))| S(e1,e2)=> (fn x=> (evl e1 x)-(evl e2 ...
[ "sml", "smlnj", "ml" ]
0
0
300
1
0
2011-06-01T08:59:31.753000
2011-06-01T15:06:12.067000
6,198,646
6,199,415
How to use Nested Views in WPF MVVM
Hi I am trying to understand the best practise to use nested views. I have an 'Attribute' View which is bound to collection of name value pairs in the view model. I need to reuse this at various places in my UI. I have another 'Condition View' which has a string property and Dictionary(string,string) collection. I trie...
Based on your comments that your parent / child relationship is not reflected in your view model, you have two options: Create the relationship in your view model to reflect the relationship in your view, allowing you to navigate from the parent to the child and vice-versa should you need this. Use a RelativeSource Fin...
How to use Nested Views in WPF MVVM Hi I am trying to understand the best practise to use nested views. I have an 'Attribute' View which is bound to collection of name value pairs in the view model. I need to reuse this at various places in my UI. I have another 'Condition View' which has a string property and Dictiona...
TITLE: How to use Nested Views in WPF MVVM QUESTION: Hi I am trying to understand the best practise to use nested views. I have an 'Attribute' View which is bound to collection of name value pairs in the view model. I need to reuse this at various places in my UI. I have another 'Condition View' which has a string pro...
[ "c#", "wpf", "mvvm" ]
4
4
5,612
1
0
2011-06-01T09:00:19.603000
2011-06-01T10:02:06.777000
6,198,648
6,199,721
Clarification about location of a class in eclipse packages
If that question was asked before, please disregard it. I was investigating the HippieProposalComputer class found in org.eclipse.jdt.internal.ui.text.java package to help me write my own plugin. So I looked at the list of dependencies and one of them is org.eclipse.ui.texteditor.HippieProposalProcessor so when I looke...
You mistakenly assume that package names and plugin names are tight together. They are not. In your case, the org.eclipse.ui.texteditor.HippieProposalProcessor is located in the correct package, but in org.eclipse.ui.workbench.texteditor plugin. Most probably, this is a result of a refactoring and splitting the org.ecl...
Clarification about location of a class in eclipse packages If that question was asked before, please disregard it. I was investigating the HippieProposalComputer class found in org.eclipse.jdt.internal.ui.text.java package to help me write my own plugin. So I looked at the list of dependencies and one of them is org.e...
TITLE: Clarification about location of a class in eclipse packages QUESTION: If that question was asked before, please disregard it. I was investigating the HippieProposalComputer class found in org.eclipse.jdt.internal.ui.text.java package to help me write my own plugin. So I looked at the list of dependencies and on...
[ "eclipse", "eclipse-plugin", "eclipse-rcp" ]
1
2
66
2
0
2011-06-01T09:00:33.737000
2011-06-01T10:28:37.160000
6,198,656
6,201,008
How to prevent a user from Editing Word document loaded in DsoFramer using C#4.0?
We are developing C#.net 4.0 Windows Forms based application.we are using Dsoframer control to embed the Word document into my Application.Here, i want to prevent the user to edit the document.I have already opened Word Document in READ Only Mode.But still user can able to edit the doucment.Anyway, the updated content ...
wordDoc.Protect(Microsoft.Office.Interop.Word.WdProtectionType.wdAllowOnlyReading); This is do that...
How to prevent a user from Editing Word document loaded in DsoFramer using C#4.0? We are developing C#.net 4.0 Windows Forms based application.we are using Dsoframer control to embed the Word document into my Application.Here, i want to prevent the user to edit the document.I have already opened Word Document in READ O...
TITLE: How to prevent a user from Editing Word document loaded in DsoFramer using C#4.0? QUESTION: We are developing C#.net 4.0 Windows Forms based application.we are using Dsoframer control to embed the Word document into my Application.Here, i want to prevent the user to edit the document.I have already opened Word ...
[ "ms-word", "dsoframer" ]
0
1
690
1
0
2011-06-01T09:01:20.640000
2011-06-01T12:19:06.020000
6,198,660
6,200,350
instance method in scope
I don't know even if its possible? I need to use instance method with/within scope. Something like this: scope:public, lambda{ where ({:public => true}) } and call instance method(complete?) on each record to see if it is completed. public scope here should return all records that are public and are completed and compl...
Scopes are about generating query logic using ARel. If you can't represent the logic of the complete? method in SQL then you're kind of stuck Scopes - in rails 3 at least - are meant for chaining together query logic without returning a result set. If you need a result set to do your testing for complete you'll need to...
instance method in scope I don't know even if its possible? I need to use instance method with/within scope. Something like this: scope:public, lambda{ where ({:public => true}) } and call instance method(complete?) on each record to see if it is completed. public scope here should return all records that are public an...
TITLE: instance method in scope QUESTION: I don't know even if its possible? I need to use instance method with/within scope. Something like this: scope:public, lambda{ where ({:public => true}) } and call instance method(complete?) on each record to see if it is completed. public scope here should return all records ...
[ "ruby-on-rails-3", "scope" ]
7
12
11,993
2
0
2011-06-01T09:01:36.643000
2011-06-01T11:23:55.050000
6,198,668
6,198,918
Is .NET open-source truly open-source if namespaces encapsulate core functionality?
I have downloaded some Open Source frameworks with the intention of learning and ultimately contributing to them. Many times the framework requires the use of a namespace for which I do not have source code (e.g. Telerik.Web.MVC.UI), which brings me to my question. Is a framework really open-source when namespaces prov...
It's very common for open source code to rely on closed source components. For example any open source code relying on Microsoft.net relies on very large amounts of closed source code. In turn, any code that targets Windows itself depends on the closed source Windows code. There's no conceptual difference between your ...
Is .NET open-source truly open-source if namespaces encapsulate core functionality? I have downloaded some Open Source frameworks with the intention of learning and ultimately contributing to them. Many times the framework requires the use of a namespace for which I do not have source code (e.g. Telerik.Web.MVC.UI), wh...
TITLE: Is .NET open-source truly open-source if namespaces encapsulate core functionality? QUESTION: I have downloaded some Open Source frameworks with the intention of learning and ultimately contributing to them. Many times the framework requires the use of a namespace for which I do not have source code (e.g. Teler...
[ ".net", "model-view-controller", "open-source" ]
2
5
450
2
0
2011-06-01T09:02:13.567000
2011-06-01T09:22:28.360000
6,198,677
6,199,047
java.lang.NoClassDefFoundError: org/codehaus/plexus/classworlds/launcher/Launcher when running bash file to build the project
I have maven 2 installed. When I use mvn clean or mvn install in the app root it works fine. But when I am trying to use maven install inside a bash script, I got the above exception: This is my script: #!/bin/sh #dirname='/home/myuser/workspace/myapp' DIRECTORY=$(cd `dirname $0` && pwd) cd $DIRECTORY mvn install -s re...
Couple of possibilities... One, as posted here, you have both M2_REPO and M3_REPO variables defined. Or you are facing this issue related to maven3 and M2_HOME The other is that somehow the JRE is getting used instead of JDK when run from the batch file!
java.lang.NoClassDefFoundError: org/codehaus/plexus/classworlds/launcher/Launcher when running bash file to build the project I have maven 2 installed. When I use mvn clean or mvn install in the app root it works fine. But when I am trying to use maven install inside a bash script, I got the above exception: This is my...
TITLE: java.lang.NoClassDefFoundError: org/codehaus/plexus/classworlds/launcher/Launcher when running bash file to build the project QUESTION: I have maven 2 installed. When I use mvn clean or mvn install in the app root it works fine. But when I am trying to use maven install inside a bash script, I got the above exc...
[ "linux", "maven-2", "maven", "maven-3" ]
11
15
21,848
2
0
2011-06-01T09:03:10.977000
2011-06-01T09:30:50.693000
6,198,678
6,207,807
Make folders nodes in TreeView, and move nodes between them
I want to make a treeview structure like this. I can only find an example on how to copy nodes. But I don't know how to organize it to folders, to move nodes between them. Any advice will be very helpful. I'm using winforms.
Basically you are going to have a recursive loop like so: protected void Populate(TreeNode parentNode, DirectoryInfo directory) { foreach (DirectoryInfo dir in directory.GetDirectories()) { TreeNode node = parentNode.Nodes[dir.Name]?? parentNode.Nodes.Add(dir.Name, dir.Name); node.Tag = dir; // node.ContextMenuStrip = ...
Make folders nodes in TreeView, and move nodes between them I want to make a treeview structure like this. I can only find an example on how to copy nodes. But I don't know how to organize it to folders, to move nodes between them. Any advice will be very helpful. I'm using winforms.
TITLE: Make folders nodes in TreeView, and move nodes between them QUESTION: I want to make a treeview structure like this. I can only find an example on how to copy nodes. But I don't know how to organize it to folders, to move nodes between them. Any advice will be very helpful. I'm using winforms. ANSWER: Basicall...
[ "c#", ".net", "winforms", "treeview" ]
0
1
1,075
1
0
2011-06-01T09:03:19.703000
2011-06-01T21:16:08.260000
6,198,679
6,198,715
array_replace alternatives for earlier version of php?
I'm looking to use the array_replace function but the version of php I'm running doesn't support it. I was wondering if anyone new of any alternative ways of doing this? The version of php I'm running is 5.2.17 I have an array and I just want to replace elements with another array where the keys match. I'm not able to ...
You mean something like this? $array; $replacement; foreach ($array as $key => &$value) { if (array_key_exists($key, $replacement)) { $value = $replacement[$key]; } } or just foreach ($replacement as $key => $value) { $array[$key] = $value; } or maybe even array_merge ($array, $replacement); (I currently don't see any ...
array_replace alternatives for earlier version of php? I'm looking to use the array_replace function but the version of php I'm running doesn't support it. I was wondering if anyone new of any alternative ways of doing this? The version of php I'm running is 5.2.17 I have an array and I just want to replace elements wi...
TITLE: array_replace alternatives for earlier version of php? QUESTION: I'm looking to use the array_replace function but the version of php I'm running doesn't support it. I was wondering if anyone new of any alternative ways of doing this? The version of php I'm running is 5.2.17 I have an array and I just want to r...
[ "php", "arrays" ]
0
3
1,900
2
0
2011-06-01T09:03:20.273000
2011-06-01T09:06:24.263000
6,198,684
6,198,787
Javascript: How to copy all options from one select element to another?
How can I copy all options of one select element to another? Please give me the easiest way, I'm allergic to looping. Please help me. Thanks in advance!
html: op 1 op 2 op 3 op 4 javascript: var first = document.getElementById('selector_a'); var options = first.innerHTML; var second = document.getElementById('selector_b'); var options = second.innerHTML + options; second.innerHTML = options;
Javascript: How to copy all options from one select element to another? How can I copy all options of one select element to another? Please give me the easiest way, I'm allergic to looping. Please help me. Thanks in advance!
TITLE: Javascript: How to copy all options from one select element to another? QUESTION: How can I copy all options of one select element to another? Please give me the easiest way, I'm allergic to looping. Please help me. Thanks in advance! ANSWER: html: op 1 op 2 op 3 op 4 javascript: var first = document.getElemen...
[ "javascript", "html", "html-select" ]
27
31
61,110
8
0
2011-06-01T09:03:45.357000
2011-06-01T09:11:41.643000
6,198,686
6,198,768
What is "small" collection or "huge" collection
another day, another problem:) Since I woke up today I'm wondering about numbers. My experience does not allow me to answear my questions: What is the small collection? what is the medium size collection? what is the huge collection? I mean where're the lines? ex. between 0 to XX elements is small collection and so on....
There are no hard lines, because it depends on many different things. In some situations the size of the objects stored in the collection matter, in others it doesn't. In some situations the CPU/memory is fast enough that "small" can be as large as a million, in others a few dozens is already "mid-sized". Personally an...
What is "small" collection or "huge" collection another day, another problem:) Since I woke up today I'm wondering about numbers. My experience does not allow me to answear my questions: What is the small collection? what is the medium size collection? what is the huge collection? I mean where're the lines? ex. between...
TITLE: What is "small" collection or "huge" collection QUESTION: another day, another problem:) Since I woke up today I'm wondering about numbers. My experience does not allow me to answear my questions: What is the small collection? what is the medium size collection? what is the huge collection? I mean where're the ...
[ "collections", "count", "size" ]
1
2
53
1
0
2011-06-01T09:03:54.110000
2011-06-01T09:10:41.560000
6,198,687
6,198,770
Shortcut to navigate between highlighted usages
According to this page navigating between highlighted usages: (source: jetbrains.com ) can be done using F3 or Ctrl + L and Shift + F3 or Ctrl + Shift + L keyboard shortcuts, to navigate to the next and previous usages respectively. However these shortcuts are by default used to navigate between search occurences ( Ctr...
F3 and Shift + F3 work just fine here. Highlighted usages do not differ from search occurrences in this context.
Shortcut to navigate between highlighted usages According to this page navigating between highlighted usages: (source: jetbrains.com ) can be done using F3 or Ctrl + L and Shift + F3 or Ctrl + Shift + L keyboard shortcuts, to navigate to the next and previous usages respectively. However these shortcuts are by default ...
TITLE: Shortcut to navigate between highlighted usages QUESTION: According to this page navigating between highlighted usages: (source: jetbrains.com ) can be done using F3 or Ctrl + L and Shift + F3 or Ctrl + Shift + L keyboard shortcuts, to navigate to the next and previous usages respectively. However these shortcu...
[ "intellij-idea" ]
13
3
5,241
5
0
2011-06-01T09:03:55.967000
2011-06-01T09:10:42.783000
6,198,690
6,198,728
SQL Query - Distinct results
I have the following two tables: People [*ID*, Name] Pet [*PetID*, OwnerID, Species, Name] (OwnerID is a foreign key of ID) I would like the database to list each person and how many different species they own. For example, if Bob (ID 1473) owned a dog, cat and another dog the output should be: ID | No. of Species ----...
You could use count(distinct...) for that: select People.ID, count(distinct Species) from People join Pet on Pet.OwnerID = People.ID group by People.ID
SQL Query - Distinct results I have the following two tables: People [*ID*, Name] Pet [*PetID*, OwnerID, Species, Name] (OwnerID is a foreign key of ID) I would like the database to list each person and how many different species they own. For example, if Bob (ID 1473) owned a dog, cat and another dog the output should...
TITLE: SQL Query - Distinct results QUESTION: I have the following two tables: People [*ID*, Name] Pet [*PetID*, OwnerID, Species, Name] (OwnerID is a foreign key of ID) I would like the database to list each person and how many different species they own. For example, if Bob (ID 1473) owned a dog, cat and another dog...
[ "sql", "join", "correlated-subquery" ]
4
1
423
3
0
2011-06-01T09:04:01.007000
2011-06-01T09:07:33.620000
6,198,695
6,212,396
c2dm : how to receive the message in the device? (using PHP)
I have the registration id and auth token for c2dm. And then I pass store these values in db. and using php, i could send one message to c2dm server. But my problem is I dont know how to receive the message in the application. I am not sure whether my way of getting the message is correct or not. Anyway i will give it ...
Finally I found the way of giving collapse_key and and data.. collapse_key should be a string which is a name for a group of messages or a a parthicular type of messages. If we send more than one message with same collapse_key, the latest message will be sent to the device from c2dm server. Example: $collapse_key = "im...
c2dm : how to receive the message in the device? (using PHP) I have the registration id and auth token for c2dm. And then I pass store these values in db. and using php, i could send one message to c2dm server. But my problem is I dont know how to receive the message in the application. I am not sure whether my way of ...
TITLE: c2dm : how to receive the message in the device? (using PHP) QUESTION: I have the registration id and auth token for c2dm. And then I pass store these values in db. and using php, i could send one message to c2dm server. But my problem is I dont know how to receive the message in the application. I am not sure ...
[ "php", "android", "android-c2dm" ]
2
3
6,363
3
0
2011-06-01T09:04:19.290000
2011-06-02T08:55:34.373000
6,198,696
6,198,755
Using an object to instantiate a collection
I would like to do the following (which doesn't work, it is just to explain the concept). Any idea how to do it? Class type; if (/* something */) type = String.class; else type = Boolean.class; return new ArrayList (); ArrayList doesn't work. I tried with type.getClass(), doesn't work either.
Wrap it into the method, pass the type as generic Class and let Java do the rest for you. No need for any conditional branching. List newList(Class type) { return new ArrayList (); } Then you can use it like this: List list = newList(String.class); Bear in mind that T does not have to be specified at the generic class ...
Using an object to instantiate a collection I would like to do the following (which doesn't work, it is just to explain the concept). Any idea how to do it? Class type; if (/* something */) type = String.class; else type = Boolean.class; return new ArrayList (); ArrayList doesn't work. I tried with type.getClass(), do...
TITLE: Using an object to instantiate a collection QUESTION: I would like to do the following (which doesn't work, it is just to explain the concept). Any idea how to do it? Class type; if (/* something */) type = String.class; else type = Boolean.class; return new ArrayList (); ArrayList doesn't work. I tried with t...
[ "java", "generics", "collections" ]
2
5
152
6
0
2011-06-01T09:04:19.900000
2011-06-01T09:09:17.403000
6,198,702
6,198,722
functor call (additional characters)
I tried to build a minimal example: struct Functor { void operator()(int& a) { a += 1; } void other(int& a) { a += 2; } }; template class Class { public: void function() { int a = 10; foo()(a); std::cout << a << std::endl; } }; int main() { Class c; c.function(); } My question about this: Why is it even possible to c...
You're not calling it on a pure type. foo() invokes the constructor, and evaluates to a temporary foo object, on which you then invoke operator(). To do the equivalent with a "normal" member function, just do: foo().other(a);
functor call (additional characters) I tried to build a minimal example: struct Functor { void operator()(int& a) { a += 1; } void other(int& a) { a += 2; } }; template class Class { public: void function() { int a = 10; foo()(a); std::cout << a << std::endl; } }; int main() { Class c; c.function(); } My question abo...
TITLE: functor call (additional characters) QUESTION: I tried to build a minimal example: struct Functor { void operator()(int& a) { a += 1; } void other(int& a) { a += 2; } }; template class Class { public: void function() { int a = 10; foo()(a); std::cout << a << std::endl; } }; int main() { Class c; c.function();...
[ "c++", "call", "functor" ]
2
8
150
3
0
2011-06-01T09:04:48.383000
2011-06-01T09:07:03.103000
6,198,707
6,198,765
Faster search String in Mysql Database
I have a large DB having > 20,000 rows. I have two tables songs and albums: table songs contains songid, albumid, songname and table albums contains albumid, albumname Currently when user searches for a song I give results instantly as soon as he starts typing. Just like Google Instant. What I am using is: Everytime us...
First of all you should find MySQL's FULLTEXT search support far faster than your current approach. I suspect with the kind of speed you'd like from this solution and the support for searching for mis-spelled words that you'd be better off investigating some kind of more featured full text search engine. These include:...
Faster search String in Mysql Database I have a large DB having > 20,000 rows. I have two tables songs and albums: table songs contains songid, albumid, songname and table albums contains albumid, albumname Currently when user searches for a song I give results instantly as soon as he starts typing. Just like Google In...
TITLE: Faster search String in Mysql Database QUESTION: I have a large DB having > 20,000 rows. I have two tables songs and albums: table songs contains songid, albumid, songname and table albums contains albumid, albumname Currently when user searches for a song I give results instantly as soon as he starts typing. J...
[ "javascript", "mysql", "ajax", "string", "string-matching" ]
2
1
2,216
3
0
2011-06-01T09:05:31.723000
2011-06-01T09:10:17.450000
6,198,708
6,198,843
SQliteDatabase query construction problem in Android
I am trying to build a query in SQLite in Android. Query is very simple and looks like this: SELECT ifnull(object.icon_large, ifnull( object.image, item.IMG_DEF_COVER)) FROM object, item WHERE object.id_item = 1 AND item.id_item = 1; I've tried to use SQLiteDatabase.query(), but it can be used only for one table. Any ...
@fox you can use rawquery() instead of query example: SQLiteDatabase mydatabase; mydatabase.rawquery("select * from a, b where a.id=b.someid", null); or can use querybuilder's setTable() method to specify the joins example builder.setTables(TABLEA+" LEFT JOIN "+TABLEB+" ON "+TABLEB+"."+KEY_ID+"="+TABLEA+"."+KEY_B_ID);
SQliteDatabase query construction problem in Android I am trying to build a query in SQLite in Android. Query is very simple and looks like this: SELECT ifnull(object.icon_large, ifnull( object.image, item.IMG_DEF_COVER)) FROM object, item WHERE object.id_item = 1 AND item.id_item = 1; I've tried to use SQLiteDatabase...
TITLE: SQliteDatabase query construction problem in Android QUESTION: I am trying to build a query in SQLite in Android. Query is very simple and looks like this: SELECT ifnull(object.icon_large, ifnull( object.image, item.IMG_DEF_COVER)) FROM object, item WHERE object.id_item = 1 AND item.id_item = 1; I've tried to ...
[ "android", "sqlite" ]
1
2
804
2
0
2011-06-01T09:05:49.463000
2011-06-01T09:17:28.983000
6,198,709
6,198,753
How do I change nesting function's variable in the nested function
I'd like to have variable defined in the nesting function to be altered in the nested function, something like def nesting(): count = 0 def nested(): count += 1 for i in range(10): nested() print count When nesting function is called, I wish it prints 10, but it raises UnboundLocalError. The key word global may resolv...
In Python 3.x, you can use the nonlocal declaration (in nested ) to tell Python you mean to assign to the count variable in nesting. In Python 2.x, you simply can't assign to count in nesting from nested. However, you can work around it by not assigning to the variable itself, but using a mutable container: def nesting...
How do I change nesting function's variable in the nested function I'd like to have variable defined in the nesting function to be altered in the nested function, something like def nesting(): count = 0 def nested(): count += 1 for i in range(10): nested() print count When nesting function is called, I wish it prints ...
TITLE: How do I change nesting function's variable in the nested function QUESTION: I'd like to have variable defined in the nesting function to be altered in the nested function, something like def nesting(): count = 0 def nested(): count += 1 for i in range(10): nested() print count When nesting function is called,...
[ "python", "global-variables", "nested-function" ]
19
24
5,073
3
0
2011-06-01T09:05:54.290000
2011-06-01T09:09:11.053000
6,198,714
6,204,354
Opening Facebook dialogue box in the same page
I have been trying to implement the Facebook Feed Dialog as follows But the problem is it is opening the link in a page, rather than a pop up box. Pls help!
To do this as a dialog, you would need to use the Facebook Javascript SDK and call the FB.ui function using the 'feed' value for method.
Opening Facebook dialogue box in the same page I have been trying to implement the Facebook Feed Dialog as follows But the problem is it is opening the link in a page, rather than a pop up box. Pls help!
TITLE: Opening Facebook dialogue box in the same page QUESTION: I have been trying to implement the Facebook Feed Dialog as follows But the problem is it is opening the link in a page, rather than a pop up box. Pls help! ANSWER: To do this as a dialog, you would need to use the Facebook Javascript SDK and call the FB...
[ "facebook", "dialog", "feed" ]
0
0
1,119
1
0
2011-06-01T09:06:20.193000
2011-06-01T16:14:58.050000
6,198,726
6,198,779
How to add meta tag to ASP.Net content page
I have several content pages hanging off of one master page. I need to add a refresh meta tag to one of the content pages but I can't see where I can do this. Any help would be much appreciated.
Have not tried this with refresh, but in general you can add a meta tag like this: var keywords = new HtmlMeta { Name = "keywords", Content = "one,two,three" }; Header.Controls.Add(keywords); update: it is possible this way. Check Rick Strahl http://www.west-wind.com/weblog/posts/2006/Aug/04/No-more-Meta-Refresh-Tags
How to add meta tag to ASP.Net content page I have several content pages hanging off of one master page. I need to add a refresh meta tag to one of the content pages but I can't see where I can do this. Any help would be much appreciated.
TITLE: How to add meta tag to ASP.Net content page QUESTION: I have several content pages hanging off of one master page. I need to add a refresh meta tag to one of the content pages but I can't see where I can do this. Any help would be much appreciated. ANSWER: Have not tried this with refresh, but in general you c...
[ "asp.net", "meta-tags", "content-pages" ]
25
21
92,734
6
0
2011-06-01T09:07:17.923000
2011-06-01T09:11:12.527000
6,198,727
6,198,858
Can mac os X 10.6.6 install on non-apple hardware?
Hi im new to iphone development by searching i found that iphone development can only be done on mac os and i also found that the latest version of iphone sdk only run on Intel mac os x 10.6.6 or later. i have some question regarding this, Can i install mac os x 10.6.6 on same hardware on which i currently install wind...
See http://lifehacker.com/5672051/how-to-build-a-hackintosh-mac-and-install-os-x-in-eight-easy-steps
Can mac os X 10.6.6 install on non-apple hardware? Hi im new to iphone development by searching i found that iphone development can only be done on mac os and i also found that the latest version of iphone sdk only run on Intel mac os x 10.6.6 or later. i have some question regarding this, Can i install mac os x 10.6.6...
TITLE: Can mac os X 10.6.6 install on non-apple hardware? QUESTION: Hi im new to iphone development by searching i found that iphone development can only be done on mac os and i also found that the latest version of iphone sdk only run on Intel mac os x 10.6.6 or later. i have some question regarding this, Can i insta...
[ "iphone", "ios4", "ios-simulator" ]
1
0
552
3
0
2011-06-01T09:07:22.377000
2011-06-01T09:18:52.503000
6,198,731
6,198,893
Selecting rows from a table by One a field from other table
What i want, to display rows from a table which is selected by a field from other table single value, lets say to display images from a table by last category id. I have this type of query, but this return me all matching keys rows, if i inset LIMIT 1 then it return one row... SELECT i.prof_image FROM profile_images i ...
This will work for your specific example.. If you need to be more selective, then please post some more details.. SELECT i.prof_image FROM profile_images i WHERE cat_id = (select max(cat_id) from images_cat)
Selecting rows from a table by One a field from other table What i want, to display rows from a table which is selected by a field from other table single value, lets say to display images from a table by last category id. I have this type of query, but this return me all matching keys rows, if i inset LIMIT 1 then it ...
TITLE: Selecting rows from a table by One a field from other table QUESTION: What i want, to display rows from a table which is selected by a field from other table single value, lets say to display images from a table by last category id. I have this type of query, but this return me all matching keys rows, if i inse...
[ "php", "mysql", "sql" ]
0
1
108
2
0
2011-06-01T09:07:54.763000
2011-06-01T09:21:01.947000
6,198,736
6,276,589
Data from TLF TextLine
i have some problem with utilizing TLF, i need to parse through the text and get x and y for each character inside the textfield. This is what i have so far... Getting every TextLine from the TextFlow: if (textflow.flowComposer) { for (var i:int = 0; i < textflow.flowComposer.numLines; i++) { var flowLine:TextFlowLine ...
Solved my problem with the help of Jin-Huang over at the adobe forum for TLF. I haven't tried it to full extent yet, but seems to work for now.
Data from TLF TextLine i have some problem with utilizing TLF, i need to parse through the text and get x and y for each character inside the textfield. This is what i have so far... Getting every TextLine from the TextFlow: if (textflow.flowComposer) { for (var i:int = 0; i < textflow.flowComposer.numLines; i++) { var...
TITLE: Data from TLF TextLine QUESTION: i have some problem with utilizing TLF, i need to parse through the text and get x and y for each character inside the textfield. This is what i have so far... Getting every TextLine from the TextFlow: if (textflow.flowComposer) { for (var i:int = 0; i < textflow.flowComposer.nu...
[ "actionscript-3", "flash-builder" ]
0
0
884
1
0
2011-06-01T09:08:09.197000
2011-06-08T09:17:24.183000
6,198,747
6,198,774
Create copy of database in iPhone
Can any one help me for: How can we create copy of database? How can we open that database in iPhone? How can we create folder in our application path? How can we copy folder with files in our application path?
"For Creating the copy of Database..." BOOL success; NSFileManager *fileManager = [NSFileManager defaultManager]; NSError *error; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentPath = [paths objectAtIndex:0]; NSString *finalPath = [documentPath strin...
Create copy of database in iPhone Can any one help me for: How can we create copy of database? How can we open that database in iPhone? How can we create folder in our application path? How can we copy folder with files in our application path?
TITLE: Create copy of database in iPhone QUESTION: Can any one help me for: How can we create copy of database? How can we open that database in iPhone? How can we create folder in our application path? How can we copy folder with files in our application path? ANSWER: "For Creating the copy of Database..." BOOL succ...
[ "iphone", "sql" ]
0
5
316
1
0
2011-06-01T09:08:34.687000
2011-06-01T09:10:58.993000
6,198,756
6,238,218
Items get added twice in navigation application
I have a custom Silverlight (4) control, not unlike a datagrid. This control has a property called ColumnConfiguration. When using this control in a Navigation application, the ColumnConfiguration has its items added again (through XAML), while retaining it's old columns, the result is that twice the normal amount of c...
Could it be that you supplied a default value in the DependencyProperty UIPropertyMetaData? As the DependencyProperty is static, the default value specified there will be the same (reference) for all instances of your control. This is harmless when using value types, but when your property is a reference type, you will...
Items get added twice in navigation application I have a custom Silverlight (4) control, not unlike a datagrid. This control has a property called ColumnConfiguration. When using this control in a Navigation application, the ColumnConfiguration has its items added again (through XAML), while retaining it's old columns,...
TITLE: Items get added twice in navigation application QUESTION: I have a custom Silverlight (4) control, not unlike a datagrid. This control has a property called ColumnConfiguration. When using this control in a Navigation application, the ColumnConfiguration has its items added again (through XAML), while retaining...
[ "c#", ".net", "silverlight", "silverlight-4.0", "navigation" ]
0
2
122
1
0
2011-06-01T09:09:17.780000
2011-06-04T17:15:13.227000
6,198,771
6,199,075
Drawing image in Canvas at an angle WITHOUT rotating the Canvas
I am drawing an image in HTML 5 using canvas in JavaScript. I need to draw it at a rotated angle. I know this can be done by applying rotate(angle) function using the context of the canvas. But I need to do this without rotating the canvas itself. Kindly suggest possible approach for this if it's possible.
You can actually draw whatever you want to rotate into an offscreen canvas and draw that into your main canvas. I borrowed this code from a Google IO Talk: rotateAndCache = function(image,angle) { var offscreenCanvas = document.createElement('canvas'); var offscreenCtx = offscreenCanvas.getContext('2d'); var size = Ma...
Drawing image in Canvas at an angle WITHOUT rotating the Canvas I am drawing an image in HTML 5 using canvas in JavaScript. I need to draw it at a rotated angle. I know this can be done by applying rotate(angle) function using the context of the canvas. But I need to do this without rotating the canvas itself. Kindly s...
TITLE: Drawing image in Canvas at an angle WITHOUT rotating the Canvas QUESTION: I am drawing an image in HTML 5 using canvas in JavaScript. I need to draw it at a rotated angle. I know this can be done by applying rotate(angle) function using the context of the canvas. But I need to do this without rotating the canva...
[ "javascript", "html" ]
10
10
5,770
4
0
2011-06-01T09:10:43.007000
2011-06-01T09:33:01.570000
6,198,778
6,199,503
Why is my In-App Browser not loading?
I want to create a custom In-App Browser to display it inside of my app. My architecture looks something like this: subclass of UIViewController: uiviewcon which loads from its nib: UIWebView top and bottom bar with UI elements like forward, back,... After I have instantiated uiviewcon I'm calling the following method ...
Your view elements are instantiated only when required. This means that the first reference to the controller's view property, (internally from UIKit or a reference anywhere in your code to 'self.view') triggers the process of actually creating all the elements you have in your nib. So until the above process has occur...
Why is my In-App Browser not loading? I want to create a custom In-App Browser to display it inside of my app. My architecture looks something like this: subclass of UIViewController: uiviewcon which loads from its nib: UIWebView top and bottom bar with UI elements like forward, back,... After I have instantiated uivie...
TITLE: Why is my In-App Browser not loading? QUESTION: I want to create a custom In-App Browser to display it inside of my app. My architecture looks something like this: subclass of UIViewController: uiviewcon which loads from its nib: UIWebView top and bottom bar with UI elements like forward, back,... After I have ...
[ "iphone", "objective-c", "xcode", "ios" ]
2
3
686
2
0
2011-06-01T09:11:05.677000
2011-06-01T10:09:18.457000
6,198,790
6,198,869
Custom controls on DataGrid Header (not ColumnHeader)
I want to extend DataGrid to add some controls on the very top of the DataGrid control (not in the column headers). In other words, I want to render some controls (add/del button, filter TextBox) in the top half of CustomDataGrid (which inherits from DataGrid), and then render DataGrid in the bottom half. In my pages I...
You have a couple of options: Create a UserControl that includes a DataGrid plus your additional controls located above the DataGrid, perhaps using a Grid with two rows for layout. Add your additional controls directly to the DataGrid template. I would go for option (1), although you are not extending Datagrid, it is m...
Custom controls on DataGrid Header (not ColumnHeader) I want to extend DataGrid to add some controls on the very top of the DataGrid control (not in the column headers). In other words, I want to render some controls (add/del button, filter TextBox) in the top half of CustomDataGrid (which inherits from DataGrid), and ...
TITLE: Custom controls on DataGrid Header (not ColumnHeader) QUESTION: I want to extend DataGrid to add some controls on the very top of the DataGrid control (not in the column headers). In other words, I want to render some controls (add/del button, filter TextBox) in the top half of CustomDataGrid (which inherits fr...
[ "silverlight", "silverlight-toolkit" ]
0
1
458
1
0
2011-06-01T09:11:49.227000
2011-06-01T09:19:24.567000
6,198,791
6,199,088
JQuery AJAX-PHP mkdir() issue
I've been trying to get a script to work that calls a PHP file into a jQuery script using AJAX. var dataString = 'Submit=Set'; $.ajax({ type: "POST", url: "./inc/php/file.php", dataType: "json", data: dataString, success: function(data) { $('.error').html(data.errormsg+' OK.'); }, error: function(data) { $('.error').ht...
Please make sure the following points are satisfied: Make sure the parent folder has the permission for apache to run your command? Also, remove the trailing slash from your command mkdir('./files/subfolder/',0777); to mkdir('./files/subfolder',0777); - it is good to supply the full path when it comes to linux comman...
JQuery AJAX-PHP mkdir() issue I've been trying to get a script to work that calls a PHP file into a jQuery script using AJAX. var dataString = 'Submit=Set'; $.ajax({ type: "POST", url: "./inc/php/file.php", dataType: "json", data: dataString, success: function(data) { $('.error').html(data.errormsg+' OK.'); }, error: f...
TITLE: JQuery AJAX-PHP mkdir() issue QUESTION: I've been trying to get a script to work that calls a PHP file into a jQuery script using AJAX. var dataString = 'Submit=Set'; $.ajax({ type: "POST", url: "./inc/php/file.php", dataType: "json", data: dataString, success: function(data) { $('.error').html(data.errormsg+' ...
[ "php", "ajax", "jquery", "mkdir" ]
1
2
1,313
1
0
2011-06-01T09:11:51.160000
2011-06-01T09:33:52.827000
6,198,794
6,198,999
How to force firefox to ignore white spaces inside <a> tags
code:.. doesn't work in firefox, even in the latest FF. Seems it's default behavior in IE & chrome to ignore(collpase) the extra white spaces and line feeds. But it's not the case in FF. Is there any way to force firefox to ignore the white spaces? Thanks in advance.
You can not do that. You'll have to either change your markup or the CSS styles so that the image and span are correctly aligned in all browsers. In case the image is the same for every link, another technique is to change the CSS style for the tag, so that the image is set als left-aligned, unrepeated background image...
How to force firefox to ignore white spaces inside <a> tags code:.. doesn't work in firefox, even in the latest FF. Seems it's default behavior in IE & chrome to ignore(collpase) the extra white spaces and line feeds. But it's not the case in FF. Is there any way to force firefox to ignore the white spaces? Thanks in a...
TITLE: How to force firefox to ignore white spaces inside <a> tags QUESTION: code:.. doesn't work in firefox, even in the latest FF. Seems it's default behavior in IE & chrome to ignore(collpase) the extra white spaces and line feeds. But it's not the case in FF. Is there any way to force firefox to ignore the white s...
[ "firefox", "whitespace" ]
1
1
347
1
0
2011-06-01T09:12:14.360000
2011-06-01T09:27:49.903000
6,198,801
6,265,969
include a 'new line' in sms text using GSMCommunication Library
I'm using the GsmCommMain class to send an sms I want to include a new line in my sms, i tried the normal default Environment.NewLine and the chart set \0x0A but nothing realy had helped.. any suggestions? Edit: Environment.NewLine did the job turns out that the system has this block of code body = body.Replace("\t", "...
Environment.NewLine did the job turns out that the system has this block of code body = body.Replace("\t", " ").Replace("\n", " ").Replace("\r", " ");
include a 'new line' in sms text using GSMCommunication Library I'm using the GsmCommMain class to send an sms I want to include a new line in my sms, i tried the normal default Environment.NewLine and the chart set \0x0A but nothing realy had helped.. any suggestions? Edit: Environment.NewLine did the job turns out th...
TITLE: include a 'new line' in sms text using GSMCommunication Library QUESTION: I'm using the GsmCommMain class to send an sms I want to include a new line in my sms, i tried the normal default Environment.NewLine and the chart set \0x0A but nothing realy had helped.. any suggestions? Edit: Environment.NewLine did th...
[ "c#", "sms", "newline", "gsm" ]
0
1
5,223
3
0
2011-06-01T09:12:29.803000
2011-06-07T13:32:57.323000
6,198,809
6,200,993
how to use XPath query to get text under certain element but not in any element?
Not sure if this title make sense. The piece of HTML is like this: XXXX MMM ZZZZ NNN OOO How to use XPath query pattern to get the text "MMM" and "NNN"? Thank you.
If you want the text for a node with a particular id, then use the following expression: //div[@id='A']/text()
how to use XPath query to get text under certain element but not in any element? Not sure if this title make sense. The piece of HTML is like this: XXXX MMM ZZZZ NNN OOO How to use XPath query pattern to get the text "MMM" and "NNN"? Thank you.
TITLE: how to use XPath query to get text under certain element but not in any element? QUESTION: Not sure if this title make sense. The piece of HTML is like this: XXXX MMM ZZZZ NNN OOO How to use XPath query pattern to get the text "MMM" and "NNN"? Thank you. ANSWER: If you want the text for a node with a particula...
[ "xpath", "html-parsing" ]
1
2
2,518
2
0
2011-06-01T09:14:04.030000
2011-06-01T12:18:11.150000
6,198,810
6,198,853
how to detect which rows are shown in UItableview
I want to update accessoryViews in UITableView, but just on the rows, which the user can actually see. How can I detect which rows are actually on the screen?
Make use of UITableview instance method -visibleCells visibleCells Returns the table cells that are visible in the receiver. - (NSArray *)visibleCells Return Value An array containing UITableViewCell objects, each representing a visible cell in the receiving table view. Availability Available in iOS 2.0 and later.
how to detect which rows are shown in UItableview I want to update accessoryViews in UITableView, but just on the rows, which the user can actually see. How can I detect which rows are actually on the screen?
TITLE: how to detect which rows are shown in UItableview QUESTION: I want to update accessoryViews in UITableView, but just on the rows, which the user can actually see. How can I detect which rows are actually on the screen? ANSWER: Make use of UITableview instance method -visibleCells visibleCells Returns the table...
[ "iphone", "objective-c", "cocoa-touch" ]
0
2
192
4
0
2011-06-01T09:14:04.377000
2011-06-01T09:18:25.513000
6,198,812
6,199,181
Determine the name of a file to download
I need to download a file from a url which has format similar to http://server.com/settings/files/1 when I paste this url in a web-browser this can determine the name of the file to download in this case scheme_563.txt, my question is how I can retrieve the name of the file (which obviously is not included in the url) ...
According to http://en.wikipedia.org/wiki/List_of_HTTP_header_fields, the Content-Disposition header includes this information Content-Disposition: attachment; filename=fname.ext Maybe this optional header is available in the response to a HTTP GET or HEAD request in this case. Note that the filename may be encoded - s...
Determine the name of a file to download I need to download a file from a url which has format similar to http://server.com/settings/files/1 when I paste this url in a web-browser this can determine the name of the file to download in this case scheme_563.txt, my question is how I can retrieve the name of the file (whi...
TITLE: Determine the name of a file to download QUESTION: I need to download a file from a url which has format similar to http://server.com/settings/files/1 when I paste this url in a web-browser this can determine the name of the file to download in this case scheme_563.txt, my question is how I can retrieve the nam...
[ "delphi", "http", "wininet" ]
5
6
932
1
0
2011-06-01T09:14:12.283000
2011-06-01T09:42:02.180000
6,198,819
6,198,871
which css3 selector to use to select last child element on hover?
is it possible, to do something like this: Something Something Something Some text Whereby, when I hover on any of the 'li' tags, the 'p' tag is affected. I know I can affect the 'span' in the example with the following: li:hover span{ /* Whatever css that is needed */ } I'm thinking of something with nth child, am I g...
I think the kinda thing you're after is jQuery's:has() selector. Unfortunately, this isn't part of any CSS spec. That would be used like this: div:has(li:hover) > p. In standard CSS though, I don't think it it's possible. If you're content to style the p when any part of the ul is hovered (which includes it's children,...
which css3 selector to use to select last child element on hover? is it possible, to do something like this: Something Something Something Some text Whereby, when I hover on any of the 'li' tags, the 'p' tag is affected. I know I can affect the 'span' in the example with the following: li:hover span{ /* Whatever css th...
TITLE: which css3 selector to use to select last child element on hover? QUESTION: is it possible, to do something like this: Something Something Something Some text Whereby, when I hover on any of the 'li' tags, the 'p' tag is affected. I know I can affect the 'span' in the example with the following: li:hover span{ ...
[ "css", "css-selectors" ]
2
2
513
1
0
2011-06-01T09:14:39.647000
2011-06-01T09:19:30.020000
6,198,821
6,199,775
Magento - get all options of a custom Widget
I'm beginig the development of Magento custom widgets, and I have create for my first Widget this custom options: Text 1 1 1 text Text 2 1 1 text With this function I get My first text value protected function _getText1() { $text1 = $this->getData('text1'); if( trim( $text1 )!= "" ){ return $text1; } } I want to know h...
as array public function getTextValuesOfMyWidget(){ $textValuesByKey = array(); foreach($this->getData() as $key => $value){ $textValuesByKey[$key] = $value->getYourValueField(); } return $textValuesByKey; } or $this->getData(); // it already returns you all values as an array
Magento - get all options of a custom Widget I'm beginig the development of Magento custom widgets, and I have create for my first Widget this custom options: Text 1 1 1 text Text 2 1 1 text With this function I get My first text value protected function _getText1() { $text1 = $this->getData('text1'); if( trim( $text1 ...
TITLE: Magento - get all options of a custom Widget QUESTION: I'm beginig the development of Magento custom widgets, and I have create for my first Widget this custom options: Text 1 1 1 text Text 2 1 1 text With this function I get My first text value protected function _getText1() { $text1 = $this->getData('text1');...
[ "magento" ]
0
2
3,618
1
0
2011-06-01T09:15:09.983000
2011-06-01T10:33:07.960000
6,198,830
6,198,856
Php problem with variables
For example I have 3 files: First index.php with following code: then vars.php with following code: and last test.class.php When I run index.php the Some Data value from $data variable is not displayed, how to make it to work?
Reading material. Because of scope. Data is within the global scope and the only thing available within a class are variables and methods within the class scope. You could do class test { function __construct() { global $data; echo $data; } } But it is not good practice to use global variables within a class. You could...
Php problem with variables For example I have 3 files: First index.php with following code: then vars.php with following code: and last test.class.php When I run index.php the Some Data value from $data variable is not displayed, how to make it to work?
TITLE: Php problem with variables QUESTION: For example I have 3 files: First index.php with following code: then vars.php with following code: and last test.class.php When I run index.php the Some Data value from $data variable is not displayed, how to make it to work? ANSWER: Reading material. Because of scope. Dat...
[ "php", "class" ]
0
1
127
4
0
2011-06-01T09:16:05.653000
2011-06-01T09:18:43.620000
6,198,837
6,198,967
Create image from Friend's profile images - Facebook/PHP
I want to create an application where I'll create an image from the application user's friends profile image. In this image there are 4 photos of friends, I want to create a new [single] image in that image all of the images will be pasted. What is the best way to go about doing this?
if i get your question right you will first need all their pictures, try the following: $facebook_friends = json_decode(file_get_contents('https://graph.facebook.com/me/friends?access_token='. $_SESSION['cookie']['access_token']), true); $friends = $facebook_friends['data']; foreach($friends as $key => $values){ echo ...
Create image from Friend's profile images - Facebook/PHP I want to create an application where I'll create an image from the application user's friends profile image. In this image there are 4 photos of friends, I want to create a new [single] image in that image all of the images will be pasted. What is the best way t...
TITLE: Create image from Friend's profile images - Facebook/PHP QUESTION: I want to create an application where I'll create an image from the application user's friends profile image. In this image there are 4 photos of friends, I want to create a new [single] image in that image all of the images will be pasted. What...
[ "php", "facebook", "facebook-graph-api" ]
0
0
794
2
0
2011-06-01T09:16:55.400000
2011-06-01T09:25:15.927000
6,198,848
6,198,945
Heroku help: ActionView::Template::Error (Permission de nied
I get this error on heroku: 2011-06-01T09:13:29+00:00 app[web.1]: Started GET "/" for MYIP at 2011 -06-01 11:13:29 +0200 2011-06-01T09:13:29+00:00 app[web.1]: 2011-06-01T09:13:29+00:00 app[web.1]: ActionView::Template::Error (Permission de nied - /app/public/javascripts/.permissions_check.6011580.1.163351): 2011-06-01T...
Your application is attempting to compile your javascript files into one and then cache it on the disk, which Heroku won't allow as it does not allow write access to disk. Remove the:cache => true from your javascript_include_tag line and find an alternate method to doing this for Heroku.
Heroku help: ActionView::Template::Error (Permission de nied I get this error on heroku: 2011-06-01T09:13:29+00:00 app[web.1]: Started GET "/" for MYIP at 2011 -06-01 11:13:29 +0200 2011-06-01T09:13:29+00:00 app[web.1]: 2011-06-01T09:13:29+00:00 app[web.1]: ActionView::Template::Error (Permission de nied - /app/public/...
TITLE: Heroku help: ActionView::Template::Error (Permission de nied QUESTION: I get this error on heroku: 2011-06-01T09:13:29+00:00 app[web.1]: Started GET "/" for MYIP at 2011 -06-01 11:13:29 +0200 2011-06-01T09:13:29+00:00 app[web.1]: 2011-06-01T09:13:29+00:00 app[web.1]: ActionView::Template::Error (Permission de n...
[ "ruby-on-rails", "ruby", "ruby-on-rails-3" ]
0
2
518
1
0
2011-06-01T09:17:40.937000
2011-06-01T09:23:56.050000
6,198,849
6,199,066
is this an MVC?
this is a General Question about MVC.. I wrote a PHP Class that send an Array with Core JsonData Strings to Jquery.. and on Jquery i´m accessing the data and add them to my views (.append("htm stuff"+jsondata) ) now the Jquery is calling the data from a between.php page that has a catch block with many cases, and upon ...
Looking at the code you posted in your other post it is not a MVC implementation. Or at least it is a bad implementation. The MVC is about seperating your presentation from your business logic. Looking at your POST class you don't seperate your business logic from your view: public static function readPosts(){ $query =...
is this an MVC? this is a General Question about MVC.. I wrote a PHP Class that send an Array with Core JsonData Strings to Jquery.. and on Jquery i´m accessing the data and add them to my views (.append("htm stuff"+jsondata) ) now the Jquery is calling the data from a between.php page that has a catch block with many ...
TITLE: is this an MVC? QUESTION: this is a General Question about MVC.. I wrote a PHP Class that send an Array with Core JsonData Strings to Jquery.. and on Jquery i´m accessing the data and add them to my views (.append("htm stuff"+jsondata) ) now the Jquery is calling the data from a between.php page that has a catc...
[ "php", "jquery", "model-view-controller", "design-patterns" ]
1
2
667
3
0
2011-06-01T09:17:48.290000
2011-06-01T09:32:37.140000
6,198,851
6,198,907
Simple Regex c#, Replace and Split Question
I am trying to remove " from a string using Regex. I am receiving a string into a method, I would like to take the string and split it up into the words that are in the string. My Code is below, hopefully you can see what I am doing. The problem I am having is trying to tell Regex that " is what I would like to remove....
Just use: myString = myString.Replace( "\"", String.Empty ); [Update] The String.Empty or "" is not a space char. You wrote this blah="blah" la="la" ta="ta" you want to convert to blah blah la la ta ta So you have white spaces anyway. If you want this: blahblahlalatata you need to remove them too: myString = myString.R...
Simple Regex c#, Replace and Split Question I am trying to remove " from a string using Regex. I am receiving a string into a method, I would like to take the string and split it up into the words that are in the string. My Code is below, hopefully you can see what I am doing. The problem I am having is trying to tell ...
TITLE: Simple Regex c#, Replace and Split Question QUESTION: I am trying to remove " from a string using Regex. I am receiving a string into a method, I would like to take the string and split it up into the words that are in the string. My Code is below, hopefully you can see what I am doing. The problem I am having ...
[ "c#", "regex", "replace", "split" ]
0
3
974
5
0
2011-06-01T09:18:02.497000
2011-06-01T09:21:42.393000
6,198,857
6,199,139
get information of install app in android
hello expert, i need build app that share mobile app to second mobile so that i need know that how can i get all app information like: name,date,icon,etc. package com.AppInfo; import java.util.ArrayList; import java.util.List; import android.app.Activity; import android.content.pm.PackageInfo; import android.content.p...
checkout this: http://www.androidsnippets.com/get-installed-applications-with-name-package-name-version-and-icon
get information of install app in android hello expert, i need build app that share mobile app to second mobile so that i need know that how can i get all app information like: name,date,icon,etc. package com.AppInfo; import java.util.ArrayList; import java.util.List; import android.app.Activity; import android.conten...
TITLE: get information of install app in android QUESTION: hello expert, i need build app that share mobile app to second mobile so that i need know that how can i get all app information like: name,date,icon,etc. package com.AppInfo; import java.util.ArrayList; import java.util.List; import android.app.Activity; imp...
[ "android" ]
2
1
5,005
4
0
2011-06-01T09:18:51.583000
2011-06-01T09:38:25.200000
6,198,859
6,199,002
Make webpage available offline using cURL?
Is there any opensource tool built using cURL that downloads a single webpage and makes it available offline? Thanks
Mulk Multi-connection command line tool to download Internet sites. Similar to wget and cURL, but it manages up to 50 parallel links. Main features are: recursive fetching, Metalink retrieving, segmented download and image filtering by width and height. Or you could use wget if it also suits your needs.
Make webpage available offline using cURL? Is there any opensource tool built using cURL that downloads a single webpage and makes it available offline? Thanks
TITLE: Make webpage available offline using cURL? QUESTION: Is there any opensource tool built using cURL that downloads a single webpage and makes it available offline? Thanks ANSWER: Mulk Multi-connection command line tool to download Internet sites. Similar to wget and cURL, but it manages up to 50 parallel links....
[ "curl", "html", "offline" ]
1
1
831
1
0
2011-06-01T09:18:55.910000
2011-06-01T09:27:52.993000
6,198,863
6,198,961
Oracle: Import CSV file
I've been searching for a while now but can't seem to find answers so here goes... I've got a CSV file that I want to import into a table in Oracle (9i/10i). Later on I plan to use this table as a lookup for another use. This is actually a workaround I'm working on since the fact that querying using the IN clause with ...
SQL Loader helps load csv files into tables: SQL*Loader If you want sqlplus only, then it gets a bit complicated. You need to locate your sqlloader script and csv file, then run the sqlldr command.
Oracle: Import CSV file I've been searching for a while now but can't seem to find answers so here goes... I've got a CSV file that I want to import into a table in Oracle (9i/10i). Later on I plan to use this table as a lookup for another use. This is actually a workaround I'm working on since the fact that querying u...
TITLE: Oracle: Import CSV file QUESTION: I've been searching for a while now but can't seem to find answers so here goes... I've got a CSV file that I want to import into a table in Oracle (9i/10i). Later on I plan to use this table as a lookup for another use. This is actually a workaround I'm working on since the fa...
[ "oracle", "csv", "import", "sqlplus", "sql-loader" ]
40
29
203,016
7
0
2011-06-01T09:19:05.297000
2011-06-01T09:24:58.600000
6,198,870
6,202,643
ASP.NET MVC3 - Dynamically adding an item to array on object
I'm working on a website where the user should be able to fill out a dynamic expanding form. I would add a row with greyed out fields and when the user gives focus to one of those field the following javascript would add the line $('.unSelected').focusin(function () { if ($(this).hasClass('unSelected')) { var row = $(t...
In ASP.NET MVC, if you have a model class like: public class PageModel { public Collection RowItems { get; set; } } public class RowItem { public int Id {get;set;} public string MoreFields { get; set; } } And your javascript adds rows like so: The default model binder in MVC should resolve it just fine when it gets po...
ASP.NET MVC3 - Dynamically adding an item to array on object I'm working on a website where the user should be able to fill out a dynamic expanding form. I would add a row with greyed out fields and when the user gives focus to one of those field the following javascript would add the line $('.unSelected').focusin(func...
TITLE: ASP.NET MVC3 - Dynamically adding an item to array on object QUESTION: I'm working on a website where the user should be able to fill out a dynamic expanding form. I would add a row with greyed out fields and when the user gives focus to one of those field the following javascript would add the line $('.unSelec...
[ "c#", "javascript", "jquery", "asp.net-mvc-3" ]
5
3
4,979
4
0
2011-06-01T09:19:26.730000
2011-06-01T14:16:31.227000
6,198,879
6,204,254
Lauch4j .ini file specify jre path
I am using Launch4j with a bundled jre version. The path of the jre version has to be configurable, so I though using the.ini file. I don't understand the documentations on the launch4j website, so I'm coming here for help. Here is the part of my launch4j config: %JRE_PATH% preferJre and this is in my myapp.l4j.ini: -J...
I took a look at launch4j documentation for its configuration file and also for additional JVM options (which is where xxx.l4j.ini is mentioned). I think you are misunderstanding what you can do with the.ini file. I think it is just intended as a place where you can specify runtime JVM options (e.g. -D and -X args) for...
Lauch4j .ini file specify jre path I am using Launch4j with a bundled jre version. The path of the jre version has to be configurable, so I though using the.ini file. I don't understand the documentations on the launch4j website, so I'm coming here for help. Here is the part of my launch4j config: %JRE_PATH% preferJre ...
TITLE: Lauch4j .ini file specify jre path QUESTION: I am using Launch4j with a bundled jre version. The path of the jre version has to be configurable, so I though using the.ini file. I don't understand the documentations on the launch4j website, so I'm coming here for help. Here is the part of my launch4j config: %JR...
[ "java", "ant", "bundle", "launch4j" ]
0
3
7,888
2
0
2011-06-01T09:20:12.713000
2011-06-01T16:07:36.530000
6,198,885
6,199,383
OutOfMemory GC overhead limit exceeded to acquire lock on log4j Objects
Can anyone please help me to identify the exact are of problem. Is it either JVM, Log4j or something else in our application? We are running a multi-threaded application using JDK 1.6.0.24 on Solaris 10 (SUNW,Sun-Fire-V240) Server. Which has RMI call to communicate to the client. Our application went hanged.I have seen...
This problem description appears to be similar to that of bug 41214. I'm not sure if this related to your problem, but some of the elements in your posted stack trace are similar to the ones in that bug. You might therefore, want to follow up on Stephen's advice to verify if you have too many logger calls from multiple...
OutOfMemory GC overhead limit exceeded to acquire lock on log4j Objects Can anyone please help me to identify the exact are of problem. Is it either JVM, Log4j or something else in our application? We are running a multi-threaded application using JDK 1.6.0.24 on Solaris 10 (SUNW,Sun-Fire-V240) Server. Which has RMI ca...
TITLE: OutOfMemory GC overhead limit exceeded to acquire lock on log4j Objects QUESTION: Can anyone please help me to identify the exact are of problem. Is it either JVM, Log4j or something else in our application? We are running a multi-threaded application using JDK 1.6.0.24 on Solaris 10 (SUNW,Sun-Fire-V240) Server...
[ "java", "log4j", "java-6" ]
8
3
7,561
3
0
2011-06-01T09:20:30.717000
2011-06-01T09:58:59.603000
6,198,891
6,199,012
PHP paging with jquery and ajax
Anyone know how to do paging with php. like this: First 1 2 3 4 5 6 7... 10 11 12 Next Last. 10 15 20 per page. is it possible to do that with jquery and ajax? Thanks for any help. Good luck.
you may be interested in this: www.datatables.net It's a plugin for jquery wich provides easy server side paging options.
PHP paging with jquery and ajax Anyone know how to do paging with php. like this: First 1 2 3 4 5 6 7... 10 11 12 Next Last. 10 15 20 per page. is it possible to do that with jquery and ajax? Thanks for any help. Good luck.
TITLE: PHP paging with jquery and ajax QUESTION: Anyone know how to do paging with php. like this: First 1 2 3 4 5 6 7... 10 11 12 Next Last. 10 15 20 per page. is it possible to do that with jquery and ajax? Thanks for any help. Good luck. ANSWER: you may be interested in this: www.datatables.net It's a plugin for ...
[ "php", "jquery", "ajax", "pagination" ]
0
0
1,971
4
0
2011-06-01T09:20:50.623000
2011-06-01T09:28:22.880000
6,198,904
6,201,910
What is the windows batch command to remove a path regardless it is file or folder?
Let's say we have a file or a folder named c:\temp and we need to remove it if it exists. What is the command to do it?
Err... why not do both?:) rd /q /s c:\temp del /q c:\temp One of them will succeed if C:\temp is either a file or a folder and the other one will fail. If both fails, it means that it couldn't be deleted or not found. You can even make it a batch file if you don't want to type both commands in all the time.
What is the windows batch command to remove a path regardless it is file or folder? Let's say we have a file or a folder named c:\temp and we need to remove it if it exists. What is the command to do it?
TITLE: What is the windows batch command to remove a path regardless it is file or folder? QUESTION: Let's say we have a file or a folder named c:\temp and we need to remove it if it exists. What is the command to do it? ANSWER: Err... why not do both?:) rd /q /s c:\temp del /q c:\temp One of them will succeed if C:\...
[ "file", "command-line", "batch-file", "directory" ]
1
2
419
4
0
2011-06-01T09:21:24.437000
2011-06-01T13:26:55.980000
6,198,916
6,198,932
Custom sorting of list based on date
I got: List list = new ArrayList (); My class Comment contains: id, name and date; I got some function that adds specified Comments, but I would like to order after that my list by date descending. How to do it with this: Collections.sort(list, comparator)?
You'll have to implement a Comparator that implements the compare method based on the date field, and pass this object to the Collections.sort. Here's a complete example: import java.util.*; class Comment { String id, String name; Date date; public Comment(String id, String name, Date date) { this.id = id; this.name ...
Custom sorting of list based on date I got: List list = new ArrayList (); My class Comment contains: id, name and date; I got some function that adds specified Comments, but I would like to order after that my list by date descending. How to do it with this: Collections.sort(list, comparator)?
TITLE: Custom sorting of list based on date QUESTION: I got: List list = new ArrayList (); My class Comment contains: id, name and date; I got some function that adds specified Comments, but I would like to order after that my list by date descending. How to do it with this: Collections.sort(list, comparator)? ANSWER...
[ "java", "arraylist", "compare" ]
4
3
13,728
3
0
2011-06-01T09:22:19.490000
2011-06-01T09:23:24.250000
6,198,917
6,199,179
Android signing problem
i am trying to sign an apk by following this guide. I created a keytools folder in C:\Users\Family\workspace\ and a keys folder in the newly created keytools folder. So now i have C:\Users\Family\workspace\keytools and C:\Users\Family\workspace\keytools\keys folders. I copied the debug.keystore into the keys folder and...
Hallo If you using Eclipse you can try: Compile and sign with Eclipse ADT If you are using Eclipse with the ADT plugin, you can use the Export Wizard to export a signed.apk (and even create a new keystore, if necessary). The Export Wizard performs all the interaction with the Keytool and Jarsigner for you, which allows...
Android signing problem i am trying to sign an apk by following this guide. I created a keytools folder in C:\Users\Family\workspace\ and a keys folder in the newly created keytools folder. So now i have C:\Users\Family\workspace\keytools and C:\Users\Family\workspace\keytools\keys folders. I copied the debug.keystore ...
TITLE: Android signing problem QUESTION: i am trying to sign an apk by following this guide. I created a keytools folder in C:\Users\Family\workspace\ and a keys folder in the newly created keytools folder. So now i have C:\Users\Family\workspace\keytools and C:\Users\Family\workspace\keytools\keys folders. I copied t...
[ "android", "sign" ]
3
3
4,275
2
0
2011-06-01T09:22:26.533000
2011-06-01T09:42:01.080000
6,198,919
6,201,740
SQL 2008. How to amend partition schema to make new partitions to lay in new filegroup?
I am going to partition my tables by 1 day of data in each. For backup/archiving purposes I might need to store few months of data in different file groups. My plan is something like: all partitions (1 day each) for 2010 in one file then 2011 in another. But by the end of 2011 I will need to create new data file and ne...
In terms of how you create a new partition into a new filegroup, before splitting the partition function you use the ALTER PARTITION SCHEMA syntax: ALTER PARTITION SCHEME YourPartitionSchemeName NEXT USED yourChosenFileGroup http://msdn.microsoft.com/en-us/library/ms190347.aspx
SQL 2008. How to amend partition schema to make new partitions to lay in new filegroup? I am going to partition my tables by 1 day of data in each. For backup/archiving purposes I might need to store few months of data in different file groups. My plan is something like: all partitions (1 day each) for 2010 in one file...
TITLE: SQL 2008. How to amend partition schema to make new partitions to lay in new filegroup? QUESTION: I am going to partition my tables by 1 day of data in each. For backup/archiving purposes I might need to store few months of data in different file groups. My plan is something like: all partitions (1 day each) fo...
[ "sql-server", "sql-server-2008", "partitioning" ]
0
3
1,591
1
0
2011-06-01T09:22:28.633000
2011-06-01T13:16:33.057000
6,198,923
6,205,081
How can i send custom headers with URLRequest
I want to add Authorization header to my requests. I added the following line in crossdomain.xml of the server: And still, the header is not sent (checked with Wireshark). Am i missing something? EDIT: the code of the urlRequest: var request:URLRequest = new URLRequest(); request.method = URLRequestMethod.POST; request...
Here's an implementation that I recently made that worked great for me: var url:String = _baseURL + "/utils.php"; var headers:Array = [ new URLRequestHeader("_sessionKey", _sessionKey), new URLRequestHeader("_userId", _sessionUserId) ]; var request:URLRequest = new URLRequest(); request.requestHeaders = headers; requ...
How can i send custom headers with URLRequest I want to add Authorization header to my requests. I added the following line in crossdomain.xml of the server: And still, the header is not sent (checked with Wireshark). Am i missing something? EDIT: the code of the urlRequest: var request:URLRequest = new URLRequest(); r...
TITLE: How can i send custom headers with URLRequest QUESTION: I want to add Authorization header to my requests. I added the following line in crossdomain.xml of the server: And still, the header is not sent (checked with Wireshark). Am i missing something? EDIT: the code of the urlRequest: var request:URLRequest = n...
[ "flash", "apache-flex", "actionscript-3" ]
5
9
13,662
1
0
2011-06-01T09:22:53.963000
2011-06-01T17:10:54.663000
6,198,930
6,199,059
Switch the GPS location provider automatically
Is there any methods to automatically switch the android GPS_PROVIDER and NETWORK_PROVIDER, according to the current best provider? Currently I'm using the following code to find the best provider and request the locationupdates using the best provider. Criteria criteria = new Criteria(); criteria.setAccuracy(Criteria....
Follow the guidelines in the Obtaining User Location topic. You would need to listen to both providers and then decide, which one is offering more accurate results.
Switch the GPS location provider automatically Is there any methods to automatically switch the android GPS_PROVIDER and NETWORK_PROVIDER, according to the current best provider? Currently I'm using the following code to find the best provider and request the locationupdates using the best provider. Criteria criteria =...
TITLE: Switch the GPS location provider automatically QUESTION: Is there any methods to automatically switch the android GPS_PROVIDER and NETWORK_PROVIDER, according to the current best provider? Currently I'm using the following code to find the best provider and request the locationupdates using the best provider. C...
[ "android", "gps" ]
2
1
2,724
1
0
2011-06-01T09:23:22.843000
2011-06-01T09:31:56.610000
6,198,937
6,199,079
Printing graphics on multiple pages using System.Drawing.Printing, based on the used coordinates in C#
Using System.Drawing.Printing, I want to print a set of lines on print document. But the problem is it prints every line on the very first page, what ever the coordinates are, also if I draw an image, It prints that on a single page no matter how big it is. Following is what I have done for printing text on multiple pa...
This is not how printing works in.NET. It does not create a new page just because you print outside the coordinates of the current page. There are events and event arguments which.NET uses to ask from you how many pages your document will contain. It will then invoke the event for printing a page for every page. See he...
Printing graphics on multiple pages using System.Drawing.Printing, based on the used coordinates in C# Using System.Drawing.Printing, I want to print a set of lines on print document. But the problem is it prints every line on the very first page, what ever the coordinates are, also if I draw an image, It prints that o...
TITLE: Printing graphics on multiple pages using System.Drawing.Printing, based on the used coordinates in C# QUESTION: Using System.Drawing.Printing, I want to print a set of lines on print document. But the problem is it prints every line on the very first page, what ever the coordinates are, also if I draw an image...
[ "c#", "printing" ]
3
1
4,300
1
0
2011-06-01T09:23:29.997000
2011-06-01T09:33:11.990000
6,198,940
6,204,359
Is there a VB6 function analagous to C's sscanf?
I'm trying to read in a file consisting of lines of text of the following sort of form... first value 1352.2 second value 12 third value 32323 first value 1233.2 second value 22 third value 23333 first value 1233.1 second value 21 third value 64344 so I'm looking for a function analagous to fscanf or sscanf to munch ea...
While MarkJ has given you the VB6 way of doing things, you may want to check out FWIW: http://www.freevbcode.com/ShowCode.asp?ID=3806 "C String Functions SScanf and StrTok Implemented in VB" It implements a function ScanString() that's supposed to be an emulation of sscanf().
Is there a VB6 function analagous to C's sscanf? I'm trying to read in a file consisting of lines of text of the following sort of form... first value 1352.2 second value 12 third value 32323 first value 1233.2 second value 22 third value 23333 first value 1233.1 second value 21 third value 64344 so I'm looking for a f...
TITLE: Is there a VB6 function analagous to C's sscanf? QUESTION: I'm trying to read in a file consisting of lines of text of the following sort of form... first value 1352.2 second value 12 third value 32323 first value 1233.2 second value 22 third value 23333 first value 1233.1 second value 21 third value 64344 so I...
[ "vb6", "input" ]
3
2
2,910
4
0
2011-06-01T09:23:38.767000
2011-06-01T16:15:29.867000
6,198,942
6,199,431
Image calling from external server hangs IE6
I Have Table with multiple columns and rows, Example, Head 1 Head 2 Head 3 Data 1 //Image is loaded from external URL. Data 3 Problem: This is working fine in all the browser but in IE6 browser hangs. My Table just having 10 records. (If I remove the image then working fine.) Please some one give me some ideas on this ...
It is a cross-browser issue. Have you tried to not close the img tag? I mean try this, BTW, it should not matter, actually.
Image calling from external server hangs IE6 I Have Table with multiple columns and rows, Example, Head 1 Head 2 Head 3 Data 1 //Image is loaded from external URL. Data 3 Problem: This is working fine in all the browser but in IE6 browser hangs. My Table just having 10 records. (If I remove the image then working fine....
TITLE: Image calling from external server hangs IE6 QUESTION: I Have Table with multiple columns and rows, Example, Head 1 Head 2 Head 3 Data 1 //Image is loaded from external URL. Data 3 Problem: This is working fine in all the browser but in IE6 browser hangs. My Table just having 10 records. (If I remove the image ...
[ "html", "image", "jsp", "internet-explorer-6", "jstl" ]
0
0
125
1
0
2011-06-01T09:23:50.153000
2011-06-01T10:03:25.017000
6,198,946
6,199,030
Http java file download problem
Trying to download file with apache httpclient library and have a problem with resulting file being smaller than the original (approximately 32-32kb, when normal file size is 92-93) and cannot be opened normally in pdf viewer. Can someone explain me why this can be happening? (Using firefox to download this file can so...
Try changing to while ((bytesRead = in.read(buffer))!= -1) { byte[] tmp = ArrayUtils.subarray(buffer, 0, bytesRead); fos.write(tmp); } you mite get 0 bytes back but that does not mean its finished.Also write only bytes that you received not buffer.
Http java file download problem Trying to download file with apache httpclient library and have a problem with resulting file being smaller than the original (approximately 32-32kb, when normal file size is 92-93) and cannot be opened normally in pdf viewer. Can someone explain me why this can be happening? (Using fire...
TITLE: Http java file download problem QUESTION: Trying to download file with apache httpclient library and have a problem with resulting file being smaller than the original (approximately 32-32kb, when normal file size is 92-93) and cannot be opened normally in pdf viewer. Can someone explain me why this can be happ...
[ "java", "http", "url", "download", "httpclient" ]
2
3
3,031
4
0
2011-06-01T09:24:01.243000
2011-06-01T09:29:33.873000
6,198,947
6,212,749
How to get text from each cell of an HTML table?
In Selenium 2.0, I have no idea how to traverse through a HTML table in a webpage. In selenium2.0 javadoc, I found two classes "TableFinder" and "TableCellFinder", but I couldn't find any examples. I want to do something like this: RowCount=Get how many rows are there in the html table for each row of the table { colu...
Thanks for the earlier reply. I figured out the solutions using selenium 2.0 classes. import java.util.List; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.ie.InternetExplorerDriver; public class WebTableExample { public static vo...
How to get text from each cell of an HTML table? In Selenium 2.0, I have no idea how to traverse through a HTML table in a webpage. In selenium2.0 javadoc, I found two classes "TableFinder" and "TableCellFinder", but I couldn't find any examples. I want to do something like this: RowCount=Get how many rows are there in...
TITLE: How to get text from each cell of an HTML table? QUESTION: In Selenium 2.0, I have no idea how to traverse through a HTML table in a webpage. In selenium2.0 javadoc, I found two classes "TableFinder" and "TableCellFinder", but I couldn't find any examples. I want to do something like this: RowCount=Get how many...
[ "selenium", "selenium-webdriver" ]
25
47
148,798
6
0
2011-06-01T09:24:04.180000
2011-06-02T09:35:55.327000
6,198,952
6,199,735
How to change colors for ":sign" area in VIM?
VIM supports:sign command that is widely used in debuggers to display graphical breakpoints to the left. How can i find correct names for background and foreground colors of this area in order to change them?
I believe you're looking for the SignColumn highlight group. For future reference, I found this by running:help highlight, then running the snippet found there that displays all active highlight groups (pasted here for convenience).:so $VIMRUNTIME/syntax/hitest.vim
How to change colors for ":sign" area in VIM? VIM supports:sign command that is widely used in debuggers to display graphical breakpoints to the left. How can i find correct names for background and foreground colors of this area in order to change them?
TITLE: How to change colors for ":sign" area in VIM? QUESTION: VIM supports:sign command that is widely used in debuggers to display graphical breakpoints to the left. How can i find correct names for background and foreground colors of this area in order to change them? ANSWER: I believe you're looking for the SignC...
[ "vim" ]
4
10
1,176
2
0
2011-06-01T09:24:33.180000
2011-06-01T10:29:42.463000
6,198,954
6,199,125
Django bug : ImproperlyConfigured at /databrowse/ . How to solve this bug?
My urls.py of the project looks like this from django.conf import settings from django.conf.urls.defaults import * from django.contrib import admin from django.contrib import databrowse from world.views import welcome admin.autodiscover() urlpatterns = patterns('', (r'^$', welcome), (r'^admin/doc/', include('django.c...
The only change you have to make is to follow the actual documentation. The documentation doesn't use include for databrowse.
Django bug : ImproperlyConfigured at /databrowse/ . How to solve this bug? My urls.py of the project looks like this from django.conf import settings from django.conf.urls.defaults import * from django.contrib import admin from django.contrib import databrowse from world.views import welcome admin.autodiscover() urlp...
TITLE: Django bug : ImproperlyConfigured at /databrowse/ . How to solve this bug? QUESTION: My urls.py of the project looks like this from django.conf import settings from django.conf.urls.defaults import * from django.contrib import admin from django.contrib import databrowse from world.views import welcome admin.au...
[ "django" ]
0
3
371
1
0
2011-06-01T09:24:37.633000
2011-06-01T09:37:17.420000
6,198,958
6,201,342
Spring / JPA / Hibernate / PostgreSQL throws EntityNotFoundException in nested transaction
I have the following setup: Spring -> JPA -> Hibernate -> PostgreSQL I've created a service layer which offers some "@Transactional" methods to insert data. The data is in the concrete case a person entity which has to be connected to a category entity (identifying relation) and some picture entities (non identifying r...
If you are using proxies (the Spring default of transaction handling) the @Transactional annotation is ignored when methods are being called within a class. The following will not work: @Transactional public void doStuff() { this.doSomeOtherStuff(); } @Transactional(propagation=Propagation.REQUIRES_NEW) public void do...
Spring / JPA / Hibernate / PostgreSQL throws EntityNotFoundException in nested transaction I have the following setup: Spring -> JPA -> Hibernate -> PostgreSQL I've created a service layer which offers some "@Transactional" methods to insert data. The data is in the concrete case a person entity which has to be connect...
TITLE: Spring / JPA / Hibernate / PostgreSQL throws EntityNotFoundException in nested transaction QUESTION: I have the following setup: Spring -> JPA -> Hibernate -> PostgreSQL I've created a service layer which offers some "@Transactional" methods to insert data. The data is in the concrete case a person entity which...
[ "hibernate", "spring", "postgresql", "jpa" ]
2
1
1,401
1
0
2011-06-01T09:24:46.347000
2011-06-01T12:45:30.700000
6,198,962
6,198,983
How to get distance <500?
This is my query to calculate distance using latitude longitude values. SELECT mm.mem_id, mm.profilenam, mm.photo_thumb, mm.city, mm.zip, mm.country, mm.state, ( 3956 *2 * ASIN( SQRT( POWER( SIN( ( 34.1012181 - ABS( latitude ) ) * PI( ) /180 /2 ), 2 ) + COS( 34.1012181 * PI( ) /180 ) * COS( ABS( latitude ) * PI( ) /180...
Have you tried SELECT mm.mem_id, mm.profilenam, mm.photo_thumb, mm.city, mm.zip, mm.country, mm.state, ( 3956 *2 * ASIN( SQRT( POWER( SIN( ( 34.1012181 - ABS( latitude ) ) * PI( ) /180 /2 ), 2 ) + COS( 34.1012181 * PI( ) /180 ) * COS( ABS( latitude ) * PI( ) /180 ) * POWER( SIN( ( ABS( - 118.325739 ) - ABS( longitude )...
How to get distance <500? This is my query to calculate distance using latitude longitude values. SELECT mm.mem_id, mm.profilenam, mm.photo_thumb, mm.city, mm.zip, mm.country, mm.state, ( 3956 *2 * ASIN( SQRT( POWER( SIN( ( 34.1012181 - ABS( latitude ) ) * PI( ) /180 /2 ), 2 ) + COS( 34.1012181 * PI( ) /180 ) * COS( AB...
TITLE: How to get distance <500? QUESTION: This is my query to calculate distance using latitude longitude values. SELECT mm.mem_id, mm.profilenam, mm.photo_thumb, mm.city, mm.zip, mm.country, mm.state, ( 3956 *2 * ASIN( SQRT( POWER( SIN( ( 34.1012181 - ABS( latitude ) ) * PI( ) /180 /2 ), 2 ) + COS( 34.1012181 * PI( ...
[ "php", "mysql" ]
1
2
199
2
0
2011-06-01T09:24:59.427000
2011-06-01T09:26:35.420000
6,198,979
6,199,398
Disabling Eclipse's spelling error quick fix
If I type a method name that does not exist, Eclipse always offers me a quick fix (ctrl+1 or cmd+1) to create the method. For example, if I type handleIntent which is a non-existant method, Eclipse suggests Create method handleIntent(Intent). However, in certain cases, Eclipse also suggests a quick fix that offers a di...
A plugin can contribute a quick fix processor (extension point org.eclipse.jdt.ui.quickFixProcessors ) that will propose quick fixes to solve a warning or an error in an editor. The jdt ui plugin contributes two of those, a default quick fix processor and a spelling quick fix processor. It assume that those are used to...
Disabling Eclipse's spelling error quick fix If I type a method name that does not exist, Eclipse always offers me a quick fix (ctrl+1 or cmd+1) to create the method. For example, if I type handleIntent which is a non-existant method, Eclipse suggests Create method handleIntent(Intent). However, in certain cases, Eclip...
TITLE: Disabling Eclipse's spelling error quick fix QUESTION: If I type a method name that does not exist, Eclipse always offers me a quick fix (ctrl+1 or cmd+1) to create the method. For example, if I type handleIntent which is a non-existant method, Eclipse suggests Create method handleIntent(Intent). However, in ce...
[ "java", "eclipse" ]
0
2
1,634
3
0
2011-06-01T09:26:15.643000
2011-06-01T10:00:52.133000
6,198,981
6,199,207
Framework to create a community in ASP.NET
I received an assignment to develop a community to a club with about 1,000 members. Members shall be able to keep in touch, post pictures/movies and read about/register for events the club arranged. I am looking to develop this in ASP.NET as it is what I know best (is it a wise choice?). I wonder if you could recommend...
You could either use: DotNetNuke, Umbraco, MojoPortal or the likes - most of the code is already written, but creating new modules/features is not that easy/simple. n2cms, Project Orchard - were made just to be especially to extend, although they have less built-ins.
Framework to create a community in ASP.NET I received an assignment to develop a community to a club with about 1,000 members. Members shall be able to keep in touch, post pictures/movies and read about/register for events the club arranged. I am looking to develop this in ASP.NET as it is what I know best (is it a wis...
TITLE: Framework to create a community in ASP.NET QUESTION: I received an assignment to develop a community to a club with about 1,000 members. Members shall be able to keep in touch, post pictures/movies and read about/register for events the club arranged. I am looking to develop this in ASP.NET as it is what I know...
[ "c#", "asp.net", "asp.net-mvc", "asp.net-mvc-3" ]
1
0
323
4
0
2011-06-01T09:26:22.377000
2011-06-01T09:44:32.047000
6,198,986
6,199,346
How can I replace non-printable Unicode characters in Java?
The following will replace ASCII control characters (shorthand for [\x00-\x1F\x7F] ): my_string.replaceAll("\\p{Cntrl}", "?"); The following will replace all ASCII non-printable characters (shorthand for [\p{Graph}\x20] ), including accented characters: my_string.replaceAll("[^\\p{Print}]", "?"); However, neither works...
my_string.replaceAll("\\p{C}", "?"); See more about Unicode regex. java.util.regexPattern / String.replaceAll supports them.
How can I replace non-printable Unicode characters in Java? The following will replace ASCII control characters (shorthand for [\x00-\x1F\x7F] ): my_string.replaceAll("\\p{Cntrl}", "?"); The following will replace all ASCII non-printable characters (shorthand for [\p{Graph}\x20] ), including accented characters: my_str...
TITLE: How can I replace non-printable Unicode characters in Java? QUESTION: The following will replace ASCII control characters (shorthand for [\x00-\x1F\x7F] ): my_string.replaceAll("\\p{Cntrl}", "?"); The following will replace all ASCII non-printable characters (shorthand for [\p{Graph}\x20] ), including accented ...
[ "java", "string", "unicode" ]
101
169
171,758
9
0
2011-06-01T09:26:48.023000
2011-06-01T09:56:01.467000
6,198,987
6,199,123
How add the string in listview and strech it in row?
Create one listview and add the item in listview like listview1.Items.Add(new ListViewItem("hello i am working in C#"); I would like to output like this: hello i am working in C# Instead of this i am getting like this: hello..... When click that I got like this: hello i am working in C# How can I solve this?
set listView1.View=View.List; For more information: ListView.View Property
How add the string in listview and strech it in row? Create one listview and add the item in listview like listview1.Items.Add(new ListViewItem("hello i am working in C#"); I would like to output like this: hello i am working in C# Instead of this i am getting like this: hello..... When click that I got like this: hell...
TITLE: How add the string in listview and strech it in row? QUESTION: Create one listview and add the item in listview like listview1.Items.Add(new ListViewItem("hello i am working in C#"); I would like to output like this: hello i am working in C# Instead of this i am getting like this: hello..... When click that I g...
[ "c#", "winforms", "listview", "stretch" ]
0
2
3,723
1
0
2011-06-01T09:26:51.510000
2011-06-01T09:37:14.530000