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,991 | 6,200,016 | Python development - elementtree XML and string operations | I am using ElementTree to load up a series of XML files and parse them. As a file is parsed, I am grabbing a few bits of data from it ( a headline and a paragraph of text). I then need to grab some file names that are stored in the XML. They are contained in an element called ContentItem. My code looks a bit like this:... | You get a tuple because you supply a tuple (the parentheses) as the default return value for url.get(). Supply an empty string, and you can use its.endswith() method. Also note that the element itself has a get() method to retrieve attribute values (you do not have to go via.attrib ). Example: if i.get('Href', '').ends... | Python development - elementtree XML and string operations I am using ElementTree to load up a series of XML files and parse them. As a file is parsed, I am grabbing a few bits of data from it ( a headline and a paragraph of text). I then need to grab some file names that are stored in the XML. They are contained in an... | TITLE:
Python development - elementtree XML and string operations
QUESTION:
I am using ElementTree to load up a series of XML files and parse them. As a file is parsed, I am grabbing a few bits of data from it ( a headline and a paragraph of text). I then need to grab some file names that are stored in the XML. They a... | [
"python",
"django",
"elementtree"
] | 1 | 2 | 683 | 1 | 0 | 2011-06-01T09:27:21.387000 | 2011-06-01T10:54:22.480000 |
6,198,992 | 6,199,073 | Relationship between database tables | I've got a question relating databases which i can't find the anwser for myself. Currently i got a situation where i have a database with two tables. The two tables are named items and items_sequences. What i want to do is make a relationship between the primary key of the item database and a field in the items_sequenc... | If I get this right, you want to look into using foreign keys and triggers. | Relationship between database tables I've got a question relating databases which i can't find the anwser for myself. Currently i got a situation where i have a database with two tables. The two tables are named items and items_sequences. What i want to do is make a relationship between the primary key of the item data... | TITLE:
Relationship between database tables
QUESTION:
I've got a question relating databases which i can't find the anwser for myself. Currently i got a situation where i have a database with two tables. The two tables are named items and items_sequences. What i want to do is make a relationship between the primary ke... | [
"database",
"postgresql",
"foreign-key-relationship",
"relationship"
] | 1 | 5 | 5,585 | 2 | 0 | 2011-06-01T09:27:23.507000 | 2011-06-01T09:32:51.907000 |
6,198,994 | 6,199,076 | updating time of datetime field using linq | I have two fields in my database for storing starttime and endtime. they are of datetime. I pick time from them using tostring("hh:mm tt"). Now I want to update only the time part of the date. I have dropdownlist to select hour and minutes and AM/PM. How can I update the time of date stored in sql server using Entity f... | actually you don't really need to touch the linq part of this, basically what you want to do is just to convert the string back to a datetime object and just manipulate the datetime object by either creating a new datetime object or add/minus mm/dd/yy hours or minutes. | updating time of datetime field using linq I have two fields in my database for storing starttime and endtime. they are of datetime. I pick time from them using tostring("hh:mm tt"). Now I want to update only the time part of the date. I have dropdownlist to select hour and minutes and AM/PM. How can I update the time ... | TITLE:
updating time of datetime field using linq
QUESTION:
I have two fields in my database for storing starttime and endtime. they are of datetime. I pick time from them using tostring("hh:mm tt"). Now I want to update only the time part of the date. I have dropdownlist to select hour and minutes and AM/PM. How can ... | [
"linq",
"asp.net-mvc-3",
"entity-framework-4"
] | 0 | 0 | 1,568 | 3 | 0 | 2011-06-01T09:27:31.913000 | 2011-06-01T09:33:05.513000 |
6,199,006 | 6,199,071 | Modify/replace a line in a python file using another python file | I am trying to replace/modify a part of string in a python file from another python file. The line I am trying to replace in other PY is: a.setSystemFile('D:/test/f.xml') I would like to replace the part of this line i.e. the xml path string with different xml path: Example: a.setSystemFile('C:/try/X.xml') My code look... | You forgot to do something if the line doesn't start with that text. for line in lines: if line.startswith('a.setSystemFile'): f.write(line.replace('D:/test/f.xml','C:/try/X.xml')) else: f.write(line) Also, might I suggest just using sed for this? | Modify/replace a line in a python file using another python file I am trying to replace/modify a part of string in a python file from another python file. The line I am trying to replace in other PY is: a.setSystemFile('D:/test/f.xml') I would like to replace the part of this line i.e. the xml path string with differen... | TITLE:
Modify/replace a line in a python file using another python file
QUESTION:
I am trying to replace/modify a part of string in a python file from another python file. The line I am trying to replace in other PY is: a.setSystemFile('D:/test/f.xml') I would like to replace the part of this line i.e. the xml path st... | [
"python"
] | 3 | 2 | 2,404 | 1 | 0 | 2011-06-01T09:28:06.230000 | 2011-06-01T09:32:48.840000 |
6,199,008 | 6,199,255 | Optimizations of custom ImageView that frequently refreshes by calling onDraw | I have created a custom ImageView and in its onDraw method I need to draw some bitmaps based on user interaction like touch. Everything is working fine however slowly as I start adding more and more bitmap the application really slows down. This is what I do in my onDraw of the Custom ImageView @Override protected void... | You should create a Bitmap which size must be equal to the ImageView 's image size and draw all the bitmaps from the bitmapList on this bitmap only once. On every onDraw() call you should draw only this bitmap. When the bitmapList changes, this additional bitmap must be recreated. | Optimizations of custom ImageView that frequently refreshes by calling onDraw I have created a custom ImageView and in its onDraw method I need to draw some bitmaps based on user interaction like touch. Everything is working fine however slowly as I start adding more and more bitmap the application really slows down. T... | TITLE:
Optimizations of custom ImageView that frequently refreshes by calling onDraw
QUESTION:
I have created a custom ImageView and in its onDraw method I need to draw some bitmaps based on user interaction like touch. Everything is working fine however slowly as I start adding more and more bitmap the application re... | [
"android",
"android-layout",
"android-imageview"
] | 1 | 3 | 1,439 | 2 | 0 | 2011-06-01T09:28:13.680000 | 2011-06-01T09:48:00.487000 |
6,199,011 | 6,199,034 | What is "javascript:" in a JavaScript event handler? | What is javascript: in a JavaScript event handler? Such as: | It is a mistake. The pseudo-protocol is not needed in event handlers. On a URL ( a element href attribute, for instance), if you enter javascript: and follow that with javascript, the browser will run the javascript code. For event handler, this is not needed, though the browser will not report an error. | What is "javascript:" in a JavaScript event handler? What is javascript: in a JavaScript event handler? Such as: | TITLE:
What is "javascript:" in a JavaScript event handler?
QUESTION:
What is javascript: in a JavaScript event handler? Such as:
ANSWER:
It is a mistake. The pseudo-protocol is not needed in event handlers. On a URL ( a element href attribute, for instance), if you enter javascript: and follow that with javascript, ... | [
"javascript",
"dom-events"
] | 7 | 9 | 353 | 5 | 0 | 2011-06-01T09:28:22.337000 | 2011-06-01T09:30:17.450000 |
6,199,029 | 6,199,197 | How to make a sortedlist sort reversely? Do I have to customize a IComparer? | In a sortedlist queue, queue.value[0] gives the corresponding value of a min key. what if i would like to make that it gives the value of a max key? Do i have to rewrite the icomparer? | Yes you have to rewrite the comparer example for string as key: (just exchanged x.CompareTo(y) with y.CompareTo(x) ) private class InvertedComparer: IComparer { public int Compare(string x, string y) { return y.CompareTo(x); } } and the call: SortedList list = new SortedList (new InvertedComparer()); | How to make a sortedlist sort reversely? Do I have to customize a IComparer? In a sortedlist queue, queue.value[0] gives the corresponding value of a min key. what if i would like to make that it gives the value of a max key? Do i have to rewrite the icomparer? | TITLE:
How to make a sortedlist sort reversely? Do I have to customize a IComparer?
QUESTION:
In a sortedlist queue, queue.value[0] gives the corresponding value of a min key. what if i would like to make that it gives the value of a max key? Do i have to rewrite the icomparer?
ANSWER:
Yes you have to rewrite the com... | [
"c#",
"sortedlist"
] | 10 | 15 | 8,888 | 4 | 0 | 2011-06-01T09:29:24.967000 | 2011-06-01T09:43:33.827000 |
6,199,032 | 6,200,203 | Stylesheet conflicting with jquery ui style | I have the following style which works as I want it to work:.container { font-family:arial; text-decoration:none; font-size:12px; }.title {color:#707070; text-decoration:none; }.username {color:#8DAAB8;}.dateandtime {color:#A5A7AC;}.container:hover.title { color: #000000; }.container:hover.username { color: #DF821B; }.... | Ok i see. Well your external stylesheet has no style rule for.title, so some combination overwrites your style. To make sure that your style takes predence, try to make your rule more specific. If you have other elements that always wrap your.title elements, add them to the rule like this: #container.something.title to... | Stylesheet conflicting with jquery ui style I have the following style which works as I want it to work:.container { font-family:arial; text-decoration:none; font-size:12px; }.title {color:#707070; text-decoration:none; }.username {color:#8DAAB8;}.dateandtime {color:#A5A7AC;}.container:hover.title { color: #000000; }.c... | TITLE:
Stylesheet conflicting with jquery ui style
QUESTION:
I have the following style which works as I want it to work:.container { font-family:arial; text-decoration:none; font-size:12px; }.title {color:#707070; text-decoration:none; }.username {color:#8DAAB8;}.dateandtime {color:#A5A7AC;}.container:hover.title { c... | [
"jquery",
"css",
"jquery-ui",
"jquery-ui-css-framework"
] | 0 | 2 | 1,764 | 1 | 0 | 2011-06-01T09:29:57.947000 | 2011-06-01T11:10:10.587000 |
6,199,038 | 6,199,224 | Javascript event triggered by pressing space | I am trying to get an event to trigger when I am on a page and press space, but I can't figure it out. Currently I am trying to use jQuery to accomplish a satisfying result. I have tried using keydown, keyup and keypress, but it seems that you can only use it if you are actually inputting something to a form or field. ... | These events bubble up, so if you're trying to trigger the event wherever your focus is (ie. not in an input), just bind a handler on window: $(window).keypress(function (e) { if (e.key === ' ' || e.key === 'Spacebar') { // ' ' is standard, 'Spacebar' was used by IE9 and Firefox < 37 e.preventDefault() console.log('Spa... | Javascript event triggered by pressing space I am trying to get an event to trigger when I am on a page and press space, but I can't figure it out. Currently I am trying to use jQuery to accomplish a satisfying result. I have tried using keydown, keyup and keypress, but it seems that you can only use it if you are actu... | TITLE:
Javascript event triggered by pressing space
QUESTION:
I am trying to get an event to trigger when I am on a page and press space, but I can't figure it out. Currently I am trying to use jQuery to accomplish a satisfying result. I have tried using keydown, keyup and keypress, but it seems that you can only use ... | [
"javascript",
"jquery",
"jquery-events"
] | 31 | 53 | 72,233 | 4 | 0 | 2011-06-01T09:30:39.850000 | 2011-06-01T09:45:46.120000 |
6,199,048 | 6,199,098 | iOS : date problem | I have this code: in viewDidLoad: dateForView = [[NSDate alloc] init]; (dateForView is a NSDate) and a IBAction: - (IBAction) addDay{ NSLog(@"dateforview1:%@", dateForView); dateForView = [dateForView dateByAddingTimeInterval:60*60*24*1]; NSDateFormatter *formatter =[[[NSDateFormatter alloc] init] autorelease]; [format... | In viewDidLoad, you are obtaining an NSDate for which you hold a reference (since you created it with init ). The first time you run addDay, you replace this with an autoreleased NSDate for which you don't hold a reference any more. When you leave addDay, this reference to dateForView becomes invalid, and the next time... | iOS : date problem I have this code: in viewDidLoad: dateForView = [[NSDate alloc] init]; (dateForView is a NSDate) and a IBAction: - (IBAction) addDay{ NSLog(@"dateforview1:%@", dateForView); dateForView = [dateForView dateByAddingTimeInterval:60*60*24*1]; NSDateFormatter *formatter =[[[NSDateFormatter alloc] init] au... | TITLE:
iOS : date problem
QUESTION:
I have this code: in viewDidLoad: dateForView = [[NSDate alloc] init]; (dateForView is a NSDate) and a IBAction: - (IBAction) addDay{ NSLog(@"dateforview1:%@", dateForView); dateForView = [dateForView dateByAddingTimeInterval:60*60*24*1]; NSDateFormatter *formatter =[[[NSDateFormatt... | [
"iphone",
"objective-c",
"xcode",
"ios",
"nsdate"
] | 0 | 3 | 1,001 | 3 | 0 | 2011-06-01T09:30:52.517000 | 2011-06-01T09:34:51.837000 |
6,199,058 | 6,204,475 | JavaCC action in token definition | I was wondering if it were possible to hook into JavaCC's lexer to call a function to check if a character is valid. The reason I am asking is I'm trying to implement something a bit like: TOKEN { } where id() is: //Check to see if the character is an ID character boolean id(char currentCharacter) { int type = Characte... | No, you can't. The lexer is a finite state machine. What you can do is implement a lexical action that validates the characters of the matched string and adds the result of that validation to the issued token (e.g. by setting the value of a custom field). But you cannot use the result of the validation to guide the lex... | JavaCC action in token definition I was wondering if it were possible to hook into JavaCC's lexer to call a function to check if a character is valid. The reason I am asking is I'm trying to implement something a bit like: TOKEN { } where id() is: //Check to see if the character is an ID character boolean id(char curre... | TITLE:
JavaCC action in token definition
QUESTION:
I was wondering if it were possible to hook into JavaCC's lexer to call a function to check if a character is valid. The reason I am asking is I'm trying to implement something a bit like: TOKEN { } where id() is: //Check to see if the character is an ID character boo... | [
"java",
"parsing",
"unicode",
"lexer",
"javacc"
] | 1 | 4 | 1,062 | 1 | 0 | 2011-06-01T09:31:55.340000 | 2011-06-01T16:22:52.313000 |
6,199,063 | 6,199,141 | image rendering nine patch | I have a list view with a custom layout. In the layout I display a series of comments. The problem is the image I've set as the background gets stretched when the comments are too long. I know I could probably use a nine patch but the question is would it really work? If not what alternative do I have? Could someone re... | A nine-patch would work provided you pad the top of your text so it's below the part that won't scale. Alternatively, truncate all your comments to some reasonable length that will fit, and let people click them to read the whole thing. | image rendering nine patch I have a list view with a custom layout. In the layout I display a series of comments. The problem is the image I've set as the background gets stretched when the comments are too long. I know I could probably use a nine patch but the question is would it really work? If not what alternative ... | TITLE:
image rendering nine patch
QUESTION:
I have a list view with a custom layout. In the layout I display a series of comments. The problem is the image I've set as the background gets stretched when the comments are too long. I know I could probably use a nine patch but the question is would it really work? If not... | [
"android",
"graphics",
"nine-patch"
] | 0 | 1 | 481 | 1 | 0 | 2011-06-01T09:32:19.233000 | 2011-06-01T09:38:36.893000 |
6,199,064 | 6,229,211 | Pulling <s:variant> from atom feed with simple pie | How can I get the title tag from the s:variant block below using simple pie? product_variants-96590662 Default Title 10.00 002 0 I've tried the following to avail, and also 'variant' and just 's' $caption = $item->get_item_tags('http://www.w3.org/2005/Atom', 's:variant'); The feed in question is here (from shopify), an... | You can read the xml namespace for s from the tag. According to it you have to use http://jadedpixel.com/-/spec/shopify as the namespace parameter in get_item_tags(), and the second parameter is the tag name without the s:. $varinat = $item->get_item_tags('http://jadedpixel.com/-/spec/shopify', 'variant'); | Pulling <s:variant> from atom feed with simple pie How can I get the title tag from the s:variant block below using simple pie? product_variants-96590662 Default Title 10.00 002 0 I've tried the following to avail, and also 'variant' and just 's' $caption = $item->get_item_tags('http://www.w3.org/2005/Atom', 's:variant... | TITLE:
Pulling <s:variant> from atom feed with simple pie
QUESTION:
How can I get the title tag from the s:variant block below using simple pie? product_variants-96590662 Default Title 10.00 002 0 I've tried the following to avail, and also 'variant' and just 's' $caption = $item->get_item_tags('http://www.w3.org/2005... | [
"php",
"shopify",
"simplepie",
"atom-feed"
] | 2 | 3 | 726 | 1 | 0 | 2011-06-01T09:32:20.337000 | 2011-06-03T15:33:59.050000 |
6,199,072 | 6,199,429 | How can I "keep" the uploaded image on a form validation error? | I have a form which has a FileField among other fields. Imagine the user chooses a file, presses submit and another field triggers a ValidationError. When I get back the form, with the errors on the page, what the user chose for the file field is gone. Can I make it appear, or is this a browser thing? | This is a browser thing - for security reasons, you can't prepopulate a file input, otherwise it would be easy to trick users into uploading files from their system without their explicit action. | How can I "keep" the uploaded image on a form validation error? I have a form which has a FileField among other fields. Imagine the user chooses a file, presses submit and another field triggers a ValidationError. When I get back the form, with the errors on the page, what the user chose for the file field is gone. Can... | TITLE:
How can I "keep" the uploaded image on a form validation error?
QUESTION:
I have a form which has a FileField among other fields. Imagine the user chooses a file, presses submit and another field triggers a ValidationError. When I get back the form, with the errors on the page, what the user chose for the file ... | [
"django",
"upload"
] | 9 | 10 | 3,015 | 1 | 0 | 2011-06-01T09:32:50.350000 | 2011-06-01T10:03:18.807000 |
6,199,080 | 6,199,110 | Generate image dynamicllaly on client side | I have a application, which generate image dynamically (based on some data input) on server, and send url to user. Image is much larger than text file, and it occupy too much disc space and network bandwidth. Is it possible to generate image on client side, meanwhile the browser behaves the same as getting the image fr... | You could either embed the Image in the tag ( http://www.sweeting.org/mark/blog/2005/07/12/base64-encoded-images-embedded-in-html ) or use the -Element. | Generate image dynamicllaly on client side I have a application, which generate image dynamically (based on some data input) on server, and send url to user. Image is much larger than text file, and it occupy too much disc space and network bandwidth. Is it possible to generate image on client side, meanwhile the brows... | TITLE:
Generate image dynamicllaly on client side
QUESTION:
I have a application, which generate image dynamically (based on some data input) on server, and send url to user. Image is much larger than text file, and it occupy too much disc space and network bandwidth. Is it possible to generate image on client side, m... | [
"javascript",
"image"
] | 4 | 3 | 2,017 | 1 | 0 | 2011-06-01T09:33:12.537000 | 2011-06-01T09:36:17.887000 |
6,199,093 | 6,212,433 | DevExpress controls for WPF load time | When i use DevExpress controls for WPF-load time of the window on which they are declared-increases. But on second access-it loads fast. Isnt there a way to preload all of needed dll/themes on program startup (let it took 5-10 secs!), but load them fast in overall program? I've searched a bit, found something like this... | To resolve this issue, I suggest that you ngen our assemblies and use the DXSplashWindow (11.1) or create a similar window manually and show it when the main form opens for the first time. This slowdown is caused by JIT and theme loading. The RunTypeInitializers simply calls an object constructor. WPF themes are not lo... | DevExpress controls for WPF load time When i use DevExpress controls for WPF-load time of the window on which they are declared-increases. But on second access-it loads fast. Isnt there a way to preload all of needed dll/themes on program startup (let it took 5-10 secs!), but load them fast in overall program? I've sea... | TITLE:
DevExpress controls for WPF load time
QUESTION:
When i use DevExpress controls for WPF-load time of the window on which they are declared-increases. But on second access-it loads fast. Isnt there a way to preload all of needed dll/themes on program startup (let it took 5-10 secs!), but load them fast in overall... | [
"wpf",
"performance",
"controls",
"devexpress"
] | 6 | 5 | 6,914 | 1 | 0 | 2011-06-01T09:34:25.573000 | 2011-06-02T09:01:14.107000 |
6,199,095 | 6,199,919 | Customize Picker View in iPhone | How to create Customized UIPicker View in iphone.I want to customize the background Color,Style of wheel.I also want to customize the different row's selection.How it will be done. Can Anyone help me Thanks in advance. | You change change the view of the rows as Gypsa stated. However if you want to change the appearance of the UIPickerView, laying out a transparent png on top of it is your best bet. Just make sure you disable user interactions on the png, so that you can interact with the wheel. Below screenshots are from my latest app... | Customize Picker View in iPhone How to create Customized UIPicker View in iphone.I want to customize the background Color,Style of wheel.I also want to customize the different row's selection.How it will be done. Can Anyone help me Thanks in advance. | TITLE:
Customize Picker View in iPhone
QUESTION:
How to create Customized UIPicker View in iphone.I want to customize the background Color,Style of wheel.I also want to customize the different row's selection.How it will be done. Can Anyone help me Thanks in advance.
ANSWER:
You change change the view of the rows as ... | [
"iphone",
"objective-c",
"ios",
"ios4",
"uipickerview"
] | 0 | 1 | 1,047 | 2 | 0 | 2011-06-01T09:34:32.710000 | 2011-06-01T10:45:45.103000 |
6,199,103 | 6,230,552 | In .NET, How to execute this Oracle PL/SQL Procedure? | My procedure is declare here: create or replace PACKAGE MYPKG IS PROCEDURE MYPROCEDURE( sNom IN VARCHAR2, sValeur OUT VARCHAR2, sCommentaire OUT VARCHAR2, sRetour OUT VARCHAR2, sMsgRetour OUT VARCHAR2); END; The execution is Ok with SQL Developer. I try to execute this procedure in C#: OracleCommand cmd = new OracleCom... | This is how I would approach it. NOTE: I have compiled this code, but I have not tested it against a database, although I have lots of similar code that works fine. Also note: you are not getting back a collection, so you should really be using OraCmd.ExecuteNonQuery rather than OraCmd.ExecuteReader using System.Config... | In .NET, How to execute this Oracle PL/SQL Procedure? My procedure is declare here: create or replace PACKAGE MYPKG IS PROCEDURE MYPROCEDURE( sNom IN VARCHAR2, sValeur OUT VARCHAR2, sCommentaire OUT VARCHAR2, sRetour OUT VARCHAR2, sMsgRetour OUT VARCHAR2); END; The execution is Ok with SQL Developer. I try to execute t... | TITLE:
In .NET, How to execute this Oracle PL/SQL Procedure?
QUESTION:
My procedure is declare here: create or replace PACKAGE MYPKG IS PROCEDURE MYPROCEDURE( sNom IN VARCHAR2, sValeur OUT VARCHAR2, sCommentaire OUT VARCHAR2, sRetour OUT VARCHAR2, sMsgRetour OUT VARCHAR2); END; The execution is Ok with SQL Developer. ... | [
"c#",
"oracle",
"plsql"
] | 3 | 5 | 23,914 | 3 | 0 | 2011-06-01T09:35:26.827000 | 2011-06-03T17:31:16.337000 |
6,199,106 | 6,199,278 | is it possible to "backup" row/table with mysqldump or whatever | Suppose a row (several rows) or table in database. Can I backup them, to restore as quick as possible only them if the rows/table will be corrupted. thank you in advance! | I use the following perl-script to backup my databases: #!/usr/bin/perl use strict; use DBI; my $dbh = DBI->connect( "dbi:mysql:database=;mysql_client_found_rows=0;host=your.database.host", "username", "password", {RaiseError => 1}); my $databases = $dbh->selectcol_arrayref('SHOW databases;'); foreach my $t (@{$databas... | is it possible to "backup" row/table with mysqldump or whatever Suppose a row (several rows) or table in database. Can I backup them, to restore as quick as possible only them if the rows/table will be corrupted. thank you in advance! | TITLE:
is it possible to "backup" row/table with mysqldump or whatever
QUESTION:
Suppose a row (several rows) or table in database. Can I backup them, to restore as quick as possible only them if the rows/table will be corrupted. thank you in advance!
ANSWER:
I use the following perl-script to backup my databases: #!... | [
"database",
"backup",
"mysql"
] | 3 | 3 | 2,663 | 3 | 0 | 2011-06-01T09:35:58.850000 | 2011-06-01T09:49:51.523000 |
6,199,112 | 6,199,310 | Horizontal alignment of 3 boxes in a wrapper | Hey, I'm playing around with CSS3 at the moment and ran into a problem, using three div boxes. I want them to be horizontally aligned in a wrapper box without having to specify the exact margins. My approach has been this:.box1 { background: gray; float: left; width: 250px; padding: 3px; margin: 0 auto; }.box2 { backgr... | Hmm. Well you can't use margin-auto on floated values. I'd give them exact pixel margins. More control. Do you expect to not know the width of the red-wrapper? Also, all those classes are the same, just call it "box" and reuse that for all your boxes..box{ background: gray; float: left; width: 250px; padding: 3px; marg... | Horizontal alignment of 3 boxes in a wrapper Hey, I'm playing around with CSS3 at the moment and ran into a problem, using three div boxes. I want them to be horizontally aligned in a wrapper box without having to specify the exact margins. My approach has been this:.box1 { background: gray; float: left; width: 250px; ... | TITLE:
Horizontal alignment of 3 boxes in a wrapper
QUESTION:
Hey, I'm playing around with CSS3 at the moment and ran into a problem, using three div boxes. I want them to be horizontally aligned in a wrapper box without having to specify the exact margins. My approach has been this:.box1 { background: gray; float: le... | [
"html",
"css"
] | 2 | 3 | 10,564 | 3 | 0 | 2011-06-01T09:36:21.293000 | 2011-06-01T09:52:56.913000 |
6,199,116 | 6,199,472 | jquery mouseover mouseout | $('.rollover').mouseover(function(e){
e.stopPropagation();
thisName = $(this).attr('title');
$('li#'+thisName).show(50, 'swing');
});
$('.rollover').mouseout(function(e){
e.stopPropagation();
thisName = $(this).attr('title');
$('li#'+thisName).hide(50, 'swing');
}); I have four pictures with the class 'rollove... | Rather than slow things down by making every animation complete before your user can view a new piece of content, why not use something like the Hover Intent plugin to prevent 'accidental' mouseovers? | jquery mouseover mouseout $('.rollover').mouseover(function(e){
e.stopPropagation();
thisName = $(this).attr('title');
$('li#'+thisName).show(50, 'swing');
});
$('.rollover').mouseout(function(e){
e.stopPropagation();
thisName = $(this).attr('title');
$('li#'+thisName).hide(50, 'swing');
}); I have four pictur... | TITLE:
jquery mouseover mouseout
QUESTION:
$('.rollover').mouseover(function(e){
e.stopPropagation();
thisName = $(this).attr('title');
$('li#'+thisName).show(50, 'swing');
});
$('.rollover').mouseout(function(e){
e.stopPropagation();
thisName = $(this).attr('title');
$('li#'+thisName).hide(50, 'swing');
}); ... | [
"jquery",
"mouseover",
"mouseout"
] | 1 | 1 | 1,958 | 2 | 0 | 2011-06-01T09:36:44.957000 | 2011-06-01T10:06:30.120000 |
6,199,122 | 6,199,262 | WINSOCK - Setting a timeout for a connection attempt on a non existing IP? | I am developing a RTSP Source filter in C++, and I am using WINSOCK 2.0 - blocking socket. When I create a blocking socket, I set its SO_RCVTIMEO to 3 secs like so: int ReceiveTimeout = 3000; int e = setsockopt(Socket, SOL_SOCKET, SO_RCVTIMEO, (char*)&ReceiveTimeout, sizeof(int)); My filter tries to connect to IP_ADDRE... | Bite the bullet. The remote IP may not be running a PING server or PING may be blocked by some router, so it's no help. Can you not just wait the 10 sec and then make whatever error indication you use? If you absolutely have to time out the attempted connection after 3 seconds, you can time it out yourself. | WINSOCK - Setting a timeout for a connection attempt on a non existing IP? I am developing a RTSP Source filter in C++, and I am using WINSOCK 2.0 - blocking socket. When I create a blocking socket, I set its SO_RCVTIMEO to 3 secs like so: int ReceiveTimeout = 3000; int e = setsockopt(Socket, SOL_SOCKET, SO_RCVTIMEO, (... | TITLE:
WINSOCK - Setting a timeout for a connection attempt on a non existing IP?
QUESTION:
I am developing a RTSP Source filter in C++, and I am using WINSOCK 2.0 - blocking socket. When I create a blocking socket, I set its SO_RCVTIMEO to 3 secs like so: int ReceiveTimeout = 3000; int e = setsockopt(Socket, SOL_SOCK... | [
"c++",
"winsock2"
] | 18 | 2 | 26,938 | 3 | 0 | 2011-06-01T09:37:13.873000 | 2011-06-01T09:48:32.233000 |
6,199,129 | 6,199,216 | Error messag pop up, when i start any solution in VS2010 | below error message pop-ups whenever i start any solutions.....of VS2010 what should i have to do for come out of it??? | I think this fellow explains the solution very well for you: Add LOCALAPPDATA Environment Variable in Windows XP LOCALAPPDATA is one of the new environment variables included in Windows Vista, which points to the folder that stores the data for local (non-roaming) applications. To access the folder, run the command %LO... | Error messag pop up, when i start any solution in VS2010 below error message pop-ups whenever i start any solutions.....of VS2010 what should i have to do for come out of it??? | TITLE:
Error messag pop up, when i start any solution in VS2010
QUESTION:
below error message pop-ups whenever i start any solutions.....of VS2010 what should i have to do for come out of it???
ANSWER:
I think this fellow explains the solution very well for you: Add LOCALAPPDATA Environment Variable in Windows XP LOC... | [
"visual-studio-2010"
] | 1 | 2 | 301 | 2 | 0 | 2011-06-01T09:37:35.420000 | 2011-06-01T09:45:07.087000 |
6,199,131 | 6,208,873 | Drupal menu edit/delete permissions module | I created a website, I have a content manager role, and I want him to be able to rearange the menu, but I don't want him to see the edit/delete buttons in the view. Is there anyy module for this? @Edit, I am talking about drupal 6 I solved the problem by overwriting the template, checking on the role and removing the o... | I think you're talking about something like Menu Access. When you say "see edit/delete buttons" I assume you mean you don't want him to have permissions to edit views. Also, I assume you're talking about Drupal 6. | Drupal menu edit/delete permissions module I created a website, I have a content manager role, and I want him to be able to rearange the menu, but I don't want him to see the edit/delete buttons in the view. Is there anyy module for this? @Edit, I am talking about drupal 6 I solved the problem by overwriting the templa... | TITLE:
Drupal menu edit/delete permissions module
QUESTION:
I created a website, I have a content manager role, and I want him to be able to rearange the menu, but I don't want him to see the edit/delete buttons in the view. Is there anyy module for this? @Edit, I am talking about drupal 6 I solved the problem by over... | [
"drupal",
"permissions",
"module",
"menu"
] | 0 | 0 | 555 | 1 | 0 | 2011-06-01T09:37:45.963000 | 2011-06-01T23:25:56 |
6,199,137 | 6,199,234 | java sql empty fields | Hi i am trying to execute query Statement stmt = conn.createStatement(); stmt.executeUpdate(location_query); location_query is insert into table(col, col2) value("2", ""); Both col and col2 are double(12,2) type, i get error Data truncated for column 'col2' at row 1, but if I print my query and copy, and paste it to PM... | Well, an empty String is not a valid number, therefore different database systems might handle that differently. When you just want that column NULL or filled with the default, you should leave it out like this: insert into table(col) value(2); OR set it NULL explicitly: insert into table(col, col2) value(2, NULL); Bes... | java sql empty fields Hi i am trying to execute query Statement stmt = conn.createStatement(); stmt.executeUpdate(location_query); location_query is insert into table(col, col2) value("2", ""); Both col and col2 are double(12,2) type, i get error Data truncated for column 'col2' at row 1, but if I print my query and co... | TITLE:
java sql empty fields
QUESTION:
Hi i am trying to execute query Statement stmt = conn.createStatement(); stmt.executeUpdate(location_query); location_query is insert into table(col, col2) value("2", ""); Both col and col2 are double(12,2) type, i get error Data truncated for column 'col2' at row 1, but if I pri... | [
"java",
"sql"
] | 2 | 5 | 3,263 | 1 | 0 | 2011-06-01T09:38:13.080000 | 2011-06-01T09:46:51.940000 |
6,199,140 | 6,199,582 | Zend Framework and response gzip compression | I'm looking for a way to gzip my XML responses and only them. I didn't find any materials how to do this in Zend Framework. I have a response method in my abstract controller, like this: public function xmlResponse(SimpleXMLElement $xml, $contentType = null){ $this->_helper->layout->disableLayout(); Zend_Controller_Fro... | Is this what you are looking for?: $this->_response->setHeader('Content-Type', 'application/x-gzip'); $filter = new Zend_Filter_Compress('Gz'); $compressed = $filter->filter($xml->asXML()); $this->_response->setBody($compressed); EDIT: You could try this, I have not tested it though: $this->_response->setHeader("Accept... | Zend Framework and response gzip compression I'm looking for a way to gzip my XML responses and only them. I didn't find any materials how to do this in Zend Framework. I have a response method in my abstract controller, like this: public function xmlResponse(SimpleXMLElement $xml, $contentType = null){ $this->_helper-... | TITLE:
Zend Framework and response gzip compression
QUESTION:
I'm looking for a way to gzip my XML responses and only them. I didn't find any materials how to do this in Zend Framework. I have a response method in my abstract controller, like this: public function xmlResponse(SimpleXMLElement $xml, $contentType = null... | [
"zend-framework",
"gzip"
] | 2 | 2 | 3,666 | 2 | 0 | 2011-06-01T09:38:36.670000 | 2011-06-01T10:15:45.480000 |
6,199,155 | 6,199,166 | Changing CSS file dynamically | I have a webdev problem I have close to 10,000 serverside pages, all of thse use the same stylesheet. I have created a new serverside page which is like a dynamic menu system to help find specific pages from the existing 10,000 pages quickly and easily. The problem is, that if the serverside pages are accessed the old ... | Have the stylesheet in an app_themes folder and set this in the web.config. Then you can change between the two quickly. Or you could set this in code in the pre_init event EDIT: 1: Add and app_themes folder, create two sub folders with theme names (eg, default or Blue etc) 2: either in the web.config set the or 3: cat... | Changing CSS file dynamically I have a webdev problem I have close to 10,000 serverside pages, all of thse use the same stylesheet. I have created a new serverside page which is like a dynamic menu system to help find specific pages from the existing 10,000 pages quickly and easily. The problem is, that if the serversi... | TITLE:
Changing CSS file dynamically
QUESTION:
I have a webdev problem I have close to 10,000 serverside pages, all of thse use the same stylesheet. I have created a new serverside page which is like a dynamic menu system to help find specific pages from the existing 10,000 pages quickly and easily. The problem is, th... | [
"javascript",
".net",
"asp.net",
"css",
"vb.net"
] | 2 | 2 | 614 | 4 | 0 | 2011-06-01T09:39:24.230000 | 2011-06-01T09:40:58.390000 |
6,199,162 | 6,212,186 | QR report of size A5 to be repeated on an A4 paper sheet | BDS2006, QR4. I have an A5 size report and I want(well, the customer does:)) to print it twice on an A4 paper sheet. This is because they need to cut the two halves and keep one "for the record" while handing out the other one. Anybody knows a trick to do this without having to add yet another repo? Thank you! Andrea | Ok, I will post the answer since no one has come up with a better idea... yet! What I had to do is using a composite report and then just adding the reports on the AddReports event. I added two times the same report and QR didn't complain. Last, just use the preview to see it on screen et voila'! Andrea | QR report of size A5 to be repeated on an A4 paper sheet BDS2006, QR4. I have an A5 size report and I want(well, the customer does:)) to print it twice on an A4 paper sheet. This is because they need to cut the two halves and keep one "for the record" while handing out the other one. Anybody knows a trick to do this wi... | TITLE:
QR report of size A5 to be repeated on an A4 paper sheet
QUESTION:
BDS2006, QR4. I have an A5 size report and I want(well, the customer does:)) to print it twice on an A4 paper sheet. This is because they need to cut the two halves and keep one "for the record" while handing out the other one. Anybody knows a t... | [
"quickreports"
] | 0 | 1 | 663 | 1 | 0 | 2011-06-01T09:40:28.120000 | 2011-06-02T08:32:17.653000 |
6,199,193 | 6,199,263 | the animation is not work | i have made the following animation xml file in my android project: what this is basically doing is making a view dissappear starting from its center. Now in my code i am doing the following to start the animation: overridePendingTransition (0,R.anim,myanimation); but nothing is happening. what am i doing wrong? thank ... | try this: Animation a = AnimationUtils.loadAnimation(this, R.anim.myanimation); myView.setAnimation(a); a.start(); | the animation is not work i have made the following animation xml file in my android project: what this is basically doing is making a view dissappear starting from its center. Now in my code i am doing the following to start the animation: overridePendingTransition (0,R.anim,myanimation); but nothing is happening. wha... | TITLE:
the animation is not work
QUESTION:
i have made the following animation xml file in my android project: what this is basically doing is making a view dissappear starting from its center. Now in my code i am doing the following to start the animation: overridePendingTransition (0,R.anim,myanimation); but nothing... | [
"android"
] | 0 | 0 | 397 | 4 | 0 | 2011-06-01T09:43:07.647000 | 2011-06-01T09:48:35.343000 |
6,199,198 | 6,199,731 | Entity framework foreign key tracking causes problem | working with EF4, model first approach in VS 2010: Consider the following EntityModel: "OrderBase" is an abstract entity with just one property "Name" "Detail" (with one property "Text") is an entity that has a many to one association to "OrderBase" (i.e. one OrderBase has multiple Details) "Comment" (with one property... | This happens because calling AddObject doesn't add only single entity but all related entities which are not attached to the context as well. So when you call AddObject(songOrder) in the first example you also add Detail and Comment. But after that you call Remove on navigation properties to remove both Detial and Comm... | Entity framework foreign key tracking causes problem working with EF4, model first approach in VS 2010: Consider the following EntityModel: "OrderBase" is an abstract entity with just one property "Name" "Detail" (with one property "Text") is an entity that has a many to one association to "OrderBase" (i.e. one OrderBa... | TITLE:
Entity framework foreign key tracking causes problem
QUESTION:
working with EF4, model first approach in VS 2010: Consider the following EntityModel: "OrderBase" is an abstract entity with just one property "Name" "Detail" (with one property "Text") is an entity that has a many to one association to "OrderBase"... | [
"c#",
".net",
"entity-framework"
] | 2 | 1 | 468 | 2 | 0 | 2011-06-01T09:43:35.590000 | 2011-06-01T10:29:23.370000 |
6,199,201 | 6,199,251 | undefined reference to `timer_getoverrun' fixed by passing -lrt to gcc. But why? | I was experimenting with a few timer functions and ended up with the above linker error. Someone on the net suggested to pass -lrt to gcc and it worked! What is '-lrt' and how did it help to overcome this error? I looked into gcc --help but couldn't find these options and the man page of gcc ( which is too huge ) also ... | It adds the rt library to the linker (see librt ) which amongst other things defines timer_getoverrun. | undefined reference to `timer_getoverrun' fixed by passing -lrt to gcc. But why? I was experimenting with a few timer functions and ended up with the above linker error. Someone on the net suggested to pass -lrt to gcc and it worked! What is '-lrt' and how did it help to overcome this error? I looked into gcc --help bu... | TITLE:
undefined reference to `timer_getoverrun' fixed by passing -lrt to gcc. But why?
QUESTION:
I was experimenting with a few timer functions and ended up with the above linker error. Someone on the net suggested to pass -lrt to gcc and it worked! What is '-lrt' and how did it help to overcome this error? I looked ... | [
"linux",
"gcc",
"timer",
"linker-errors"
] | 2 | 2 | 1,519 | 3 | 0 | 2011-06-01T09:43:59.897000 | 2011-06-01T09:47:43.310000 |
6,199,204 | 6,199,228 | find parent div inside <td> with jQuery | how can I find the parent id of the div inside the table? I have the following structure: | If you mean you want to find the ID of the DIV that contains your table, then you can use closest() var parent = $("#child").parent().closest('div').attr("id"); Fiddle EDIT After reading the docs, closest() is better than parents() because it doesn't travel up to the root node. Thanks for the heads up Andy E | find parent div inside <td> with jQuery how can I find the parent id of the div inside the table? I have the following structure: | TITLE:
find parent div inside <td> with jQuery
QUESTION:
how can I find the parent id of the div inside the table? I have the following structure:
ANSWER:
If you mean you want to find the ID of the DIV that contains your table, then you can use closest() var parent = $("#child").parent().closest('div').attr("id"); Fi... | [
"jquery"
] | 6 | 5 | 9,990 | 3 | 0 | 2011-06-01T09:44:07.663000 | 2011-06-01T09:46:15.837000 |
6,199,211 | 6,199,811 | Entity Framework 4.1 Batch Updates | I'm doing some work with EF 4.1 and I'd like to perform a batch update on 3 tables (for the purpose of implementing a soft delete). From doing some quick research it looks like direct SQL queries are best. My implementation is below and I was hoping for some feedback on whether this is best practice. Thanks for the hel... | If you want batch why don't you place all updates into single ExecuteSqlCommand? Each call to ExecuteSqlCommand makes its own round trip to the database = it is not a batch. Also be aware that if any of modified records is currently loaded in the context changes will not be reflected = loaded entities will still have D... | Entity Framework 4.1 Batch Updates I'm doing some work with EF 4.1 and I'd like to perform a batch update on 3 tables (for the purpose of implementing a soft delete). From doing some quick research it looks like direct SQL queries are best. My implementation is below and I was hoping for some feedback on whether this i... | TITLE:
Entity Framework 4.1 Batch Updates
QUESTION:
I'm doing some work with EF 4.1 and I'd like to perform a batch update on 3 tables (for the purpose of implementing a soft delete). From doing some quick research it looks like direct SQL queries are best. My implementation is below and I was hoping for some feedback... | [
"entity-framework",
"transactions",
"batch-file"
] | 3 | 2 | 5,595 | 2 | 0 | 2011-06-01T09:44:58.397000 | 2011-06-01T10:36:24.663000 |
6,199,218 | 6,199,359 | jQuery blur followed by blur | I want to use jQuery to create around a text input, a green border for valid input and red one for invalid, when the input loses focus. I wrote the code below but it only works for the first blur() event. Is it that a blur event cannot be followed by another blur? As you can see, the first blur checks if the userID is ... | Why do you want do blur events when one is enough for you... $(document).ready(function($){ $("#userid").blur(function(){ if ($("#userid").val()==""){ $("#userid").css('border', '2px solid red'); return False; } else {
$.post("validate.php", {"userid": $("#userid").val()}, function(response){ if (response == 0){ $("#u... | jQuery blur followed by blur I want to use jQuery to create around a text input, a green border for valid input and red one for invalid, when the input loses focus. I wrote the code below but it only works for the first blur() event. Is it that a blur event cannot be followed by another blur? As you can see, the first ... | TITLE:
jQuery blur followed by blur
QUESTION:
I want to use jQuery to create around a text input, a green border for valid input and red one for invalid, when the input loses focus. I wrote the code below but it only works for the first blur() event. Is it that a blur event cannot be followed by another blur? As you c... | [
"jquery",
"blur"
] | 0 | 2 | 521 | 1 | 0 | 2011-06-01T09:45:24.467000 | 2011-06-01T09:56:50.263000 |
6,199,226 | 6,199,534 | Inserting GUID (uniqueidentifier) value in stored procedure | I have this stored procedure which stores information in several tables and one of the key variables is that I can feed the procedure with a guid value to bind these tables. It goes something like USE [MyDatabase] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[my_createCompany] @CompanyName ... | That's only the (partially) broken behaviour when executing the stored procedure using the SSMS wizard. When actually calling it from client code, most data access libraries allow you to pass parameters using the appropriate types (e.g. as a Guid from.Net code), and the data access library will ensure that it's passed ... | Inserting GUID (uniqueidentifier) value in stored procedure I have this stored procedure which stores information in several tables and one of the key variables is that I can feed the procedure with a guid value to bind these tables. It goes something like USE [MyDatabase] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ... | TITLE:
Inserting GUID (uniqueidentifier) value in stored procedure
QUESTION:
I have this stored procedure which stores information in several tables and one of the key variables is that I can feed the procedure with a guid value to bind these tables. It goes something like USE [MyDatabase] GO SET ANSI_NULLS ON GO SET ... | [
"sql-server-2008",
"stored-procedures"
] | 1 | 2 | 16,924 | 3 | 0 | 2011-06-01T09:45:51.267000 | 2011-06-01T10:11:30.633000 |
6,199,236 | 6,199,268 | Retrieve UISegmentedControl object out of UIBarButtonItem | I need to get the UISegmentedControl object that i previously added in the UIBarButtonItem like this UIBarButtonItem *segmentBarButton=[[UIBarButtonItem alloc] initWithCustomView:segmaentControl]; now i want to get the UISegmentedControl object out of it, how can i do this? | UIBarButtonItem has a property called customView, which is what you're looking for: UISegmentedControl *control = (UISegmentedControl *) [segmentBarButton customView]; | Retrieve UISegmentedControl object out of UIBarButtonItem I need to get the UISegmentedControl object that i previously added in the UIBarButtonItem like this UIBarButtonItem *segmentBarButton=[[UIBarButtonItem alloc] initWithCustomView:segmaentControl]; now i want to get the UISegmentedControl object out of it, how ca... | TITLE:
Retrieve UISegmentedControl object out of UIBarButtonItem
QUESTION:
I need to get the UISegmentedControl object that i previously added in the UIBarButtonItem like this UIBarButtonItem *segmentBarButton=[[UIBarButtonItem alloc] initWithCustomView:segmaentControl]; now i want to get the UISegmentedControl object... | [
"iphone",
"objective-c",
"ipod-touch",
"uisegmentedcontrol"
] | 0 | 5 | 526 | 1 | 0 | 2011-06-01T09:47:08.803000 | 2011-06-01T09:48:39.770000 |
6,199,246 | 6,199,314 | How to show a reference of the shared assembly in the .net add reference dialog window? | Q: I make a dll and put it in the global assembly cache (GAC),now i wanna to use this dll in my application, but i can't see any reference to it. When Add reference ----> dialog window --->no reference to my shared assembly.i don't see any reference. how to fix this problem. to make my shared assembly, i do the followi... | The list of referenes doesn't actually work off the GAC - there's a registry key at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework\AssemblyFolders that controls which folders get looked at when creating this list. This link has the full low-down on the process | How to show a reference of the shared assembly in the .net add reference dialog window? Q: I make a dll and put it in the global assembly cache (GAC),now i wanna to use this dll in my application, but i can't see any reference to it. When Add reference ----> dialog window --->no reference to my shared assembly.i don't ... | TITLE:
How to show a reference of the shared assembly in the .net add reference dialog window?
QUESTION:
Q: I make a dll and put it in the global assembly cache (GAC),now i wanna to use this dll in my application, but i can't see any reference to it. When Add reference ----> dialog window --->no reference to my shared... | [
".net",
"asp.net",
"visual-studio",
"dll",
"shared-libraries"
] | 1 | 1 | 3,782 | 3 | 0 | 2011-06-01T09:47:36.003000 | 2011-06-01T09:53:11.883000 |
6,199,252 | 6,211,188 | jQuery validator - Different error messages for same control | In my MVC validation I am using a calendar control and all validations work fine. var today = $('#TodayDateHf').val();
$('#myform').validate({
errorPlacement: $.calendars.picker.errorPlacement,
rules: {
DateFrom: { cpDate:true, cpCompareDate: { notAfter: '#DateTo', 'notAfter': today } }, DateTo: { cpDate:true, cpCo... | You can use something like this messages:{ DateFrom:{ cpDate:"Message1", cpCompareDate: "Message2" }
} | jQuery validator - Different error messages for same control In my MVC validation I am using a calendar control and all validations work fine. var today = $('#TodayDateHf').val();
$('#myform').validate({
errorPlacement: $.calendars.picker.errorPlacement,
rules: {
DateFrom: { cpDate:true, cpCompareDate: { notAfter: ... | TITLE:
jQuery validator - Different error messages for same control
QUESTION:
In my MVC validation I am using a calendar control and all validations work fine. var today = $('#TodayDateHf').val();
$('#myform').validate({
errorPlacement: $.calendars.picker.errorPlacement,
rules: {
DateFrom: { cpDate:true, cpCompare... | [
"jquery-ui",
"jquery-validate"
] | 1 | 2 | 1,463 | 1 | 0 | 2011-06-01T09:47:47.360000 | 2011-06-02T06:25:10.800000 |
6,199,270 | 6,199,292 | How do I debug the child process after fork() in gdb? | After calling fork, the current process will call exit(0). But the child will continue. switch(fork()) { case -1: exit(1); case 0: // child process continues break; default: // the current process exits exit(0); } How can I continue debugging the child process in this case? | Look at this. Use: set follow-fork-mode Set the debugger response to a program call of fork or vfork. A call to fork or vfork creates a new process. The argument can be: parent: The original process is debugged after a fork. The child process runs unimpeded. This is the default. child: The new process is debugged after... | How do I debug the child process after fork() in gdb? After calling fork, the current process will call exit(0). But the child will continue. switch(fork()) { case -1: exit(1); case 0: // child process continues break; default: // the current process exits exit(0); } How can I continue debugging the child process in th... | TITLE:
How do I debug the child process after fork() in gdb?
QUESTION:
After calling fork, the current process will call exit(0). But the child will continue. switch(fork()) { case -1: exit(1); case 0: // child process continues break; default: // the current process exits exit(0); } How can I continue debugging the c... | [
"c",
"gdb",
"fork"
] | 36 | 53 | 27,453 | 1 | 0 | 2011-06-01T09:48:52.217000 | 2011-06-01T09:51:27.257000 |
6,199,283 | 6,199,337 | What is a Drawable? | I'm new in Android dev and I have a ridiculous question.. I read this Drawable but I didn't understand everything (because I speak french, not english). Well.. can anyone explain me with simply words what is a Drawable? Thank you, best regards. | Drwable are something that can be drawn on screen for examples images that are drawn on screen. See this location res/drawable-hdpi or res/drawable-mdpi or res/drawable-ldpi in your project folder, they all are some types of drawables location where we keep our drawables. | What is a Drawable? I'm new in Android dev and I have a ridiculous question.. I read this Drawable but I didn't understand everything (because I speak french, not english). Well.. can anyone explain me with simply words what is a Drawable? Thank you, best regards. | TITLE:
What is a Drawable?
QUESTION:
I'm new in Android dev and I have a ridiculous question.. I read this Drawable but I didn't understand everything (because I speak french, not english). Well.. can anyone explain me with simply words what is a Drawable? Thank you, best regards.
ANSWER:
Drwable are something that c... | [
"android",
"drawable"
] | 1 | 0 | 361 | 2 | 0 | 2011-06-01T09:50:39.830000 | 2011-06-01T09:55:09.560000 |
6,199,284 | 6,199,391 | c fork,exec,getpid problem | I'm new to c language and Linux. I have a problem related to fork(),getpid()and exec()function. I wrote a c program using fork() call the code of my program is following" code: #include #include #include #include void fun() { printf("\n this is trial for child process"); }
int main (int argc, char const *argv[]) { int... | In this code you are creating Three process not including your main process. pid=fork() is itself a statement, which forks a new process even though it is inside an if statement condition. After the first fork() call the remaining codes will be executed twice. so next fork call will be called twice. You have already cr... | c fork,exec,getpid problem I'm new to c language and Linux. I have a problem related to fork(),getpid()and exec()function. I wrote a c program using fork() call the code of my program is following" code: #include #include #include #include void fun() { printf("\n this is trial for child process"); }
int main (int argc... | TITLE:
c fork,exec,getpid problem
QUESTION:
I'm new to c language and Linux. I have a problem related to fork(),getpid()and exec()function. I wrote a c program using fork() call the code of my program is following" code: #include #include #include #include void fun() { printf("\n this is trial for child process"); }
... | [
"c",
"fork",
"systems-programming",
"fork-join"
] | 1 | 0 | 6,397 | 3 | 0 | 2011-06-01T09:50:42.547000 | 2011-06-01T09:59:52.373000 |
6,199,285 | 6,199,319 | tput cup in python on the commandline | Is there an elegant solution to do this shell script in Python without importing os? tput cup 14 15; echo -ne "\033[1;32mtest\033[0m"; tput cup 50 0 This just has been gnawing in my mind for some time now:) Thanks | All the terminfo capabilities are accessible via curses. Initialize it and use curses.tiget*() to get the capabilities you care about. | tput cup in python on the commandline Is there an elegant solution to do this shell script in Python without importing os? tput cup 14 15; echo -ne "\033[1;32mtest\033[0m"; tput cup 50 0 This just has been gnawing in my mind for some time now:) Thanks | TITLE:
tput cup in python on the commandline
QUESTION:
Is there an elegant solution to do this shell script in Python without importing os? tput cup 14 15; echo -ne "\033[1;32mtest\033[0m"; tput cup 50 0 This just has been gnawing in my mind for some time now:) Thanks
ANSWER:
All the terminfo capabilities are accessi... | [
"python",
"printing",
"terminal"
] | 7 | 6 | 4,510 | 3 | 0 | 2011-06-01T09:50:46.757000 | 2011-06-01T09:53:34.757000 |
6,199,293 | 6,199,334 | Why does enum declaration accept short but not Int16 | I want to declare a new enum with non-default underlying type. This works: public enum MyEnum: short { A, B, C, } But I don't understand the reason why this doesn't compile: public enum MyEnum: System.Int16 { A, B, C, } Compiler says Type byte, sbyte, short, ushort, int, uint, long, or ulong expected I understand that ... | The syntax is correct. C# specification explicitly states that the enum's underlying type must be byte, sbyte, short, ushort, int, uint, long or ulong. Read what Microsoft says about this here. | Why does enum declaration accept short but not Int16 I want to declare a new enum with non-default underlying type. This works: public enum MyEnum: short { A, B, C, } But I don't understand the reason why this doesn't compile: public enum MyEnum: System.Int16 { A, B, C, } Compiler says Type byte, sbyte, short, ushort, ... | TITLE:
Why does enum declaration accept short but not Int16
QUESTION:
I want to declare a new enum with non-default underlying type. This works: public enum MyEnum: short { A, B, C, } But I don't understand the reason why this doesn't compile: public enum MyEnum: System.Int16 { A, B, C, } Compiler says Type byte, sbyt... | [
"c#",
".net",
"enums"
] | 23 | 21 | 17,635 | 2 | 0 | 2011-06-01T09:51:29.020000 | 2011-06-01T09:54:49.937000 |
6,199,295 | 6,199,324 | Question regarding streams in java | We have the below requirement. We will have to create an excel/pdf report and then download it on click of a button in a java web application. The pdf/excel file is dynamically created using application data. We should not create any physical file on the server. How do we go about this? Are there any streams through wh... | You could use memory-based streams (such as ByteArrayInputStream and ByteArrayOutputStream ) and use the same underlying byte buffer to address the read/write in the same go part of the question. As others have pointed out, you can just write directly to the output stream of the response. | Question regarding streams in java We have the below requirement. We will have to create an excel/pdf report and then download it on click of a button in a java web application. The pdf/excel file is dynamically created using application data. We should not create any physical file on the server. How do we go about thi... | TITLE:
Question regarding streams in java
QUESTION:
We have the below requirement. We will have to create an excel/pdf report and then download it on click of a button in a java web application. The pdf/excel file is dynamically created using application data. We should not create any physical file on the server. How ... | [
"java",
"web-applications",
"servlets",
"inputstream",
"outputstream"
] | 2 | 4 | 310 | 5 | 0 | 2011-06-01T09:51:29.727000 | 2011-06-01T09:53:54.403000 |
6,199,297 | 6,273,503 | Can a "wizard" html page like this be built using jquery or does it require flash? | I need to build a little wizard that looks like this where you walk a person through a wizard and have an image get updated with each choice. For a few reasons like ipad compatibility, i can't use flash like it is on this website. How close to this user experience can I get from simply using javascript and jquery. Are ... | I had a good experience using this: https://github.com/kflorence/jquery-wizard To implement a multi-step wizard with branching. I just used normal jQuery to add some extra effects like transition animations, etc. | Can a "wizard" html page like this be built using jquery or does it require flash? I need to build a little wizard that looks like this where you walk a person through a wizard and have an image get updated with each choice. For a few reasons like ipad compatibility, i can't use flash like it is on this website. How c... | TITLE:
Can a "wizard" html page like this be built using jquery or does it require flash?
QUESTION:
I need to build a little wizard that looks like this where you walk a person through a wizard and have an image get updated with each choice. For a few reasons like ipad compatibility, i can't use flash like it is on t... | [
"jquery",
"flash",
"user-interface"
] | 2 | 10 | 3,007 | 12 | 0 | 2011-06-01T09:52:03.193000 | 2011-06-08T02:10:40.210000 |
6,199,298 | 6,199,336 | How to make the Messages panel to disappear after I successfully compile a project? | In Delphi XE, how to make the Messages panel to disappear after I successfully compile a project? That was the default behavior in Delphi 7. In Delphi XE it says 'success' and it leaves that box open. | In XE, Messages is not a message box but a dockable window and as such it won't disappear automatically. Workaround: Close the Messages window and save the desktop (click on the button next to the Classic Undocked in the toolbar). After each recompile you can then reselect saved desktop by clicking into drop-down list ... | How to make the Messages panel to disappear after I successfully compile a project? In Delphi XE, how to make the Messages panel to disappear after I successfully compile a project? That was the default behavior in Delphi 7. In Delphi XE it says 'success' and it leaves that box open. | TITLE:
How to make the Messages panel to disappear after I successfully compile a project?
QUESTION:
In Delphi XE, how to make the Messages panel to disappear after I successfully compile a project? That was the default behavior in Delphi 7. In Delphi XE it says 'success' and it leaves that box open.
ANSWER:
In XE, M... | [
"delphi",
"delphi-2010",
"delphi-xe"
] | 5 | 3 | 1,085 | 2 | 0 | 2011-06-01T09:52:06.663000 | 2011-06-01T09:55:02.880000 |
6,199,301 | 6,199,917 | Global access to Rake DSL methods is deprecated | I am working through the Ruby on Rails 3 tutorial book and typed the following on the command line: rake db:migrate which produced the following warning. WARNING: Global access to Rake DSL methods is deprecated. Please Include... Rake::DSL into classes and modules which use the Rake DSL methods.
WARNING: DSL method De... | I found this in Stack Overflow question Ruby on Rails and Rake problems: uninitialized constant Rake::DSL. It refers to a @DHH tweet. Put the following in your Gemfile gem "rake", "0.8.7" You may see something like rake aborted! You have already activated Rake 0.9.1... I still had a copy of Rake 0.9.1 in my directory s... | Global access to Rake DSL methods is deprecated I am working through the Ruby on Rails 3 tutorial book and typed the following on the command line: rake db:migrate which produced the following warning. WARNING: Global access to Rake DSL methods is deprecated. Please Include... Rake::DSL into classes and modules which u... | TITLE:
Global access to Rake DSL methods is deprecated
QUESTION:
I am working through the Ruby on Rails 3 tutorial book and typed the following on the command line: rake db:migrate which produced the following warning. WARNING: Global access to Rake DSL methods is deprecated. Please Include... Rake::DSL into classes a... | [
"ruby-on-rails-3",
"rake",
"railstutorial.org"
] | 86 | 64 | 22,766 | 5 | 0 | 2011-06-01T09:52:14.323000 | 2011-06-01T10:45:41.453000 |
6,199,303 | 6,199,464 | android expandable list need help | expListAdapter = new ColorAdapter(this, GrouppList, colors); // setListAdapter(expListAdapter); exlv1=(ExpandableListView) findViewById(R.id.expandableListView1); this.exlv1.setAdapter(expListAdapter); //exlv1.setAdapter(expListAdapter); this.exlv1.setOnItemClickListener(new OnItemClickListener() {
@Override //THIS NO... | Hi Please check below link http://about-android.blogspot.com/2010/04/steps-to-implement-expandablelistview.html http://techdroid.kbeanie.com/2010/09/expandablelistview-on-android.html | android expandable list need help expListAdapter = new ColorAdapter(this, GrouppList, colors); // setListAdapter(expListAdapter); exlv1=(ExpandableListView) findViewById(R.id.expandableListView1); this.exlv1.setAdapter(expListAdapter); //exlv1.setAdapter(expListAdapter); this.exlv1.setOnItemClickListener(new OnItemClic... | TITLE:
android expandable list need help
QUESTION:
expListAdapter = new ColorAdapter(this, GrouppList, colors); // setListAdapter(expListAdapter); exlv1=(ExpandableListView) findViewById(R.id.expandableListView1); this.exlv1.setAdapter(expListAdapter); //exlv1.setAdapter(expListAdapter); this.exlv1.setOnItemClickListe... | [
"android",
"position",
"expandablelistview"
] | 0 | 2 | 482 | 1 | 0 | 2011-06-01T09:52:27.700000 | 2011-06-01T10:05:55.033000 |
6,199,304 | 6,200,385 | How do I use custom library/project in T4 text template? | I look and I don't see. I have a solution with two projects -- project A (a library) and project B, which is main project and contains T4 text template. What I did so far -- I added a reference in main project to project A. I included such line in template: <#@ import namespace="MyProjectA" #> Yet, there is still an er... | You need to reference the DLL as well using the "assembly" directive. For instance: <#@ assembly name=“System.Xml” #> You can reference dlls by their path, as well. See Oleg Sych's T4 series for pretty much anything you would ever want to know. Here is the page about the "assembly" directive: https://web.archive.org/we... | How do I use custom library/project in T4 text template? I look and I don't see. I have a solution with two projects -- project A (a library) and project B, which is main project and contains T4 text template. What I did so far -- I added a reference in main project to project A. I included such line in template: <#@ i... | TITLE:
How do I use custom library/project in T4 text template?
QUESTION:
I look and I don't see. I have a solution with two projects -- project A (a library) and project B, which is main project and contains T4 text template. What I did so far -- I added a reference in main project to project A. I included such line ... | [
"c#",
"reference",
"t4"
] | 7 | 4 | 6,819 | 3 | 0 | 2011-06-01T09:52:28.227000 | 2011-06-01T11:26:46.717000 |
6,199,318 | 6,199,422 | C# & XAML - TextBox binding not updating content | I have a TextBox in a Stackpanel, as in the code below When the Visibility is set to Visible in my converter, my textbox doesn't update it's Text property, even though the Property gets it's correct value (tested by showing a MessageBox with the Property). Any thoughts? | The Time property will need to be either a Dependency Property with the right binding or on a class that Implements the INotifyPropertyChanged Interface, for the Time property, in order for the update to occur "Automatically." | C# & XAML - TextBox binding not updating content I have a TextBox in a Stackpanel, as in the code below When the Visibility is set to Visible in my converter, my textbox doesn't update it's Text property, even though the Property gets it's correct value (tested by showing a MessageBox with the Property). Any thoughts? | TITLE:
C# & XAML - TextBox binding not updating content
QUESTION:
I have a TextBox in a Stackpanel, as in the code below When the Visibility is set to Visible in my converter, my textbox doesn't update it's Text property, even though the Property gets it's correct value (tested by showing a MessageBox with the Propert... | [
"c#",
"wpf",
"binding"
] | 0 | 1 | 1,043 | 1 | 0 | 2011-06-01T09:53:33.753000 | 2011-06-01T10:02:30.900000 |
6,199,329 | 6,199,460 | Copy Sharepoint folder and keep permissions | I've been researching this for a bit and I've found that copying a Sharepoint folder doesn't actually keep the permissions intact. I've tried mapping the Sharepoint folder to X:\ and then using Robocopy with this command: Robocopy "X:\SharepointFolder\Bob Dylan" "X:\SharepointFolder\John Lennon" /E /SEC This copies the... | Copying a folder via WebDAV won't copy any meta data set on the folder. Therefor permissions won't be copied as well. | Copy Sharepoint folder and keep permissions I've been researching this for a bit and I've found that copying a Sharepoint folder doesn't actually keep the permissions intact. I've tried mapping the Sharepoint folder to X:\ and then using Robocopy with this command: Robocopy "X:\SharepointFolder\Bob Dylan" "X:\Sharepoin... | TITLE:
Copy Sharepoint folder and keep permissions
QUESTION:
I've been researching this for a bit and I've found that copying a Sharepoint folder doesn't actually keep the permissions intact. I've tried mapping the Sharepoint folder to X:\ and then using Robocopy with this command: Robocopy "X:\SharepointFolder\Bob Dy... | [
"sharepoint",
"permissions",
"robocopy"
] | 0 | 1 | 4,591 | 4 | 0 | 2011-06-01T09:54:20.030000 | 2011-06-01T10:05:39.290000 |
6,199,338 | 6,200,553 | Reformatting code in text mate to established code conventions - Visual studio's ctrl K+D equivalent on Text Mate | Can anyone tell me if there's a quick way to format your code in Text Mate, similar to pressing ctrl K+D in Visual studio? Thanks! Edit by Damien_The_Unbeliever: For those not familiar with Ctrl K+D, it doesn't just indent code - it reformats it using the generally established formatting conventions in the editor - it ... | Did you look in the menu bar? Under Text you have a couple of Reformat… entries that may fit your needs. Beside these native features, some bundles — like the JavaScript one — have custom Reformat… commands: click on the little cog button at the bottom and explore your current language's bundle's content. | Reformatting code in text mate to established code conventions - Visual studio's ctrl K+D equivalent on Text Mate Can anyone tell me if there's a quick way to format your code in Text Mate, similar to pressing ctrl K+D in Visual studio? Thanks! Edit by Damien_The_Unbeliever: For those not familiar with Ctrl K+D, it doe... | TITLE:
Reformatting code in text mate to established code conventions - Visual studio's ctrl K+D equivalent on Text Mate
QUESTION:
Can anyone tell me if there's a quick way to format your code in Text Mate, similar to pressing ctrl K+D in Visual studio? Thanks! Edit by Damien_The_Unbeliever: For those not familiar wit... | [
"visual-studio",
"formatting",
"textmate",
"textmatebundles"
] | 2 | 3 | 7,125 | 2 | 0 | 2011-06-01T09:55:11.577000 | 2011-06-01T11:43:07.983000 |
6,199,339 | 6,199,699 | Using Version Control but still access the files normal way | I am trying hard to use version control but i am so used to old method of editing files directly via FTP that i am feeling confused what to do. So i am thinking of one solution and please help me with this if its possible or not I have the user folder in Linux VPS system(Single VPS only) /home/user/public_html2 Now tha... | When you are using a version control system, why do you need to of to a FTP location to edit the files... It defeats the whole purpose. Rather, checkout the files from the repository into your local machine and after the changes are done, commit the code. If you don't want to use the version while working with the file... | Using Version Control but still access the files normal way I am trying hard to use version control but i am so used to old method of editing files directly via FTP that i am feeling confused what to do. So i am thinking of one solution and please help me with this if its possible or not I have the user folder in Linux... | TITLE:
Using Version Control but still access the files normal way
QUESTION:
I am trying hard to use version control but i am so used to old method of editing files directly via FTP that i am feeling confused what to do. So i am thinking of one solution and please help me with this if its possible or not I have the us... | [
"php",
"linux",
"version-control"
] | 3 | 4 | 131 | 3 | 0 | 2011-06-01T09:55:13.330000 | 2011-06-01T10:26:24.790000 |
6,199,340 | 6,199,546 | Problem sending ajax request | My problem is I got 2 link call the same function, but in first link I can see ajax request in firebug(run fine) but in second query, my ajax totally won't show in firebug(request won sent out) and alert me 0,error,undefined. However I already try both of my link, its valid and can be surf. HTML test test2 JS function ... | i simplified your problem. here is a working example. Maybe this can get you goiing.. http://jsfiddle.net/SjE7f/ | Problem sending ajax request My problem is I got 2 link call the same function, but in first link I can see ajax request in firebug(run fine) but in second query, my ajax totally won't show in firebug(request won sent out) and alert me 0,error,undefined. However I already try both of my link, its valid and can be surf.... | TITLE:
Problem sending ajax request
QUESTION:
My problem is I got 2 link call the same function, but in first link I can see ajax request in firebug(run fine) but in second query, my ajax totally won't show in firebug(request won sent out) and alert me 0,error,undefined. However I already try both of my link, its vali... | [
"javascript",
"jquery",
"html",
"ajax"
] | 0 | 0 | 189 | 2 | 0 | 2011-06-01T09:55:21.047000 | 2011-06-01T10:12:12.877000 |
6,199,342 | 6,199,407 | Alert View - How to use clickedButtonAtIndex: | I have this alert view (disclaimer) that pop up when app finish launching. It works (my app is much slower now), but I also want to exit from the app if the user press no, thanks. I think I should use clickedButtonAtIndex:. 1. Can somebody help me on this? 2. is viewDidLoad the best method to fire the alertView when th... | - (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex { if(buttonIndex == 0) // Do something else // Some code } or - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
if(buttonIndex == 0) // Do something else // Some code } Make sure your clas... | Alert View - How to use clickedButtonAtIndex: I have this alert view (disclaimer) that pop up when app finish launching. It works (my app is much slower now), but I also want to exit from the app if the user press no, thanks. I think I should use clickedButtonAtIndex:. 1. Can somebody help me on this? 2. is viewDidLoad... | TITLE:
Alert View - How to use clickedButtonAtIndex:
QUESTION:
I have this alert view (disclaimer) that pop up when app finish launching. It works (my app is much slower now), but I also want to exit from the app if the user press no, thanks. I think I should use clickedButtonAtIndex:. 1. Can somebody help me on this?... | [
"iphone",
"objective-c",
"ios4",
"uialertview"
] | 4 | 12 | 10,080 | 2 | 0 | 2011-06-01T09:55:24.053000 | 2011-06-01T10:01:32.233000 |
6,199,344 | 6,207,165 | Is there any way to add namespaces to all html tags using ASP? | Is there any way to add namespace xmlns="http://www.w3.org/1999/xhtml" to all html tags either using ASP function / RegExp / javascript? (this is something like adding a attribute to the html tags) For Example: Below is the body of textarea: Welcome to the StackOverFlow site. Please click here for more info. The body c... | Here's a solution that uses only JavaScript regexes: result = subject.replace( /(<\w+)((?:\s+(?!xmlns\b)\w+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+))*\s*\/?>)/g, '$1 xmlns="http://www.w3.org/1999/xhtml"$2' ); The regex matches anything that looks like an opening tag ( ) or self-closing tag ( ). The tag may contain any number ... | Is there any way to add namespaces to all html tags using ASP? Is there any way to add namespace xmlns="http://www.w3.org/1999/xhtml" to all html tags either using ASP function / RegExp / javascript? (this is something like adding a attribute to the html tags) For Example: Below is the body of textarea: Welcome to the ... | TITLE:
Is there any way to add namespaces to all html tags using ASP?
QUESTION:
Is there any way to add namespace xmlns="http://www.w3.org/1999/xhtml" to all html tags either using ASP function / RegExp / javascript? (this is something like adding a attribute to the html tags) For Example: Below is the body of textare... | [
"javascript",
"regex",
"asp-classic"
] | 0 | 1 | 411 | 3 | 0 | 2011-06-01T09:55:42.193000 | 2011-06-01T20:21:56.020000 |
6,199,345 | 6,199,958 | How to copy all child nodes of any type of a template context element | I am transforming XML into HTML using XSLT. I have the following XML structure: This is some html text which should be displayed highlighted. I use the following template for the transformation: Unfortunately, I lose the -tags. Is there a way to keep them so the HTML is displayed correctly (highlighted)? | The correct way to get the all the contents of the current matching node (text nodes included) is: This will copy everything descendent. | How to copy all child nodes of any type of a template context element I am transforming XML into HTML using XSLT. I have the following XML structure: This is some html text which should be displayed highlighted. I use the following template for the transformation: Unfortunately, I lose the -tags. Is there a way to keep... | TITLE:
How to copy all child nodes of any type of a template context element
QUESTION:
I am transforming XML into HTML using XSLT. I have the following XML structure: This is some html text which should be displayed highlighted. I use the following template for the transformation: Unfortunately, I lose the -tags. Is t... | [
"xslt",
"xslt-1.0"
] | 18 | 41 | 88,305 | 3 | 0 | 2011-06-01T09:55:52.603000 | 2011-06-01T10:49:39.360000 |
6,199,349 | 6,199,447 | Link binaries with Library in Xcode 4 for Soundcloud wrapper | When I attempt step 3 in the XCode part of the setup section of these instructions I can see Soundcloud.API framework as an option to add, but not libSoundCloud.a or libOAuth2Client.a. Any ideas? I'm using Xcode 4 and the iPhoneTestApp as my base project. I then added the Soundcloud project to it. | As soon as you added the Project and did all steps mentioned in the guide, you got to Project, then select the target, go to Build Phases and select "Link Binary with...". The screen should look like the one below. If you select the.a file it will be linked statically, if you select the framework it will be linked dyna... | Link binaries with Library in Xcode 4 for Soundcloud wrapper When I attempt step 3 in the XCode part of the setup section of these instructions I can see Soundcloud.API framework as an option to add, but not libSoundCloud.a or libOAuth2Client.a. Any ideas? I'm using Xcode 4 and the iPhoneTestApp as my base project. I t... | TITLE:
Link binaries with Library in Xcode 4 for Soundcloud wrapper
QUESTION:
When I attempt step 3 in the XCode part of the setup section of these instructions I can see Soundcloud.API framework as an option to add, but not libSoundCloud.a or libOAuth2Client.a. Any ideas? I'm using Xcode 4 and the iPhoneTestApp as my... | [
"iphone",
"xcode4",
"soundcloud",
"ios-frameworks"
] | 0 | 1 | 1,424 | 1 | 0 | 2011-06-01T09:56:22.930000 | 2011-06-01T10:04:29.903000 |
6,199,350 | 6,202,983 | How can I use back references with `grep` in R? | I am looking for an elegant way of returning back references using regular expressions in R. Le me explain: Let's say I want to find strings that start with a month name: x <- c("May, 1, 2011", "30 June 2011") grep("May|^June", x, value=TRUE) [1] "May, 1, 2011" This works, but I really want to isolate the month (i.e. "... | The stringr package has a function exactly for this purpose: library(stringr) x <- c("May, 1, 2011", "30 June 2011", "June 2012") str_extract(x, "May|^June") # [1] "May" NA "June" It's a fairly thin wrapper around regexpr, but stringr generally makes string handling easier by being more consistent than base R functions... | How can I use back references with `grep` in R? I am looking for an elegant way of returning back references using regular expressions in R. Le me explain: Let's say I want to find strings that start with a month name: x <- c("May, 1, 2011", "30 June 2011") grep("May|^June", x, value=TRUE) [1] "May, 1, 2011" This works... | TITLE:
How can I use back references with `grep` in R?
QUESTION:
I am looking for an elegant way of returning back references using regular expressions in R. Le me explain: Let's say I want to find strings that start with a month name: x <- c("May, 1, 2011", "30 June 2011") grep("May|^June", x, value=TRUE) [1] "May, 1... | [
"r",
"regex"
] | 15 | 9 | 4,699 | 3 | 0 | 2011-06-01T09:56:25.140000 | 2011-06-01T14:40:03.893000 |
6,199,365 | 6,199,969 | C# XNA - Matrix.CreatePerspectiveFieldOfView - Extend how far camera can see | i am using the following code to setup my camera. I can see the elements in a range of some 100 fs. I want the camera to see farther. projection = Matrix.CreatePerspectiveFieldOfView((3.14159265f/10f), device.Viewport.AspectRatio, 0.2f, 40.0f); How to do it? | Look at the documentation for Matrix.CreatePerspectiveFieldOfView. The last two parameters are the near and far plane distances. They determine the size of the view frustum associated with the camera. The view frustum looks like this: Everything in the frustum is in the volume that the rasteriser uses for drawing - thi... | C# XNA - Matrix.CreatePerspectiveFieldOfView - Extend how far camera can see i am using the following code to setup my camera. I can see the elements in a range of some 100 fs. I want the camera to see farther. projection = Matrix.CreatePerspectiveFieldOfView((3.14159265f/10f), device.Viewport.AspectRatio, 0.2f, 40.0f)... | TITLE:
C# XNA - Matrix.CreatePerspectiveFieldOfView - Extend how far camera can see
QUESTION:
i am using the following code to setup my camera. I can see the elements in a range of some 100 fs. I want the camera to see farther. projection = Matrix.CreatePerspectiveFieldOfView((3.14159265f/10f), device.Viewport.AspectR... | [
"c#",
"xna",
"perspectivecamera"
] | 0 | 3 | 2,770 | 1 | 0 | 2011-06-01T09:57:10.627000 | 2011-06-01T10:50:48.047000 |
6,199,372 | 6,223,496 | Is it any good to make play game in zoom out condition? | I'm developing a game with large obstacle and sprites(in cocos2d+box2d for iPhone), then after zooming out my sprites and layer (by increasing cameraZ), I make my game to play by user, which causes some problem in touch detection of dynamic objects. Can it be said a good approach to work with? If No then what will be t... | If you use a camera for zooming then cocos2d will no longer correctly convert your touch locations to opengl coordinates, since it doesn't invert the camera transform. I would recommend using scale on the layer that your objects reside on to implement zooming. This gives you precise control over the zoom factor and tou... | Is it any good to make play game in zoom out condition? I'm developing a game with large obstacle and sprites(in cocos2d+box2d for iPhone), then after zooming out my sprites and layer (by increasing cameraZ), I make my game to play by user, which causes some problem in touch detection of dynamic objects. Can it be said... | TITLE:
Is it any good to make play game in zoom out condition?
QUESTION:
I'm developing a game with large obstacle and sprites(in cocos2d+box2d for iPhone), then after zooming out my sprites and layer (by increasing cameraZ), I make my game to play by user, which causes some problem in touch detection of dynamic objec... | [
"iphone",
"cocos2d-iphone",
"zooming",
"box2d"
] | 0 | 3 | 275 | 1 | 0 | 2011-06-01T09:57:42.313000 | 2011-06-03T05:57:27.240000 |
6,199,378 | 6,199,768 | Help me to choose b/w flash and html5 | I am planning to develop a facebook application which uses iframe concept, it involves some rich UI and image manipulation, I am new to html5 but aware of flex, so please help me in deciding which technology is best suitable for this scenario. | Particularly if its for a facebook application, I prefer you to go for flash, because html5 is not widely adopted by all users yet, you already know flash, flash has only drawback on ios platform which is not a case for you. | Help me to choose b/w flash and html5 I am planning to develop a facebook application which uses iframe concept, it involves some rich UI and image manipulation, I am new to html5 but aware of flex, so please help me in deciding which technology is best suitable for this scenario. | TITLE:
Help me to choose b/w flash and html5
QUESTION:
I am planning to develop a facebook application which uses iframe concept, it involves some rich UI and image manipulation, I am new to html5 but aware of flex, so please help me in deciding which technology is best suitable for this scenario.
ANSWER:
Particularl... | [
"flash",
"html"
] | 0 | 1 | 86 | 2 | 0 | 2011-06-01T09:58:30.937000 | 2011-06-01T10:32:50.903000 |
6,199,390 | 6,199,671 | How do you let 2 objects owned by a parent object talk to one another in Ruby? | First off, I'm sorry if this is a n00b question. I'm a self-taught web developer and this is my first real foray into apps. I've tried to find the answer to what I'm looking for, but I'm not sure on the proper terminology and so haven't found any relevant results. I figure this is because either I don't know the right ... | I think there's a flaw in the design somewhere. You say that the Assigner picks the task and the Worker does it. It doesn't look like they need to communicate. If they need to, they may be doing more than what you described, which may indicate an opportunity for refactoring into more isolated classes with fewer respons... | How do you let 2 objects owned by a parent object talk to one another in Ruby? First off, I'm sorry if this is a n00b question. I'm a self-taught web developer and this is my first real foray into apps. I've tried to find the answer to what I'm looking for, but I'm not sure on the proper terminology and so haven't foun... | TITLE:
How do you let 2 objects owned by a parent object talk to one another in Ruby?
QUESTION:
First off, I'm sorry if this is a n00b question. I'm a self-taught web developer and this is my first real foray into apps. I've tried to find the answer to what I'm looking for, but I'm not sure on the proper terminology a... | [
"ruby",
"oop"
] | 0 | 1 | 77 | 2 | 0 | 2011-06-01T09:59:48.817000 | 2011-06-01T10:24:25.257000 |
6,199,392 | 6,203,028 | Jtable Row Span and Column Span | Is there any way to implement row span and colspan in JTable like html table. | Here is a really old example. I don't know if it still works: http://www.java2s.com/Code/Java/Swing-Components/MultiSpanCellTableExample.htm | Jtable Row Span and Column Span Is there any way to implement row span and colspan in JTable like html table. | TITLE:
Jtable Row Span and Column Span
QUESTION:
Is there any way to implement row span and colspan in JTable like html table.
ANSWER:
Here is a really old example. I don't know if it still works: http://www.java2s.com/Code/Java/Swing-Components/MultiSpanCellTableExample.htm | [
"swing",
"jtable",
"desktop-application",
"java"
] | 6 | 6 | 10,152 | 1 | 0 | 2011-06-01T09:59:53.490000 | 2011-06-01T14:43:17.370000 |
6,199,395 | 6,202,485 | MSBuild for speficic changesets- more than one changeset ! | We are using MsBuild on TFS 2008 for building our solutions. I need your advice and help about below scenario. For example: We prepared a full build for one of our customers. After package is get ready, 2 developers want to add their development to the package. I am trying to find a solution to add only the 2 developer... | If TFS Get command gets all the changesets up to your specified changeset. So if you want to include 200, 400 and 434, you only need to specify 434 as the changeset you want to get at. Note that this will also get all other changesets that are newer your workspace's version and older than 434. I don't think TFS allows ... | MSBuild for speficic changesets- more than one changeset ! We are using MsBuild on TFS 2008 for building our solutions. I need your advice and help about below scenario. For example: We prepared a full build for one of our customers. After package is get ready, 2 developers want to add their development to the package.... | TITLE:
MSBuild for speficic changesets- more than one changeset !
QUESTION:
We are using MsBuild on TFS 2008 for building our solutions. I need your advice and help about below scenario. For example: We prepared a full build for one of our customers. After package is get ready, 2 developers want to add their developme... | [
"msbuild",
"get",
"changeset"
] | 1 | 1 | 1,478 | 1 | 0 | 2011-06-01T10:00:26.543000 | 2011-06-01T14:05:12.820000 |
6,199,397 | 6,199,712 | Before confirmation, clicking back button, it is going to previous Screen | When i am clicking back button, i am displaying one confirmation dialog box with yes and no. But without clicking the yes button, it is automatically going back to the previous screen. My code part is: public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { new AlertDialog.Builde... | return false; means that you're not consuming the back-button so the action will follow the next step: super.onKeyDown(keyCode, event); Try changing it to: return true; to indicate that you've already consumed the back-button. | Before confirmation, clicking back button, it is going to previous Screen When i am clicking back button, i am displaying one confirmation dialog box with yes and no. But without clicking the yes button, it is automatically going back to the previous screen. My code part is: public boolean onKeyDown(int keyCode, KeyEve... | TITLE:
Before confirmation, clicking back button, it is going to previous Screen
QUESTION:
When i am clicking back button, i am displaying one confirmation dialog box with yes and no. But without clicking the yes button, it is automatically going back to the previous screen. My code part is: public boolean onKeyDown(i... | [
"android"
] | 0 | 0 | 959 | 2 | 0 | 2011-06-01T10:00:50.230000 | 2011-06-01T10:27:41.887000 |
6,199,413 | 6,200,864 | Processing an uploaded file without saving it? | I am uploading a file using the following code [HttpPost] public ActionResult ImportDeleteCourse(ImportFromExcel model) { var excelFile = model.ExcelFile; if (ModelState.IsValid) { OrganisationServices services = new OrganisationServices(); string filePath = Path.Combine(HttpContext.Server.MapPath("../Uploads"), Path.G... | Sure you can. As Patko suggested, the InputStream property can be used for another stream. For example I did this for an uploaded xml document to use with LINQ to XML: XDocument XmlDoc = XDocument.Load(new StreamReader(viewmodel.FileUpload.InputStream)) Cheers, Chris | Processing an uploaded file without saving it? I am uploading a file using the following code [HttpPost] public ActionResult ImportDeleteCourse(ImportFromExcel model) { var excelFile = model.ExcelFile; if (ModelState.IsValid) { OrganisationServices services = new OrganisationServices(); string filePath = Path.Combine(H... | TITLE:
Processing an uploaded file without saving it?
QUESTION:
I am uploading a file using the following code [HttpPost] public ActionResult ImportDeleteCourse(ImportFromExcel model) { var excelFile = model.ExcelFile; if (ModelState.IsValid) { OrganisationServices services = new OrganisationServices(); string filePat... | [
"asp.net-mvc",
"asp.net-mvc-3"
] | 2 | 3 | 2,487 | 2 | 0 | 2011-06-01T10:02:01.693000 | 2011-06-01T12:06:41.820000 |
6,199,418 | 6,200,202 | What should I know to make my I18N application work in Japanese? | I'm working on a I18N application which will be located in Japanese, I don't know any word in Japanese, and I'm first wondering if utf8 is enough for that language. Usually, for European language, utf8 is enough, and I've to set up my database charset/collation to use utf8_general_ci (in MySQL) and my html views in utf... | A couple of points: UTF-8 is fine for your app-internal data, but if you need to process user-supplied documents (e.g. uploads), those may use other encodings like Shift-JIS or ISO-2022-JP Japanese text does not use whitespace between words. If your app needs to split text into words somewhere, you've got a problem. Ap... | What should I know to make my I18N application work in Japanese? I'm working on a I18N application which will be located in Japanese, I don't know any word in Japanese, and I'm first wondering if utf8 is enough for that language. Usually, for European language, utf8 is enough, and I've to set up my database charset/col... | TITLE:
What should I know to make my I18N application work in Japanese?
QUESTION:
I'm working on a I18N application which will be located in Japanese, I don't know any word in Japanese, and I'm first wondering if utf8 is enough for that language. Usually, for European language, utf8 is enough, and I've to set up my da... | [
"php",
"utf-8",
"internationalization",
"gettext",
"utf-16"
] | 6 | 5 | 1,312 | 4 | 0 | 2011-06-01T10:02:14.287000 | 2011-06-01T11:10:09.247000 |
6,199,423 | 6,210,967 | How to terminate process with loop function? | I write one module, which has one loop function, the function will send udp packet forever. i debug the program in erlang console, I want to know how to close the UDP socket? or else erlang will always print the debug message in console. thanks! start() -> {ok, Sock} = gen_udp:open(0, []), send(Sock).
send(Sock) -> ge... | There are two things to be considered here If the process is the owner of the socket.In that case you can directly use gen_udp:close(Sock). If the process is not the owner of the socket then use gen_udp:controlling_process(Sock,Pid) where Pid is the process id of the new owner of the socket. Now you can use gen_udp:clo... | How to terminate process with loop function? I write one module, which has one loop function, the function will send udp packet forever. i debug the program in erlang console, I want to know how to close the UDP socket? or else erlang will always print the debug message in console. thanks! start() -> {ok, Sock} = gen_u... | TITLE:
How to terminate process with loop function?
QUESTION:
I write one module, which has one loop function, the function will send udp packet forever. i debug the program in erlang console, I want to know how to close the UDP socket? or else erlang will always print the debug message in console. thanks! start() -> ... | [
"erlang"
] | 1 | 2 | 558 | 2 | 0 | 2011-06-01T10:02:31.373000 | 2011-06-02T05:54:13.843000 |
6,199,437 | 6,199,621 | Mathematica: question on evaluation of expression | There was a question on mathgroup, and while I was looking at it, I noticed this thing, and I can't understand why, I thought some expert here would know. When doing Dt [ x[1] ] it gives zero, because during evaluation of x[1], the last value left is 1, as can be seen from the TracePrint below. And hence '1' is what is... | The expression x[1] does not evaluate to 1 - it is an indexed variable with undefined value. The problem is that when you use the form of Dt with 1 argument, then x is considered a function, and 1 - its argument, and you get 0. This becomes clearer when you consider In[1]:= Dt[x[y]]
Out[1]= Dt[y] Derivative[1][x][y] I... | Mathematica: question on evaluation of expression There was a question on mathgroup, and while I was looking at it, I noticed this thing, and I can't understand why, I thought some expert here would know. When doing Dt [ x[1] ] it gives zero, because during evaluation of x[1], the last value left is 1, as can be seen f... | TITLE:
Mathematica: question on evaluation of expression
QUESTION:
There was a question on mathgroup, and while I was looking at it, I noticed this thing, and I can't understand why, I thought some expert here would know. When doing Dt [ x[1] ] it gives zero, because during evaluation of x[1], the last value left is 1... | [
"wolfram-mathematica"
] | 3 | 5 | 402 | 1 | 0 | 2011-06-01T10:03:53.397000 | 2011-06-01T10:20:11.407000 |
6,199,438 | 6,199,812 | Inferred generic types and the backtick in JDK7 | I have been making my way through the Java Tutorial and have been reading about generic type inference in JDK7. I came across the following syntax... class MyClass { MyClass(T t) { //... } }
MyClass myObject = new MyClass<>("");...which is a little confusing. I understand the 'diamond' operator and how generic types c... | MyClass myObject = new MyClass<>(""); is just MyClass myObject = new MyClass (""); that is, you are 1. creating an instance of MyClass 2. invoking the constructor with String as a type parameter: MyClass(String t) { //... } The diamond operator has nothing to do with the constructor, as it does not "infer the type pass... | Inferred generic types and the backtick in JDK7 I have been making my way through the Java Tutorial and have been reading about generic type inference in JDK7. I came across the following syntax... class MyClass { MyClass(T t) { //... } }
MyClass myObject = new MyClass<>("");...which is a little confusing. I understan... | TITLE:
Inferred generic types and the backtick in JDK7
QUESTION:
I have been making my way through the Java Tutorial and have been reading about generic type inference in JDK7. I came across the following syntax... class MyClass { MyClass(T t) { //... } }
MyClass myObject = new MyClass<>("");...which is a little conf... | [
"java",
"generics",
"type-inference",
"java-7"
] | 3 | 2 | 822 | 1 | 0 | 2011-06-01T10:03:57.553000 | 2011-06-01T10:36:28.767000 |
6,199,440 | 6,199,762 | Collations on indexes in SQL Server | I am interested if there is a possibility to specify collation for a column when creating index that is different from the collation of that column? And when indexed, are string data sorted according to collation of column or collation of database? | I don't believe you can. Although COLLATE is documented separately, you'll note that there are only 3 places listed where it can occur: Creating or altering a database Creating or altering a table column Casting the collation of an expression Note that, for instance, in CREATE TABLE:::= column_name [ FILESTREAM ] [ COL... | Collations on indexes in SQL Server I am interested if there is a possibility to specify collation for a column when creating index that is different from the collation of that column? And when indexed, are string data sorted according to collation of column or collation of database? | TITLE:
Collations on indexes in SQL Server
QUESTION:
I am interested if there is a possibility to specify collation for a column when creating index that is different from the collation of that column? And when indexed, are string data sorted according to collation of column or collation of database?
ANSWER:
I don't ... | [
"t-sql",
"indexing",
"collation"
] | 10 | 7 | 10,461 | 3 | 0 | 2011-06-01T10:04:03.800000 | 2011-06-01T10:32:20.193000 |
6,199,441 | 6,199,528 | Why migration doesn't work | I have a migration AddAuthenticableToUser. (rake db:migrate:up VERSION=..) works fine, but when I'm trying to rollback a migration (rake db:migrate:down VERSION=..) it doesn't works. Any errors or warnings. Could you help me with this? def self.up change_table:users do |t| t.token_authenticatable end add_index:users,:a... | This should be the trick. I think you named your table token_authenticatable and then tried to remove authentication_token. def self.up create_table:reviews do |t| t.column:authentication_token end add_index:users,:authentication_token,:unique => true end
def self.down remove_index:users,:authentication_token remove_c... | Why migration doesn't work I have a migration AddAuthenticableToUser. (rake db:migrate:up VERSION=..) works fine, but when I'm trying to rollback a migration (rake db:migrate:down VERSION=..) it doesn't works. Any errors or warnings. Could you help me with this? def self.up change_table:users do |t| t.token_authenticat... | TITLE:
Why migration doesn't work
QUESTION:
I have a migration AddAuthenticableToUser. (rake db:migrate:up VERSION=..) works fine, but when I'm trying to rollback a migration (rake db:migrate:down VERSION=..) it doesn't works. Any errors or warnings. Could you help me with this? def self.up change_table:users do |t| t... | [
"ruby-on-rails",
"ruby",
"migration"
] | 1 | 3 | 324 | 1 | 0 | 2011-06-01T10:04:06.383000 | 2011-06-01T10:10:59.720000 |
6,199,446 | 6,199,614 | how to upload an audio file using HTTP POST from iPhone? | I am trying to upload an audio file in "caf" format from the iPhone to a web server. The used codes are given below. The problem is, I am not getting any file to upload, there is not output for the file names in PHP echo! Any help would be greatly appreciated. The code I am using at the iPhone end is: NSData *fileData=... | I have used this code for video upload, you can use it for your audio upload. NSString *str = [NSString stringWithFormat:@"%@/uploadVideoIphone.php",appUrl]; NSURL *url = [NSURL URLWithString:[str stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; ASIFormDataRequest *request = [ASIFormDataRequest request... | how to upload an audio file using HTTP POST from iPhone? I am trying to upload an audio file in "caf" format from the iPhone to a web server. The used codes are given below. The problem is, I am not getting any file to upload, there is not output for the file names in PHP echo! Any help would be greatly appreciated. Th... | TITLE:
how to upload an audio file using HTTP POST from iPhone?
QUESTION:
I am trying to upload an audio file in "caf" format from the iPhone to a web server. The used codes are given below. The problem is, I am not getting any file to upload, there is not output for the file names in PHP echo! Any help would be great... | [
"iphone",
"http",
"post",
"upload"
] | 2 | 3 | 4,594 | 1 | 0 | 2011-06-01T10:04:29.323000 | 2011-06-01T10:19:13.263000 |
6,199,455 | 6,199,533 | finding a string in php | I want to find a string like 'Jobs' in a title. Suppose i have 10 rows in a file. i.e Jobs for Accountant. Featured Jobs for public Services. Website Development Jobs in Delhi..... How to find jobs keyword in these type of titles? | You can use strpos. if(strpos($string, 'Jobs')!== false) Make sure you do it exactly like that, since if(strpos($string, 'Jobs') would return 0 if the string started with 'Jobs', which would be casted to the boolean value of 0: false. | finding a string in php I want to find a string like 'Jobs' in a title. Suppose i have 10 rows in a file. i.e Jobs for Accountant. Featured Jobs for public Services. Website Development Jobs in Delhi..... How to find jobs keyword in these type of titles? | TITLE:
finding a string in php
QUESTION:
I want to find a string like 'Jobs' in a title. Suppose i have 10 rows in a file. i.e Jobs for Accountant. Featured Jobs for public Services. Website Development Jobs in Delhi..... How to find jobs keyword in these type of titles?
ANSWER:
You can use strpos. if(strpos($string,... | [
"php",
"string",
"search"
] | 0 | 1 | 145 | 5 | 0 | 2011-06-01T10:05:25.307000 | 2011-06-01T10:11:30.250000 |
6,199,458 | 6,201,044 | How to create a modular JSF 2.0 application? | I have an application with a well defined interface. It uses CDI for resolution of the modules, (Specifically it uses Instance<> injection points on API interfaces to resolve modules) and passes various data back and fourth via the interfaces without issue. I've intentionally kept the API and implementation separate, a... | I understand that your question basically boils down to How can I include Facelets views in a JAR? You can do this by placing a custom ResourceResolver in the JAR. public class FaceletsResourceResolver extends ResourceResolver {
private ResourceResolver parent; private String basePath;
public FaceletsResourceResolver... | How to create a modular JSF 2.0 application? I have an application with a well defined interface. It uses CDI for resolution of the modules, (Specifically it uses Instance<> injection points on API interfaces to resolve modules) and passes various data back and fourth via the interfaces without issue. I've intentionall... | TITLE:
How to create a modular JSF 2.0 application?
QUESTION:
I have an application with a well defined interface. It uses CDI for resolution of the modules, (Specifically it uses Instance<> injection points on API interfaces to resolve modules) and passes various data back and fourth via the interfaces without issue.... | [
"java",
"jsf-2",
"cdi",
"jboss-weld",
"modular"
] | 26 | 34 | 14,321 | 3 | 0 | 2011-06-01T10:05:30.540000 | 2011-06-01T12:21:35.717000 |
6,199,461 | 6,199,538 | Filter data between two dates using LINQ | How to filter data between two datetime. Here i am filtering the text file length in a directory..I need to filter text file between the selected date. DateTime startDate = dateTimePicker1.Value; DateTime endDate = dateTimePicker2.Value; var queryList1Only = from i in di.GetFiles("*.txt", SearchOption.AllDirectories) s... | Use the Where clause: DateTime startDate = dateTimePicker1.Value; DateTime endDate = dateTimePicker2.Value;
var queryList1Only = from i in di.GetFiles("*.txt", SearchOption.AllDirectories) where i.GetCreationTime() > startDate && i.GetCreationTime() < endDate select i.Length; Instead of GetCreationTime you could use G... | Filter data between two dates using LINQ How to filter data between two datetime. Here i am filtering the text file length in a directory..I need to filter text file between the selected date. DateTime startDate = dateTimePicker1.Value; DateTime endDate = dateTimePicker2.Value; var queryList1Only = from i in di.GetFile... | TITLE:
Filter data between two dates using LINQ
QUESTION:
How to filter data between two datetime. Here i am filtering the text file length in a directory..I need to filter text file between the selected date. DateTime startDate = dateTimePicker1.Value; DateTime endDate = dateTimePicker2.Value; var queryList1Only = fr... | [
"c#",
".net",
"linq"
] | 7 | 6 | 17,802 | 4 | 0 | 2011-06-01T10:05:42.630000 | 2011-06-01T10:11:37.590000 |
6,199,463 | 6,199,746 | Access MongoDB Rest Service to get a document inside a document | with mongodb and rest activated, i would like to query a document inside another document, what is the syntax? In my exemple, I have a Person collection which contains an Order document for each Person. Ex, I have this schema public Person{ public int Id {get;set;} public IList Order {get;set;} }
public Order{ public ... | Syntax the same as usual, so following request should work: http://localhost:28017/MyDatabase/PersonCollection/?filter_Order.Id=40 But yout document should looks like this: { "_id": 1, "Order": [ { "Id": 40, "OrderName": "name" } ] } | Access MongoDB Rest Service to get a document inside a document with mongodb and rest activated, i would like to query a document inside another document, what is the syntax? In my exemple, I have a Person collection which contains an Order document for each Person. Ex, I have this schema public Person{ public int Id {... | TITLE:
Access MongoDB Rest Service to get a document inside a document
QUESTION:
with mongodb and rest activated, i would like to query a document inside another document, what is the syntax? In my exemple, I have a Person collection which contains an Order document for each Person. Ex, I have this schema public Perso... | [
"c#",
"rest",
"mongodb",
"mongodb-.net-driver"
] | 1 | 1 | 407 | 1 | 0 | 2011-06-01T10:05:49.127000 | 2011-06-01T10:30:46.677000 |
6,199,465 | 6,199,560 | checking for the last element in a foreach | I have this code: foreach (Object element in elements.under) {... } and I'd like to print some only when I'm into the last cycle. How can I do it? | You need to keep track of a counter and then check for last element - int i = 1; foreach (Object element in elements.under) { if (i == elements.under.Count) //Use count or length as supported by your collection { //last element } else { i++; } } | checking for the last element in a foreach I have this code: foreach (Object element in elements.under) {... } and I'd like to print some only when I'm into the last cycle. How can I do it? | TITLE:
checking for the last element in a foreach
QUESTION:
I have this code: foreach (Object element in elements.under) {... } and I'd like to print some only when I'm into the last cycle. How can I do it?
ANSWER:
You need to keep track of a counter and then check for last element - int i = 1; foreach (Object elemen... | [
"c#",
".net",
"foreach"
] | 8 | 8 | 23,070 | 5 | 0 | 2011-06-01T10:05:55.570000 | 2011-06-01T10:13:10.953000 |
6,199,467 | 6,199,556 | uitableview gets crashed while scrolling in ipad | hi all i implemented customized UITableViewcell with the below code.Each cell loaded with four images.. -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *hlCellID = @"hlCellID";
UITableViewCell *hlcell = [tableView dequeueReusableCellWithIdentifie... | It looks like you always allocate new Images and display them on the Cell, but you never actually release the images when the cell is no longer displayed. The definition for the UITableView cell states, that as soon a cell is no longer used it is purged and prepared for a new content. In your code you always add new su... | uitableview gets crashed while scrolling in ipad hi all i implemented customized UITableViewcell with the below code.Each cell loaded with four images.. -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *hlCellID = @"hlCellID";
UITableViewCell *hlc... | TITLE:
uitableview gets crashed while scrolling in ipad
QUESTION:
hi all i implemented customized UITableViewcell with the below code.Each cell loaded with four images.. -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *hlCellID = @"hlCellID";
UI... | [
"iphone",
"objective-c",
"uitableview",
"uiscrollview"
] | 1 | 0 | 355 | 1 | 0 | 2011-06-01T10:05:59.487000 | 2011-06-01T10:12:55.403000 |
6,199,468 | 6,199,497 | jquery adding click event to dynamically created element | i have the need to add a click event to a list item i create dynamically after the DOM has loaded. I'm using; $("#ListDiv li").live("click",function(event){ do something...... }); however when the element is loaded on the page and i click it i get nothing. This works fine in Firefox but not in IE8. I also tried jquery ... | Use.delegate or.live and make sure you bind once the DOM is ready: $(document).ready(function () { $("#ListDiv").delegate("li", "click", function (event) { // do something }); }); EDIT: The above solution, while still perfectly valid, is now legacy/deprecated. jQuery has since introduced the.on() method: As of jQuery 1... | jquery adding click event to dynamically created element i have the need to add a click event to a list item i create dynamically after the DOM has loaded. I'm using; $("#ListDiv li").live("click",function(event){ do something...... }); however when the element is loaded on the page and i click it i get nothing. This w... | TITLE:
jquery adding click event to dynamically created element
QUESTION:
i have the need to add a click event to a list item i create dynamically after the DOM has loaded. I'm using; $("#ListDiv li").live("click",function(event){ do something...... }); however when the element is loaded on the page and i click it i g... | [
"jquery",
"internet-explorer-8",
"live"
] | 3 | 10 | 4,306 | 2 | 0 | 2011-06-01T10:06:14.643000 | 2011-06-01T10:08:43.450000 |
6,199,476 | 6,199,855 | label for attribute changes color of label | I used 'for' attribute in label tag in HTML but using that made my lable look grey rather than default black help me to make this black uniformly without using any inline style or giving any special class attribute in each label. | You could just change the style all labels. label { color: #000; /* makes the text-black */ } of you can make it more specific... #form-id-here label { color:#000; } That way you can change the labels for a certain form only. | label for attribute changes color of label I used 'for' attribute in label tag in HTML but using that made my lable look grey rather than default black help me to make this black uniformly without using any inline style or giving any special class attribute in each label. | TITLE:
label for attribute changes color of label
QUESTION:
I used 'for' attribute in label tag in HTML but using that made my lable look grey rather than default black help me to make this black uniformly without using any inline style or giving any special class attribute in each label.
ANSWER:
You could just chang... | [
"html",
"colors",
"label"
] | 0 | 2 | 29,962 | 1 | 0 | 2011-06-01T10:06:54.843000 | 2011-06-01T10:40:16.113000 |
6,199,478 | 6,199,637 | Android - Signing an apk | I have written a little program, by default, it is signed with debug certificate. I checked the documentation at Android developer site, I don't know how to get the certificate and key, could someone advice me? | Right click your project: Android Tools -> Export Signed Application Package Give the project name which you want to sign. Click next. If you want to create a new keystore, select "Create New Keystore". Give the location where to save it. The name of the keystore should end with.keystore and give a password for it. Cli... | Android - Signing an apk I have written a little program, by default, it is signed with debug certificate. I checked the documentation at Android developer site, I don't know how to get the certificate and key, could someone advice me? | TITLE:
Android - Signing an apk
QUESTION:
I have written a little program, by default, it is signed with debug certificate. I checked the documentation at Android developer site, I don't know how to get the certificate and key, could someone advice me?
ANSWER:
Right click your project: Android Tools -> Export Signed ... | [
"android"
] | 0 | 2 | 165 | 2 | 0 | 2011-06-01T10:07:13.173000 | 2011-06-01T10:21:16.557000 |
6,199,481 | 6,199,625 | Trouble figuring out the UITableViewCell multiline ability | Got pretty far with this one but am hanging on the part where I read out the string information. I made a cell that receives data from an external xml file, it all works fine but some cell contain to much text which I want to display over multiple lines. Also no problem. But the tricky part is the dynamic height of my ... | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
CGSize maxSize = CGSizeMake(urMaxSize); CGSize cellSize = [itemName sizeWithFont:[UIFont systemFontOfSize:15] constrainedToSize:maxSize lineBreakMode:UILineBreakModeWordWrap]; return cellSize.height; } itemName is the text ... | Trouble figuring out the UITableViewCell multiline ability Got pretty far with this one but am hanging on the part where I read out the string information. I made a cell that receives data from an external xml file, it all works fine but some cell contain to much text which I want to display over multiple lines. Also n... | TITLE:
Trouble figuring out the UITableViewCell multiline ability
QUESTION:
Got pretty far with this one but am hanging on the part where I read out the string information. I made a cell that receives data from an external xml file, it all works fine but some cell contain to much text which I want to display over mult... | [
"iphone",
"dynamic",
"uitableview",
"multiline"
] | 1 | 1 | 653 | 2 | 0 | 2011-06-01T10:07:20.617000 | 2011-06-01T10:20:28.377000 |
6,199,482 | 6,199,600 | Simple like-query does not work in MS-Access | I have a simple Ms-Access database with one table named Student and it has two columns ID and Name. When I the database in Access and enter the query select * from Student where Name like 'J%' in its SQL view, it gives an empty resultset. But the table has a Name called John. I tried with other databases and tables als... | What you need is select * from Student where Name like 'J*' or possibly (because I don't have access handy to check, possibly either will work) select * from Student where Name like "J*" The * is the wild card character for MsAccess | Simple like-query does not work in MS-Access I have a simple Ms-Access database with one table named Student and it has two columns ID and Name. When I the database in Access and enter the query select * from Student where Name like 'J%' in its SQL view, it gives an empty resultset. But the table has a Name called John... | TITLE:
Simple like-query does not work in MS-Access
QUESTION:
I have a simple Ms-Access database with one table named Student and it has two columns ID and Name. When I the database in Access and enter the query select * from Student where Name like 'J%' in its SQL view, it gives an empty resultset. But the table has ... | [
"database",
"ms-access",
"sql-like"
] | 0 | 1 | 4,093 | 2 | 0 | 2011-06-01T10:07:31.343000 | 2011-06-01T10:17:52.037000 |
6,199,484 | 6,208,289 | Spring MVC 3 and Ajax library advice | I'm developing a webapp with Hibernate+Spring 3 (Spring MVC, JSP): I'd like to create some divs with AJAX style (i.e. no need to refresh all the page, independent update of each div). I'd like a good advice about which AJAX library to use (in conjunction with Spring 3 MVC + JSP) and, if possible, where to find some cod... | This is correct use JQuery Here http://blog.springsource.com/2010/01/25/ajax-simplifications-in-spring-3-0/ you can find working examples to use Jquery+JSON+Spring MVC. and this question can help you with server side configuration: JQuery, Spring MVC @RequestBody and JSON - making it work together | Spring MVC 3 and Ajax library advice I'm developing a webapp with Hibernate+Spring 3 (Spring MVC, JSP): I'd like to create some divs with AJAX style (i.e. no need to refresh all the page, independent update of each div). I'd like a good advice about which AJAX library to use (in conjunction with Spring 3 MVC + JSP) and... | TITLE:
Spring MVC 3 and Ajax library advice
QUESTION:
I'm developing a webapp with Hibernate+Spring 3 (Spring MVC, JSP): I'd like to create some divs with AJAX style (i.e. no need to refresh all the page, independent update of each div). I'd like a good advice about which AJAX library to use (in conjunction with Sprin... | [
"ajax",
"spring",
"web-applications",
"spring-mvc"
] | 1 | 4 | 1,366 | 2 | 0 | 2011-06-01T10:07:38.580000 | 2011-06-01T22:03:50.207000 |
6,199,491 | 6,199,588 | Django login throws a "<type 'exceptions.AttributeError'>" exception | I want to log a user in with the following code: try: user = User.objects.get(username = username) print "user found"
if user.password == password and user.is_active: print "user: " + str(user) try: print "test1" login(request, user) print "test2" except: print "error" import sys print "--> " + str(sys.exc_info()[0]) ... | Why are you doing any of this? First of all, you shouldn't be catching the exception only to re-raise it. Running with DEBUG on, Django provides you with an excellent error page which would have shown you the actual error and the code that raises it - in particular, you would have seen which attribute is being accessed... | Django login throws a "<type 'exceptions.AttributeError'>" exception I want to log a user in with the following code: try: user = User.objects.get(username = username) print "user found"
if user.password == password and user.is_active: print "user: " + str(user) try: print "test1" login(request, user) print "test2" ex... | TITLE:
Django login throws a "<type 'exceptions.AttributeError'>" exception
QUESTION:
I want to log a user in with the following code: try: user = User.objects.get(username = username) print "user found"
if user.password == password and user.is_active: print "user: " + str(user) try: print "test1" login(request, user... | [
"django",
"exception",
"authentication"
] | 0 | 2 | 533 | 1 | 0 | 2011-06-01T10:08:16.943000 | 2011-06-01T10:16:13.313000 |
6,199,496 | 6,199,640 | array_filter with assoc array? | I am using array_filter to do something like this: function endswithy($value) { return (substr($value, -1) == 'y'); }
$people = array("Johnny", "Timmy", "Bobby", "Sam", "Tammy", "Danny", "Joe"); $withy = array_filter($people, "endswithy"); var_dump($withy); BUT with the more option in filter for example $people = arra... | Either use foreach with your current array's structure: $people = array( "Johnny" => array("year" => 1989, "job" => "prof"), "Timmy" => array("year" => 1989, "job" => "std"), "Bobby" => array("year" => 1988), "Sam" => array("year" => 1983), "Tammy" => array("year" => 1985), "Danny" => array("year" => 1983), "Joe" => ar... | array_filter with assoc array? I am using array_filter to do something like this: function endswithy($value) { return (substr($value, -1) == 'y'); }
$people = array("Johnny", "Timmy", "Bobby", "Sam", "Tammy", "Danny", "Joe"); $withy = array_filter($people, "endswithy"); var_dump($withy); BUT with the more option in fi... | TITLE:
array_filter with assoc array?
QUESTION:
I am using array_filter to do something like this: function endswithy($value) { return (substr($value, -1) == 'y'); }
$people = array("Johnny", "Timmy", "Bobby", "Sam", "Tammy", "Danny", "Joe"); $withy = array_filter($people, "endswithy"); var_dump($withy); BUT with the... | [
"php",
"multidimensional-array"
] | 14 | 10 | 27,777 | 2 | 0 | 2011-06-01T10:08:42.333000 | 2011-06-01T10:21:23.510000 |
6,199,499 | 6,199,676 | Use a marquee in a div only if there is overflow? | I want to scroll text (marquee) in a div tag ONLY when the text overflows. I have the marquee setup, and I am using the jQuery Marquee plugin. Everything works beautifully with the marquee, but I don't need it to scroll if the text fits on one line. The page where I am working is here: http://lbrannonent.com/BigCountry... | Here is the working demo that i made for your question. It should give you the idea what to do. | Use a marquee in a div only if there is overflow? I want to scroll text (marquee) in a div tag ONLY when the text overflows. I have the marquee setup, and I am using the jQuery Marquee plugin. Everything works beautifully with the marquee, but I don't need it to scroll if the text fits on one line. The page where I am ... | TITLE:
Use a marquee in a div only if there is overflow?
QUESTION:
I want to scroll text (marquee) in a div tag ONLY when the text overflows. I have the marquee setup, and I am using the jQuery Marquee plugin. Everything works beautifully with the marquee, but I don't need it to scroll if the text fits on one line. Th... | [
"javascript",
"jquery",
"html",
"css",
"marquee"
] | 1 | 2 | 7,683 | 2 | 0 | 2011-06-01T10:08:58.010000 | 2011-06-01T10:24:55.310000 |
6,199,502 | 6,202,271 | Facing problem accessing MySql Timestamp column in Entity Framework | I am using MySql.net connector 6.3.6 and Visual Studio 2008 sp1. One of the table in the database has a timestamp column. When I generate Entity mappings (.edmx file), the timestamp column is getting mapped to DateTimeOffset data type. And when I hit a Linq query on this table, I always get Null value for this column (... | I recommend you to try dotConnect for MySQL. It generates DateTime properties for the corresponding Timestamp columns. You can download a Trial version here, the only limitation of this version is 30-day trial period. Update. You can try editing the.edmx file using an XML editor. Set the type of the CSDL property to Da... | Facing problem accessing MySql Timestamp column in Entity Framework I am using MySql.net connector 6.3.6 and Visual Studio 2008 sp1. One of the table in the database has a timestamp column. When I generate Entity mappings (.edmx file), the timestamp column is getting mapped to DateTimeOffset data type. And when I hit a... | TITLE:
Facing problem accessing MySql Timestamp column in Entity Framework
QUESTION:
I am using MySql.net connector 6.3.6 and Visual Studio 2008 sp1. One of the table in the database has a timestamp column. When I generate Entity mappings (.edmx file), the timestamp column is getting mapped to DateTimeOffset data type... | [
"mysql",
"entity-framework",
"linq-to-entities",
"timestamp"
] | 0 | 0 | 1,292 | 1 | 0 | 2011-06-01T10:09:03.293000 | 2011-06-01T13:51:55.067000 |
6,199,507 | 6,213,310 | A shorter way of specifying a set in MDX | Is there a briefer way of specifying a set in MDX? I know I can do something like: {[Debtor].[TRADING DEBTOR CODE].&[AU-000013],[Debtor].[TRADING DEBTOR CODE].&[AU-000020]} but once you get over a few members, it becomes incredibly verbose. I'm looking for something like MagicFunctionToMakeASet([Debtor].[TRADING DEBTOR... | Are they in sequence at all? If so, could you do { [Debtor].[TRADING DEBTOR CODE].&[AU-000013]: [Debtor].[TRADING DEBTOR CODE].&[AU-000020] } To give you a set of codes 13 though to 20 inclusive? Failing that, take a look at InStr and see if it can help, it looks like it might - Or you could create some subsets using i... | A shorter way of specifying a set in MDX Is there a briefer way of specifying a set in MDX? I know I can do something like: {[Debtor].[TRADING DEBTOR CODE].&[AU-000013],[Debtor].[TRADING DEBTOR CODE].&[AU-000020]} but once you get over a few members, it becomes incredibly verbose. I'm looking for something like MagicFu... | TITLE:
A shorter way of specifying a set in MDX
QUESTION:
Is there a briefer way of specifying a set in MDX? I know I can do something like: {[Debtor].[TRADING DEBTOR CODE].&[AU-000013],[Debtor].[TRADING DEBTOR CODE].&[AU-000020]} but once you get over a few members, it becomes incredibly verbose. I'm looking for some... | [
"mdx",
"ssas"
] | 1 | 1 | 109 | 2 | 0 | 2011-06-01T10:09:32.170000 | 2011-06-02T10:28:35.143000 |
6,199,513 | 6,199,564 | Try/Catch does not catch | In following code I purposefully mistype "@fooData" to "@foo111Data" to check if the try statement is catching my exception. See below code. But the try/catch statement did not catch and display and exception in MessageBox, and VS2010 just break down and highlight the line of wrong code. try { conn.Open(); cmd.Paramete... | Perhaps an exception of a different type is being thrown? I would suggest that you change the catch so that it just catches a general Exception, and see if it's throwing another type. Put a breakpoint in the catch statement, on the MessageBox.Show line, and then you can examine the Exception. | Try/Catch does not catch In following code I purposefully mistype "@fooData" to "@foo111Data" to check if the try statement is catching my exception. See below code. But the try/catch statement did not catch and display and exception in MessageBox, and VS2010 just break down and highlight the line of wrong code. try { ... | TITLE:
Try/Catch does not catch
QUESTION:
In following code I purposefully mistype "@fooData" to "@foo111Data" to check if the try statement is catching my exception. See below code. But the try/catch statement did not catch and display and exception in MessageBox, and VS2010 just break down and highlight the line of ... | [
"c#",
"winforms",
"exception",
"try-catch"
] | 3 | 8 | 6,486 | 5 | 0 | 2011-06-01T10:09:57.807000 | 2011-06-01T10:13:33.140000 |
6,199,523 | 6,199,817 | Count the number of files inside a folder in Objective C (Cocoa) | I m making an array of images animate like a flicker book animation,i m storing these images inside a folder which intern resides inside Resource folder of my project in xcode.. these images will vary,that is why i have to determine the exact number of images inside the folder so how should i determine this? is there a... | First, you need to access the bundle path of your application: NSMutableString* bundlePath = [NSMutableString stringWithCapacity:4]; [bundlePath appendString:[[NSBundle mainBundle] bundlePath]]; Now append your folder name to the bundlePath [bundlePath appendString:@"/MyFolder"]; NSArray *directoryContent = [[NSFileMan... | Count the number of files inside a folder in Objective C (Cocoa) I m making an array of images animate like a flicker book animation,i m storing these images inside a folder which intern resides inside Resource folder of my project in xcode.. these images will vary,that is why i have to determine the exact number of im... | TITLE:
Count the number of files inside a folder in Objective C (Cocoa)
QUESTION:
I m making an array of images animate like a flicker book animation,i m storing these images inside a folder which intern resides inside Resource folder of my project in xcode.. these images will vary,that is why i have to determine the ... | [
"objective-c",
"image"
] | 8 | 10 | 7,268 | 2 | 0 | 2011-06-01T10:10:47.743000 | 2011-06-01T10:36:39.743000 |
6,199,527 | 6,199,617 | creating ado recordset from fso object | i have a fso object the gets all files in directory. i want to create a recordset of the file name, size and date created so i will be able to sort the recordset by date. what i tried is: Dim rs set rs=Server.CreateObject("ADODB.recordset")
-----------> rs.fields.append "Name", 201
rs.fields.append "Size", 201 rs.fie... | After.Open you must.Addnew in order to create a row to which you can assign your values. Also I would use rs.fields.append "Size", 201, 255 (200=advarchar; 255=max len) instead of the longvarchar 201 which iirc is implemented as a blob so is not as performant. | creating ado recordset from fso object i have a fso object the gets all files in directory. i want to create a recordset of the file name, size and date created so i will be able to sort the recordset by date. what i tried is: Dim rs set rs=Server.CreateObject("ADODB.recordset")
-----------> rs.fields.append "Name", 2... | TITLE:
creating ado recordset from fso object
QUESTION:
i have a fso object the gets all files in directory. i want to create a recordset of the file name, size and date created so i will be able to sort the recordset by date. what i tried is: Dim rs set rs=Server.CreateObject("ADODB.recordset")
-----------> rs.field... | [
"asp-classic",
"recordset"
] | 4 | 2 | 1,780 | 1 | 0 | 2011-06-01T10:10:59.553000 | 2011-06-01T10:19:31.843000 |
6,199,531 | 6,205,736 | JMockit | trying to define different return values based on parameters but getting unexpected results | I've got a class like the following: class A { public method doSomething() { //....
DAO dataAccessor = new DAO(); List result1 = dataAccessor.getData(dataAccessor.getSql1()); List result2 = dataAccessor.getData(dataAccessor.getSql2());
//.. do some stuff with the results
} Now, I use jMockit for testing the above fu... | So, After digging more deeply inside the manual, I found that:...But what if a test needs to decide the result of a recorded invocation based on the arguments it will receive at replay time? We can do it through a mockit.Delegate instance... So, in order to solve the above problem, the expectations block should look li... | JMockit | trying to define different return values based on parameters but getting unexpected results I've got a class like the following: class A { public method doSomething() { //....
DAO dataAccessor = new DAO(); List result1 = dataAccessor.getData(dataAccessor.getSql1()); List result2 = dataAccessor.getData(dataAc... | TITLE:
JMockit | trying to define different return values based on parameters but getting unexpected results
QUESTION:
I've got a class like the following: class A { public method doSomething() { //....
DAO dataAccessor = new DAO(); List result1 = dataAccessor.getData(dataAccessor.getSql1()); List result2 = dataAcces... | [
"java",
"jmockit"
] | 1 | 3 | 7,193 | 1 | 0 | 2011-06-01T10:11:07.663000 | 2011-06-01T18:08:43.380000 |
6,199,535 | 6,199,745 | Is it possible to declare js event and/or function using only css3? | I know there are methods of adding content to a web page like stated here: http://nooshu.com/adding-content-using-css3 But.. I wonder if there is also a possibility to declare a js event in css on given selected nodes, like:.myclass { declare-js-event: "onclick"; declare-js-function: "alert('I've been clicked!')" } If ... | You can declare JavaScript expressions and functions in CSS using IE's expression() function. Another way is to use the url() function. For example: // Expression() selector { width: expression((document.body.clientWidth > 1024)? "1200px": "960px"); }
// URL() selector { background: url("javascript: alert('XSS')"); } ... | Is it possible to declare js event and/or function using only css3? I know there are methods of adding content to a web page like stated here: http://nooshu.com/adding-content-using-css3 But.. I wonder if there is also a possibility to declare a js event in css on given selected nodes, like:.myclass { declare-js-event:... | TITLE:
Is it possible to declare js event and/or function using only css3?
QUESTION:
I know there are methods of adding content to a web page like stated here: http://nooshu.com/adding-content-using-css3 But.. I wonder if there is also a possibility to declare a js event in css on given selected nodes, like:.myclass {... | [
"javascript",
"css"
] | 1 | 1 | 162 | 2 | 0 | 2011-06-01T10:11:32.627000 | 2011-06-01T10:30:43.967000 |
6,199,536 | 6,268,972 | Jquery Event Trigger Keyboard Simulation | i'm doing a minimal example http://jsfiddle.net/ PSYCKIC /SQZVH/1/ Can't not put it work, but the idea is to simulate a keyboard event as keypress,keydown or keyup that works for every browser(Firefox, Safari, Chrome, IE). Not sure why the code isn't working, any ideia how can i do it? | This is the current solution working for Chrome and Firefox, still need to check if work Opera and IE // put cursor and input text in correct position
function setCaretPosition(elem, caretPos) { if (elem!= null) { if (elem.createTextRange) { var range = elem.createTextRange(); range.move('character', caretPos); range.... | Jquery Event Trigger Keyboard Simulation i'm doing a minimal example http://jsfiddle.net/ PSYCKIC /SQZVH/1/ Can't not put it work, but the idea is to simulate a keyboard event as keypress,keydown or keyup that works for every browser(Firefox, Safari, Chrome, IE). Not sure why the code isn't working, any ideia how can i... | TITLE:
Jquery Event Trigger Keyboard Simulation
QUESTION:
i'm doing a minimal example http://jsfiddle.net/ PSYCKIC /SQZVH/1/ Can't not put it work, but the idea is to simulate a keyboard event as keypress,keydown or keyup that works for every browser(Firefox, Safari, Chrome, IE). Not sure why the code isn't working, a... | [
"jquery",
"events",
"triggers",
"keyboard"
] | 0 | 0 | 5,027 | 2 | 0 | 2011-06-01T10:11:35.577000 | 2011-06-07T17:06:41.900000 |
6,199,547 | 6,210,261 | Interop: Cannot call get_Range, and cannot use two-dimensional object array returned by Range().Value2? | Trying to replace Cells(RowIndex,ColumnIndex).Value() calls by row-wise references for performance, I permanently fail at referencing the result. Starting with Excel Interop - Efficiency and performance, which contains the tip to use get_range, i.e. //get values object[,] objectArray = shtName.get_Range("A1:Z100").Valu... | Perhaps something like this? Note that if you want the array to have the column as the first element you'd use change the line below as noted: Imports Microsoft.Office.Interop Module Module1 Sub main() Dim appExcel As Excel.Application Dim wb As Excel.Workbook Dim ws As Excel.Worksheet Dim values As Object
appExcel = ... | Interop: Cannot call get_Range, and cannot use two-dimensional object array returned by Range().Value2? Trying to replace Cells(RowIndex,ColumnIndex).Value() calls by row-wise references for performance, I permanently fail at referencing the result. Starting with Excel Interop - Efficiency and performance, which contai... | TITLE:
Interop: Cannot call get_Range, and cannot use two-dimensional object array returned by Range().Value2?
QUESTION:
Trying to replace Cells(RowIndex,ColumnIndex).Value() calls by row-wise references for performance, I permanently fail at referencing the result. Starting with Excel Interop - Efficiency and perform... | [
".net",
"vb.net",
"excel",
"interop"
] | 2 | 1 | 2,030 | 2 | 0 | 2011-06-01T10:12:18.597000 | 2011-06-02T04:11:37.540000 |
6,199,570 | 6,199,685 | Send rest request with Perl | Is it possible to send rest request, including header authentication in perl/shell script/command line. And get the response? | Something like this if you want to manipulate the result in Perl: use strict; use warnings; use LWP::UserAgent;
my $ua=LWP::UserAgent->new;
my $result=$ua->get("http://www.google.com/");
print $result->content; Or, with basic HTTP authentication something like this: use strict; use warnings; use LWP::UserAgent;
my ... | Send rest request with Perl Is it possible to send rest request, including header authentication in perl/shell script/command line. And get the response? | TITLE:
Send rest request with Perl
QUESTION:
Is it possible to send rest request, including header authentication in perl/shell script/command line. And get the response?
ANSWER:
Something like this if you want to manipulate the result in Perl: use strict; use warnings; use LWP::UserAgent;
my $ua=LWP::UserAgent->new... | [
"linux",
"perl",
"shell"
] | 2 | 5 | 3,271 | 1 | 0 | 2011-06-01T10:14:22.703000 | 2011-06-01T10:25:16.040000 |
6,199,572 | 6,200,998 | Stored procedure does not exist, even after creating it | I am trying to create a mysql stored procedure. I have successfully created a procedure using the following code: delimiter $$ CREATE PROCEDURE `myprocedure` (IN var1 DATE) BEGIN <---code--> END And SHOW CREATE PROCEDURE myprocedure shows me the procedure I have created. But the Call myprocedure(2011-05-31); shows me t... | please check the following example paying particular attention to use of delimiters and quoting of date input parameters. drop procedure if exists my_procedure;
delimiter #
create procedure my_procedure ( in p_start_date date ) begin
-- do something... select p_start_date as start_date; -- end of sql statement
end#... | Stored procedure does not exist, even after creating it I am trying to create a mysql stored procedure. I have successfully created a procedure using the following code: delimiter $$ CREATE PROCEDURE `myprocedure` (IN var1 DATE) BEGIN <---code--> END And SHOW CREATE PROCEDURE myprocedure shows me the procedure I have c... | TITLE:
Stored procedure does not exist, even after creating it
QUESTION:
I am trying to create a mysql stored procedure. I have successfully created a procedure using the following code: delimiter $$ CREATE PROCEDURE `myprocedure` (IN var1 DATE) BEGIN <---code--> END And SHOW CREATE PROCEDURE myprocedure shows me the ... | [
"mysql",
"database",
"stored-procedures",
"stored-functions"
] | 12 | 7 | 30,768 | 1 | 0 | 2011-06-01T10:14:32.390000 | 2011-06-01T12:18:34.720000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.