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,229,879 | 6,229,921 | Call a function inside view controller from his super | I am sorry if i am not accurate in my terms. i will be glad if someone can fix me. I have a ViewController "GeneralCard". Based on the "GeneralCard" i have created a sibling ViewController called "BlueCard" like that: @interface BlueCardViewController: GeneralViewController (I did off course because i have many cards t... | If you call [self someMethod] it will work its way up from the lowest level class (the one that init was called on) to find the method. So, as long as you have implemented someMethod in the BlueCardViewController class it will be the one called. | Call a function inside view controller from his super I am sorry if i am not accurate in my terms. i will be glad if someone can fix me. I have a ViewController "GeneralCard". Based on the "GeneralCard" i have created a sibling ViewController called "BlueCard" like that: @interface BlueCardViewController: GeneralViewCo... | TITLE:
Call a function inside view controller from his super
QUESTION:
I am sorry if i am not accurate in my terms. i will be glad if someone can fix me. I have a ViewController "GeneralCard". Based on the "GeneralCard" i have created a sibling ViewController called "BlueCard" like that: @interface BlueCardViewControl... | [
"ios",
"uiviewcontroller"
] | 0 | 2 | 4,590 | 1 | 0 | 2011-06-03T16:24:37.490000 | 2011-06-03T16:29:09.040000 |
6,229,890 | 6,229,955 | Understanding Python Class Initialization | Suppose I have two classes: class A(): pass
class B(): pass I have another class class C(object): def __init__(self, cond): if cond ==True: # class C initialize with class A else: # class C initialize with class B If I inherit from A or B, by this implementation is it possible? | If you want to set the class use the __class__ variable. class C(object): def __init__(self, cond): if cond ==True: self.__class__ = A else: self.__class__ = B self.__class__.__init__(self) | Understanding Python Class Initialization Suppose I have two classes: class A(): pass
class B(): pass I have another class class C(object): def __init__(self, cond): if cond ==True: # class C initialize with class A else: # class C initialize with class B If I inherit from A or B, by this implementation is it possible... | TITLE:
Understanding Python Class Initialization
QUESTION:
Suppose I have two classes: class A(): pass
class B(): pass I have another class class C(object): def __init__(self, cond): if cond ==True: # class C initialize with class A else: # class C initialize with class B If I inherit from A or B, by this implementat... | [
"python",
"superclass"
] | 1 | 4 | 389 | 4 | 0 | 2011-06-03T16:26:10.993000 | 2011-06-03T16:32:03.007000 |
6,229,901 | 6,229,981 | Javascript removeAttribute working in IE but not Chrome | This is the code I'm using. Basically I'm trying to make an element visible only after everything else on the page has loaded. It works fine in IE, but not in Chrome. I don't work with Js much...but if I remember correctly, is there something finnicky about the getElementById function that I need to do? | Test page: http://www.quirksmode.org/dom/tests/cssMisc.html#removeProperty | Javascript removeAttribute working in IE but not Chrome This is the code I'm using. Basically I'm trying to make an element visible only after everything else on the page has loaded. It works fine in IE, but not in Chrome. I don't work with Js much...but if I remember correctly, is there something finnicky about the ge... | TITLE:
Javascript removeAttribute working in IE but not Chrome
QUESTION:
This is the code I'm using. Basically I'm trying to make an element visible only after everything else on the page has loaded. It works fine in IE, but not in Chrome. I don't work with Js much...but if I remember correctly, is there something fin... | [
"javascript",
"google-chrome",
"getelementbyid"
] | 1 | 3 | 3,258 | 3 | 0 | 2011-06-03T16:26:57.190000 | 2011-06-03T16:33:18.383000 |
6,229,903 | 6,229,939 | HttpServlet: doPut is not called | I have a Tomcat application server and this Java source code: public class MyServlet extends HttpServlet { public MyServlet() {}
protected void doPut(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { //... PUT code }
protected void doGet(HttpServletRequest req, HttpServletRespons... | Use wireshark to trace the packets to make sure you actually get a PUT request. Or similarly setup a separate access log for tomcat (it is already in the default config file, but commented out I believe) to see what is coming in. If you open in your favorit texteditor the file conf/server.xml in the tomcat directory th... | HttpServlet: doPut is not called I have a Tomcat application server and this Java source code: public class MyServlet extends HttpServlet { public MyServlet() {}
protected void doPut(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { //... PUT code }
protected void doGet(HttpServl... | TITLE:
HttpServlet: doPut is not called
QUESTION:
I have a Tomcat application server and this Java source code: public class MyServlet extends HttpServlet { public MyServlet() {}
protected void doPut(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { //... PUT code }
protected vo... | [
"java",
"iphone",
"http",
"servlets",
"put"
] | 1 | 3 | 893 | 2 | 0 | 2011-06-03T16:27:09.120000 | 2011-06-03T16:30:30.560000 |
6,229,904 | 6,230,147 | linux -- concurrently reading/writing from/to a file | Linux is strange for me, I am thinking how to code my program to safely operate linux files. what aspects should I regard if my program operate(open, read or write) to a file(normal file or dev file and so on) that is being operated by other process. can you give me some ideas, or suggest me any helpful articles/links? | one simple rule: If every one is reading, let them read, but if some one is writing as well in between, always use locks. Check flock for details and example. For unix, even if file is locked file open would not fail. A try for advisory lock needs to be done. Something like this would do it: err = lockf(fd, F_TLOCK, 0)... | linux -- concurrently reading/writing from/to a file Linux is strange for me, I am thinking how to code my program to safely operate linux files. what aspects should I regard if my program operate(open, read or write) to a file(normal file or dev file and so on) that is being operated by other process. can you give me ... | TITLE:
linux -- concurrently reading/writing from/to a file
QUESTION:
Linux is strange for me, I am thinking how to code my program to safely operate linux files. what aspects should I regard if my program operate(open, read or write) to a file(normal file or dev file and so on) that is being operated by other process... | [
"linux",
"file-io"
] | 2 | 1 | 2,556 | 1 | 0 | 2011-06-03T16:27:09.997000 | 2011-06-03T16:50:16.703000 |
6,229,906 | 6,229,944 | Regular expression to match integers up to 9 digits | I want to create a regular expression where only numbers are allowed with max length 9 and no minimum length. I came up with \d{9}[0-9] but it isn't working. | You're close. Try this: ^\d{0,9}$ The ^ and $ match the beginning and the end of the text, respectively. \d{0,9} matches anywhere in the string, so d0000 would pass because it would match the 0000 even though there is a d in it, which I don't think you want. That's why they ^$ should be in there. | Regular expression to match integers up to 9 digits I want to create a regular expression where only numbers are allowed with max length 9 and no minimum length. I came up with \d{9}[0-9] but it isn't working. | TITLE:
Regular expression to match integers up to 9 digits
QUESTION:
I want to create a regular expression where only numbers are allowed with max length 9 and no minimum length. I came up with \d{9}[0-9] but it isn't working.
ANSWER:
You're close. Try this: ^\d{0,9}$ The ^ and $ match the beginning and the end of th... | [
"javascript",
"regex"
] | 13 | 30 | 35,065 | 4 | 0 | 2011-06-03T16:27:22.373000 | 2011-06-03T16:31:08.913000 |
6,229,908 | 6,229,969 | Using MSHTML in VB.Net to parse HTML | Was wondering if someone could give me some direction on this. I've spent a decent amount of time on it and don't seem to be getting anywhere: I have a hidden field that I'm trying to parse out of an HTML document in VB.Net. I'm using a System.Windows.Controls.WebBrowser control in a WPF application and handling the Lo... | You need to look for the rendered tag, not the serverside value. This will be rendered as an, so you need to use allElements.tags("input"), then find the specific hidden one. The id attribute may not end up as hidField - it depends on what container controls it is in and in what nesting level. I suggest using the HTML ... | Using MSHTML in VB.Net to parse HTML Was wondering if someone could give me some direction on this. I've spent a decent amount of time on it and don't seem to be getting anywhere: I have a hidden field that I'm trying to parse out of an HTML document in VB.Net. I'm using a System.Windows.Controls.WebBrowser control in ... | TITLE:
Using MSHTML in VB.Net to parse HTML
QUESTION:
Was wondering if someone could give me some direction on this. I've spent a decent amount of time on it and don't seem to be getting anywhere: I have a hidden field that I'm trying to parse out of an HTML document in VB.Net. I'm using a System.Windows.Controls.WebB... | [
"wpf",
"vb.net",
"mshtml"
] | 1 | 1 | 10,472 | 2 | 0 | 2011-06-03T16:27:32.397000 | 2011-06-03T16:32:33.733000 |
6,229,910 | 6,230,015 | Reading lines from text file in python (windows) | I am working on a simple import routine that translates a text file to a json file format for our system in python. import json
# Open text file for reading txtFile = open('Boating.Make.txt', 'r')
# Create picklist obj picklistObj = dict() picklistObj['name'] = 'Boating.Make' picklistObj['items'] = list()
i = 0 # It... | Python keeps the new line characters while enumerating lines. For example, when enumerating a text file such as foo bar you get two strings: "foo\n" and "bar\n". If you don't want the terminal new line characters, you call strip(). I am not a fan of this behavior by the way. | Reading lines from text file in python (windows) I am working on a simple import routine that translates a text file to a json file format for our system in python. import json
# Open text file for reading txtFile = open('Boating.Make.txt', 'r')
# Create picklist obj picklistObj = dict() picklistObj['name'] = 'Boatin... | TITLE:
Reading lines from text file in python (windows)
QUESTION:
I am working on a simple import routine that translates a text file to a json file format for our system in python. import json
# Open text file for reading txtFile = open('Boating.Make.txt', 'r')
# Create picklist obj picklistObj = dict() picklistObj... | [
"python",
"windows",
"json",
"io"
] | 4 | 3 | 15,395 | 4 | 0 | 2011-06-03T16:27:52.477000 | 2011-06-03T16:35:55.310000 |
6,229,913 | 6,230,061 | Interior Content Background wont display in IE | I am struggling to get my interior background image to display in IE, works fine in FF and chrome. Cant figure it out. #repeating-content-landing { float: left; margin: 0px 0px 0px 40px; background: #959398 url(../site-images/landing-page/final-landing-page-design.jpg); width: 820px; }
#interior-content { padding: 32p... | I believe the CSS does not parse correctly unless the property values are spaced out properly. You have no space between your url and repeat: From: background: #999999 url(../site-images/interior-content.gif)repeat-y; To: background: #999999 url(../site-images/interior-content.gif) repeat-y; | Interior Content Background wont display in IE I am struggling to get my interior background image to display in IE, works fine in FF and chrome. Cant figure it out. #repeating-content-landing { float: left; margin: 0px 0px 0px 40px; background: #959398 url(../site-images/landing-page/final-landing-page-design.jpg); wi... | TITLE:
Interior Content Background wont display in IE
QUESTION:
I am struggling to get my interior background image to display in IE, works fine in FF and chrome. Cant figure it out. #repeating-content-landing { float: left; margin: 0px 0px 0px 40px; background: #959398 url(../site-images/landing-page/final-landing-pa... | [
"html",
"css",
"background",
"background-image"
] | 1 | 0 | 198 | 2 | 0 | 2011-06-03T16:27:58.113000 | 2011-06-03T16:39:59.147000 |
6,229,914 | 6,229,986 | choosing primary key datatype numeric (18,0) | I inherited a SQL Server database where many tables have a primary key of type numeric(18,0). What reasons (historical perhaps?) would someone choose this datatype for a primary key? | I would guess that the SQL Server database was originally designed in a version prior to SQL Server 2000, and this was the only way they could get an 'integer' bigger than the standard int. Since then, a bigint would have been more appropriate. | choosing primary key datatype numeric (18,0) I inherited a SQL Server database where many tables have a primary key of type numeric(18,0). What reasons (historical perhaps?) would someone choose this datatype for a primary key? | TITLE:
choosing primary key datatype numeric (18,0)
QUESTION:
I inherited a SQL Server database where many tables have a primary key of type numeric(18,0). What reasons (historical perhaps?) would someone choose this datatype for a primary key?
ANSWER:
I would guess that the SQL Server database was originally designe... | [
"sql-server",
"primary-key",
"relational-database"
] | 6 | 6 | 2,053 | 4 | 0 | 2011-06-03T16:28:04 | 2011-06-03T16:33:44.107000 |
6,229,932 | 6,234,949 | Can I use Scrapy functions inside Django classes | I have build a website in Django. I need to use the web crawling features. So I installed Scrapy. Scrapy is working, as stated in their tutorial, by using scrapy startproject dmoz But that works on a diff folder with its own files. Is it possible to use Scrapy functions in Django classes and put data in Django variable... | Crawling is a long, time consuming task. It doesn't mix well with short HTTP requests. Therefore, you should use a user interface (presumably written in Django) to fire off Scrapy crawls, and a shared storage to monitor the state of the crawl. But you wouldn't want to crawl during the lifetime of a HTTP requests. That'... | Can I use Scrapy functions inside Django classes I have build a website in Django. I need to use the web crawling features. So I installed Scrapy. Scrapy is working, as stated in their tutorial, by using scrapy startproject dmoz But that works on a diff folder with its own files. Is it possible to use Scrapy functions ... | TITLE:
Can I use Scrapy functions inside Django classes
QUESTION:
I have build a website in Django. I need to use the web crawling features. So I installed Scrapy. Scrapy is working, as stated in their tutorial, by using scrapy startproject dmoz But that works on a diff folder with its own files. Is it possible to use... | [
"python",
"scrapy"
] | 1 | 1 | 509 | 1 | 0 | 2011-06-03T16:29:42.383000 | 2011-06-04T05:30:21.703000 |
6,229,933 | 6,229,985 | How can I use nested templates with Smarty? | I tried some ways, but they either threw a SmartyException or the nested templates didn't have access to the variables I assigned in my PHP file. | Just use the {include} directive. http://www.smarty.net/docsv2/en/language.function.include.tpl | How can I use nested templates with Smarty? I tried some ways, but they either threw a SmartyException or the nested templates didn't have access to the variables I assigned in my PHP file. | TITLE:
How can I use nested templates with Smarty?
QUESTION:
I tried some ways, but they either threw a SmartyException or the nested templates didn't have access to the variables I assigned in my PHP file.
ANSWER:
Just use the {include} directive. http://www.smarty.net/docsv2/en/language.function.include.tpl | [
"php",
"templates",
"nested",
"smarty"
] | 1 | 4 | 3,015 | 3 | 0 | 2011-06-03T16:29:46.077000 | 2011-06-03T16:33:43.797000 |
6,229,943 | 6,230,043 | My class method is not called, and I think it's related to my directory structure | After I restructured some files, I'm getting an error. When I call @batch << Formatter.get(@fields) it returns @fields. When I try to use debugger to go into the Formatter.get method, I see that it is skipped. I have a directory structure like: lib/ klass/ formatter.rb formatter/ formatter.rb foo_formatter.rb bar_forma... | You will need to change the namespace of lib/klass/formatter/formatter.rb so that it reads module Klass::Formatter class Formatter
attr_accessor:fields
def self.get fields case fields[:field_id] when "foo"; FooFormatter.new fields when "bar"; BarFormatter.new fields end end | My class method is not called, and I think it's related to my directory structure After I restructured some files, I'm getting an error. When I call @batch << Formatter.get(@fields) it returns @fields. When I try to use debugger to go into the Formatter.get method, I see that it is skipped. I have a directory structure... | TITLE:
My class method is not called, and I think it's related to my directory structure
QUESTION:
After I restructured some files, I'm getting an error. When I call @batch << Formatter.get(@fields) it returns @fields. When I try to use debugger to go into the Formatter.get method, I see that it is skipped. I have a d... | [
"ruby-on-rails",
"ruby"
] | 0 | 1 | 62 | 1 | 0 | 2011-06-03T16:30:59.600000 | 2011-06-03T16:38:23.720000 |
6,229,959 | 6,231,834 | Android: how to play 2 media files simultaneously in sync | I'm trying to play 2 audio files (in this case mp3) simultaneously, so that they start at EXACTLY the same time and play in sync with each other. My first try was to just use two MediaPlayers, prepare them ahead of time, then call start on each one back to back: mediaPlayer.start(); secondPlayer.start(); Unfortunately,... | try SoundPool,its a better method of dealing with multiple audio files at the same time. Heres the documentation: http://developer.android.com/reference/android/media/SoundPool.html Hope this helps | Android: how to play 2 media files simultaneously in sync I'm trying to play 2 audio files (in this case mp3) simultaneously, so that they start at EXACTLY the same time and play in sync with each other. My first try was to just use two MediaPlayers, prepare them ahead of time, then call start on each one back to back:... | TITLE:
Android: how to play 2 media files simultaneously in sync
QUESTION:
I'm trying to play 2 audio files (in this case mp3) simultaneously, so that they start at EXACTLY the same time and play in sync with each other. My first try was to just use two MediaPlayers, prepare them ahead of time, then call start on each... | [
"android",
"audio"
] | 3 | 2 | 4,154 | 1 | 0 | 2011-06-03T16:32:14.820000 | 2011-06-03T19:37:30.103000 |
6,229,973 | 6,229,988 | Referencing CSS within CSS | Is there a way to define a CSS class as being equal to another? For example if I had a class:.myClass{ background-color: blue; } is there a way to define a second class as having the same style as myClass without just copying and pasting? EDIT: Sorry, let me be a bit more clear. Is it possible to do this after declarin... | Yes, like this:.myClass,.mySecondClass,.myThirdClass { background-color: blue; } EDIT: Based on your edit: What you might be looking for, if this is something you really want to do is to look into SASS which basically is like css but with variables and stuffs. But vanilla CSS doesn't have any native support for what yo... | Referencing CSS within CSS Is there a way to define a CSS class as being equal to another? For example if I had a class:.myClass{ background-color: blue; } is there a way to define a second class as having the same style as myClass without just copying and pasting? EDIT: Sorry, let me be a bit more clear. Is it possibl... | TITLE:
Referencing CSS within CSS
QUESTION:
Is there a way to define a CSS class as being equal to another? For example if I had a class:.myClass{ background-color: blue; } is there a way to define a second class as having the same style as myClass without just copying and pasting? EDIT: Sorry, let me be a bit more cl... | [
"css"
] | 2 | 6 | 798 | 4 | 0 | 2011-06-03T16:32:46.730000 | 2011-06-03T16:33:57.697000 |
6,229,976 | 6,230,810 | Make Unity resolve implementations considering contravariance | I want to use unity for a polymorphic event aggregation/handling where handlers are registered through the container. Handlers declares a generic parameter with the "in" modifier, since it's only used as an input parameter. So the parameter is contravariant. Considering the following sample. interface IHandler { void H... | Could you do: container.RegisterType(typeof(IHandle<>), typeof(MsgAHandler<>)) But you would probably need to change some of your code for that to work properly. Like: public interface IHandler where THandler: class, IMsg { void Handle(THandler message); } | Make Unity resolve implementations considering contravariance I want to use unity for a polymorphic event aggregation/handling where handlers are registered through the container. Handlers declares a generic parameter with the "in" modifier, since it's only used as an input parameter. So the parameter is contravariant.... | TITLE:
Make Unity resolve implementations considering contravariance
QUESTION:
I want to use unity for a polymorphic event aggregation/handling where handlers are registered through the container. Handlers declares a generic parameter with the "in" modifier, since it's only used as an input parameter. So the parameter... | [
"c#",
"polymorphism",
"unity-container",
"contravariance"
] | 3 | 1 | 781 | 1 | 0 | 2011-06-03T16:32:50.670000 | 2011-06-03T17:54:48.093000 |
6,229,989 | 6,230,071 | Sync Folders to S3 - C# Library | Is there a.NET library that I can use to sync a folder to S3? I am not interested in full apps or command line tools, just the API. I need to use it from my own app directly. If there isn't, has anyone written their own, and if so, can you share some of the key considerations when writing one? Anything specific I need ... | You can periodically simply loop through file list and use these libraries to call API http://weblogs.asp.net/israelio/archive/2004/06/23/162913.aspx OR Try http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx? You can simply watch OnDeleted, OnCreated and OnChanged events. And call S3 API according... | Sync Folders to S3 - C# Library Is there a.NET library that I can use to sync a folder to S3? I am not interested in full apps or command line tools, just the API. I need to use it from my own app directly. If there isn't, has anyone written their own, and if so, can you share some of the key considerations when writin... | TITLE:
Sync Folders to S3 - C# Library
QUESTION:
Is there a.NET library that I can use to sync a folder to S3? I am not interested in full apps or command line tools, just the API. I need to use it from my own app directly. If there isn't, has anyone written their own, and if so, can you share some of the key consider... | [
".net",
"amazon-s3"
] | 5 | 2 | 2,252 | 1 | 0 | 2011-06-03T16:33:58.157000 | 2011-06-03T16:40:37.930000 |
6,229,995 | 6,230,104 | Using INSERT INTO SELECT when table structures do not match in MySQL | I'm familiar with the following use of the command: INSERT INTO mytable SELECT * FROM other_table This works fine when the tables are identical in terms of layout. What I'd like to do is something like: INSERT INTO mytable SELECT * FROM other_table ON DUPLICATE KEY UPDATE This fails with a syntax error: MySQL Error: 10... | Your statement is incomplete: INSERT INTO mytable SELECT * FROM other_table ON DUPLICATE KEY UPDATE The syntax requires that you need to finish the UPDATE part by listing which columns to update with which values. UPDATE: This ought to work for your particular example: INSERT INTO mytable2 (id, name, `key`) SELECT id, ... | Using INSERT INTO SELECT when table structures do not match in MySQL I'm familiar with the following use of the command: INSERT INTO mytable SELECT * FROM other_table This works fine when the tables are identical in terms of layout. What I'd like to do is something like: INSERT INTO mytable SELECT * FROM other_table ON... | TITLE:
Using INSERT INTO SELECT when table structures do not match in MySQL
QUESTION:
I'm familiar with the following use of the command: INSERT INTO mytable SELECT * FROM other_table This works fine when the tables are identical in terms of layout. What I'd like to do is something like: INSERT INTO mytable SELECT * F... | [
"mysql",
"sql",
"insert",
"mysql-error-1064"
] | 5 | 11 | 8,428 | 1 | 0 | 2011-06-03T16:34:08.943000 | 2011-06-03T16:44:28.533000 |
6,230,010 | 6,230,050 | JavaScript RegExp Replace | Not sure where I am doing wrong. I have a string such as Test (123x) and I am trying to find the (123x) and replace it with nothing: Here is my code I have tested the regex pattern and it matches correctly, however, when I log to the console, it's not replacing (1x) with "" | You should use the RegExp literals when possible: var original = "Test (1x)"; var newString = original.replace(/\(\d{1,6}[x]{1}\)/,""); Your attempt fails as "\(\d{1,6}[x]{1}\)" is interpreted as "(d{1,6}[x]{1})" ( \ are simply stripped for unknown escape sequences). You would need to escape the \ as well: new RegExp(... | JavaScript RegExp Replace Not sure where I am doing wrong. I have a string such as Test (123x) and I am trying to find the (123x) and replace it with nothing: Here is my code I have tested the regex pattern and it matches correctly, however, when I log to the console, it's not replacing (1x) with "" | TITLE:
JavaScript RegExp Replace
QUESTION:
Not sure where I am doing wrong. I have a string such as Test (123x) and I am trying to find the (123x) and replace it with nothing: Here is my code I have tested the regex pattern and it matches correctly, however, when I log to the console, it's not replacing (1x) with ""
... | [
"javascript",
"regex",
"replace"
] | 2 | 9 | 4,155 | 2 | 0 | 2011-06-03T16:35:46.557000 | 2011-06-03T16:38:57.507000 |
6,230,019 | 6,230,360 | Silverlight ComboBox with two fields per item | I want to display a myItem.title and myItem.url per each item in the comboBox.ItemsSource observable collection that gets shown in the comboBox. In other words, I'd like to see each row in the combo box hold and display both pieces of information. Not sure how to do this or if it's possible. How would I go about writin... | With the XAML you provided you would need something like this: itemSource.Add(new ItemClass(title,url)); Define the ItemClass as something like this: public class ItemClass { public string FieldOne {get;set;} public string FieldTwo {get;set;} } | Silverlight ComboBox with two fields per item I want to display a myItem.title and myItem.url per each item in the comboBox.ItemsSource observable collection that gets shown in the comboBox. In other words, I'd like to see each row in the combo box hold and display both pieces of information. Not sure how to do this or... | TITLE:
Silverlight ComboBox with two fields per item
QUESTION:
I want to display a myItem.title and myItem.url per each item in the comboBox.ItemsSource observable collection that gets shown in the comboBox. In other words, I'd like to see each row in the combo box hold and display both pieces of information. Not sure... | [
"combobox",
"silverlight-3.0"
] | 0 | 2 | 826 | 1 | 0 | 2011-06-03T16:36:22.773000 | 2011-06-03T17:11:51.260000 |
6,230,026 | 6,230,907 | How to avoid the creation of poor designs with TDD | I have recently (in the last week) embarked on an experiment wherein I attempt to code a new feature in a project I'm working on using TDD principles. In the past, our approach has been a moderately-agile approach, but with no great rigour. Unit testing happens here and there when it's convenient. The main barrier to c... | Just as a blanket response to the problems you're having, it sounds like you haven't been using TDD very long, you may not be using any tools that may help with the TDD process, and you're putting more value on the line of production code than the line of testing code. More specifically to each point: 1: TDD encourages... | How to avoid the creation of poor designs with TDD I have recently (in the last week) embarked on an experiment wherein I attempt to code a new feature in a project I'm working on using TDD principles. In the past, our approach has been a moderately-agile approach, but with no great rigour. Unit testing happens here an... | TITLE:
How to avoid the creation of poor designs with TDD
QUESTION:
I have recently (in the last week) embarked on an experiment wherein I attempt to code a new feature in a project I'm working on using TDD principles. In the past, our approach has been a moderately-agile approach, but with no great rigour. Unit testi... | [
"tdd",
"mocking"
] | 17 | 9 | 1,722 | 7 | 0 | 2011-06-03T16:36:47.337000 | 2011-06-03T18:04:19.597000 |
6,230,029 | 6,230,298 | Multithread file search C# | I need some help. Right now i have done a file search that will search my entire hard drive and it works. Here are the two methods that does it. public void SearchFileRecursiveNonMultithreaded() { //Search files multiple drive
string[] drives = Environment.GetLogicalDrives();
foreach (string drive in drives) { if (Ge... | First, as somebody else pointed out, it's unlikely that using multiple threads will speed things up when you're searching just one drive. The vast majority of your time is spent waiting for the disk head to move to where it needs to be, and it can only be in one place at a time. Using multiple threads here is wasted ef... | Multithread file search C# I need some help. Right now i have done a file search that will search my entire hard drive and it works. Here are the two methods that does it. public void SearchFileRecursiveNonMultithreaded() { //Search files multiple drive
string[] drives = Environment.GetLogicalDrives();
foreach (strin... | TITLE:
Multithread file search C#
QUESTION:
I need some help. Right now i have done a file search that will search my entire hard drive and it works. Here are the two methods that does it. public void SearchFileRecursiveNonMultithreaded() { //Search files multiple drive
string[] drives = Environment.GetLogicalDrives(... | [
"c#",
"multithreading"
] | 2 | 5 | 6,847 | 4 | 0 | 2011-06-03T16:37:01.820000 | 2011-06-03T17:05:18.863000 |
6,230,031 | 6,241,614 | rvm install 1.8.7-head errors on centos 5.5 | I installed rvm successfully as a root on CentOS 5.5. Then I tried to to install ruby-1.8.7-head rvm install 1.8.7-head And receive such error Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.8.7-head, this may take a while depending on your cpu(s)... ruby-1.8.7-head - #fetching Cloning from [github url], t... | TO FIX THIS ISSUE (Optional) backup certificates cp /etc/pki/tls/certs/ca-bundle.crt /root/backup/ Get new cert curl http://curl.haxx.se/ca/cacert.pem -o /etc/pki/tls/certs/ca-bundle.crt After that I got stuck with next error rvm install 1.8.7-head Here it is Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1... | rvm install 1.8.7-head errors on centos 5.5 I installed rvm successfully as a root on CentOS 5.5. Then I tried to to install ruby-1.8.7-head rvm install 1.8.7-head And receive such error Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.8.7-head, this may take a while depending on your cpu(s)... ruby-1.8.7-h... | TITLE:
rvm install 1.8.7-head errors on centos 5.5
QUESTION:
I installed rvm successfully as a root on CentOS 5.5. Then I tried to to install ruby-1.8.7-head rvm install 1.8.7-head And receive such error Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.8.7-head, this may take a while depending on your cpu(... | [
"ruby",
"installation",
"centos",
"rvm"
] | 3 | 4 | 3,262 | 3 | 0 | 2011-06-03T16:37:37.063000 | 2011-06-05T07:46:44.477000 |
6,230,034 | 6,230,062 | Javascript object variable name as number | Below, i shows up as "i", not the number I am iterating through. How do I correct this? Thanks! for (i = 0; i < 10000; i++) { var postParams = { i: 'avalueofsorts' }; } | for (var i = 0, l = 10000; i < l; ++i) { var postParams = {}; postParams[i] = 'avalueofsorts' } Per Cybernate's comment, you can create the object beforehand and just populate it otherwise you create it each time. You probably want this: for (var i = 0, l = 10000, postParams = {}; i < l; ++i) { postParams[i] = 'avalueo... | Javascript object variable name as number Below, i shows up as "i", not the number I am iterating through. How do I correct this? Thanks! for (i = 0; i < 10000; i++) { var postParams = { i: 'avalueofsorts' }; } | TITLE:
Javascript object variable name as number
QUESTION:
Below, i shows up as "i", not the number I am iterating through. How do I correct this? Thanks! for (i = 0; i < 10000; i++) { var postParams = { i: 'avalueofsorts' }; }
ANSWER:
for (var i = 0, l = 10000; i < l; ++i) { var postParams = {}; postParams[i] = 'ava... | [
"javascript",
"node.js"
] | 3 | 7 | 482 | 2 | 0 | 2011-06-03T16:37:56.877000 | 2011-06-03T16:40:02.967000 |
6,230,035 | 6,231,328 | Get the Node value for the first Node | I have the following XML: A>B and just want to get the node value of start tag as A>B, if we use getNodeValue it will convert it to A>B which is not needed. Hence I decided to use the Transformer Document doc = getParsedDoc(abovexml); TransformerFactory tranFact = TransformerFactory.newInstance(); Transformer transfor ... | Since getNodeValue() is automatically decoding the the String. You can use StringEscapeUtils from Apache Commons Lang to encode it again. http://commons.apache.org/lang/api-2.6/org/apache/commons/lang/StringEscapeUtils.html http://commons.apache.org/lang/ String nodeValue = StringEscapeUtils.escapeHtml(getNodeValue());... | Get the Node value for the first Node I have the following XML: A>B and just want to get the node value of start tag as A>B, if we use getNodeValue it will convert it to A>B which is not needed. Hence I decided to use the Transformer Document doc = getParsedDoc(abovexml); TransformerFactory tranFact = TransformerFactor... | TITLE:
Get the Node value for the first Node
QUESTION:
I have the following XML: A>B and just want to get the node value of start tag as A>B, if we use getNodeValue it will convert it to A>B which is not needed. Hence I decided to use the Transformer Document doc = getParsedDoc(abovexml); TransformerFactory tranFact =... | [
"java",
"xml"
] | 1 | 0 | 315 | 2 | 0 | 2011-06-03T16:38:04.427000 | 2011-06-03T18:46:00.067000 |
6,230,044 | 6,230,295 | Dynamically re-sizable bar charts with JavaScript or jQuery | Does anyone have any recommendations for a JavaScript charting library that allows a user to update bar charts dynamically? What i mean by this is that a user enters data, generates the bar chart and then is able to resize the bar plots themselves whilst dynamically updating the value of the plot. | highcharts.com do a great charting library you should be able to use. | Dynamically re-sizable bar charts with JavaScript or jQuery Does anyone have any recommendations for a JavaScript charting library that allows a user to update bar charts dynamically? What i mean by this is that a user enters data, generates the bar chart and then is able to resize the bar plots themselves whilst dynam... | TITLE:
Dynamically re-sizable bar charts with JavaScript or jQuery
QUESTION:
Does anyone have any recommendations for a JavaScript charting library that allows a user to update bar charts dynamically? What i mean by this is that a user enters data, generates the bar chart and then is able to resize the bar plots thems... | [
"javascript",
"jquery",
"resize",
"charts"
] | 0 | 1 | 1,022 | 1 | 0 | 2011-06-03T16:38:31.420000 | 2011-06-03T17:04:55.690000 |
6,230,046 | 6,230,208 | Build tables for ion auth and codeigniter | I have Codeigniter and Ion Auth installed on MAMP. I have the libraries working but I'm not sure how to build the required database tables for Ion Auth. Is there a preferred / best-practices way of doing this? Should I copy a query code from somewhere? Run a setup-db script? For that matter, with Codeigniter installed,... | Oh - I figured this one out. Just import the.sql file provided by Ion Auth - in my case I used PHPmyAdmin to import ion_auth.sql. This built the meta table, et al | Build tables for ion auth and codeigniter I have Codeigniter and Ion Auth installed on MAMP. I have the libraries working but I'm not sure how to build the required database tables for Ion Auth. Is there a preferred / best-practices way of doing this? Should I copy a query code from somewhere? Run a setup-db script? Fo... | TITLE:
Build tables for ion auth and codeigniter
QUESTION:
I have Codeigniter and Ion Auth installed on MAMP. I have the libraries working but I'm not sure how to build the required database tables for Ion Auth. Is there a preferred / best-practices way of doing this? Should I copy a query code from somewhere? Run a s... | [
"database",
"codeigniter",
"authentication"
] | 6 | 6 | 2,123 | 1 | 0 | 2011-06-03T16:38:46.207000 | 2011-06-03T16:57:29.557000 |
6,230,048 | 6,230,136 | C++ Linking with Methods Defined in the Class Definition | For curiosity's sake, if you put the method definition inside the class definition in the header, and the compiler doesn't inline it, then what object file or files is that method put into for accessing during the linker phase? Is it put in every.obj file that includes the header, and then extra copies are thrown away ... | If the compiler rejects inlining some member function that is defined in-line in the body of the class or is defined as an inline function outside the body of the class, the compiler will insert a compiled version of the function in every.obj file that uses that function. Note that this is different from inserting a co... | C++ Linking with Methods Defined in the Class Definition For curiosity's sake, if you put the method definition inside the class definition in the header, and the compiler doesn't inline it, then what object file or files is that method put into for accessing during the linker phase? Is it put in every.obj file that in... | TITLE:
C++ Linking with Methods Defined in the Class Definition
QUESTION:
For curiosity's sake, if you put the method definition inside the class definition in the header, and the compiler doesn't inline it, then what object file or files is that method put into for accessing during the linker phase? Is it put in ever... | [
"c++",
"class",
"methods",
"linker"
] | 4 | 1 | 126 | 3 | 0 | 2011-06-03T16:38:55.700000 | 2011-06-03T16:48:48.467000 |
6,230,055 | 6,230,110 | Want to choose between Qt and Java: a newb question | I want to learn a new programming language. I have in mind stuff like file alteration monitoring embedded databases such as SQLite widgets that support drag and drop rich text with widgets inline with the words for my pet project. I heard lots of opinions of both of them. They seem to agree that Java is tougher to use ... | If you want an easier learning curve, go for Java. It matches all your requirements, offers good portability (Qt does too, to be fair), and its GUI layer (Swing) has the required niceties. Note that Qt is a set of libraries, not a language. Its underlying language is C++, plus a few tricks that lets it use a 'signal/sl... | Want to choose between Qt and Java: a newb question I want to learn a new programming language. I have in mind stuff like file alteration monitoring embedded databases such as SQLite widgets that support drag and drop rich text with widgets inline with the words for my pet project. I heard lots of opinions of both of t... | TITLE:
Want to choose between Qt and Java: a newb question
QUESTION:
I want to learn a new programming language. I have in mind stuff like file alteration monitoring embedded databases such as SQLite widgets that support drag and drop rich text with widgets inline with the words for my pet project. I heard lots of opi... | [
"java",
"qt"
] | 0 | 2 | 463 | 3 | 0 | 2011-06-03T16:39:25.160000 | 2011-06-03T16:44:56.483000 |
6,230,056 | 6,230,449 | protobuf: read a message in C++ from C# | I am going to read messages that are stored consecutively in socket in C++ client that are sent from a C# server. I expect that I can read the size of a message like that: google::protobuf::uint32 m; coded_input->ReadVarint32(&m); cout << m << endl; Then I want to read the message: Person person; CodedInputStream::Limi... | Your first example includes just a length; the "with length prefix" actually encodes in a protobuf-compatible stream. If you are decoding from c++, read two varints; the first is the field-number and wire-type; the second is the length. The first is packed as 3 bits wire-type, the rest is the field-number. You might al... | protobuf: read a message in C++ from C# I am going to read messages that are stored consecutively in socket in C++ client that are sent from a C# server. I expect that I can read the size of a message like that: google::protobuf::uint32 m; coded_input->ReadVarint32(&m); cout << m << endl; Then I want to read the messag... | TITLE:
protobuf: read a message in C++ from C#
QUESTION:
I am going to read messages that are stored consecutively in socket in C++ client that are sent from a C# server. I expect that I can read the size of a message like that: google::protobuf::uint32 m; coded_input->ReadVarint32(&m); cout << m << endl; Then I want ... | [
"c#",
"protocol-buffers",
"protobuf-net"
] | 8 | 3 | 5,941 | 1 | 0 | 2011-06-03T16:39:29.080000 | 2011-06-03T17:19:17.327000 |
6,230,070 | 6,231,440 | Check if Cheetah Template Dict has key | I am trying to come up with a base template for an application and one of the goals would be to remove any unnecessary js/css from pages so I want to do something in the cheetah template like #if $dict.has_key('datepicker'): #end if I think this would also help with errors like namemap does not have key 'datepicker' my... | The bug is this: dict.has_key('datepicker') "dict" is a class, so it expects the first argument of "dict.has_key" to be an instance of "dict". You're passing a string instead of the dict object. Basically, "d.has_key(k)" is equivalent to "dict.has_key(d, k)", and you have the latter. | Check if Cheetah Template Dict has key I am trying to come up with a base template for an application and one of the goals would be to remove any unnecessary js/css from pages so I want to do something in the cheetah template like #if $dict.has_key('datepicker'): #end if I think this would also help with errors like na... | TITLE:
Check if Cheetah Template Dict has key
QUESTION:
I am trying to come up with a base template for an application and one of the goals would be to remove any unnecessary js/css from pages so I want to do something in the cheetah template like #if $dict.has_key('datepicker'): #end if I think this would also help w... | [
"python",
"templates",
"cheetah"
] | 1 | 1 | 1,412 | 1 | 0 | 2011-06-03T16:40:29.177000 | 2011-06-03T18:56:43.877000 |
6,230,082 | 6,230,133 | Cocoa/Finder: weird path | im asking the finder for the current finder window location/path/whatever with NSString *path = [[finder insertionLocation] get]; which results in a path like that: 2011-06-03 18:38:55.132 CutIt[1980:903] is there a common way to convert that into a usable path, like /users/eike, or do i have to patch something togethe... | A little bit nested, but you can divide it as you like: NSString *path = [[NSURL URLWithString:[[[finder insertionLocation] get] URL]] path]; | Cocoa/Finder: weird path im asking the finder for the current finder window location/path/whatever with NSString *path = [[finder insertionLocation] get]; which results in a path like that: 2011-06-03 18:38:55.132 CutIt[1980:903] is there a common way to convert that into a usable path, like /users/eike, or do i have t... | TITLE:
Cocoa/Finder: weird path
QUESTION:
im asking the finder for the current finder window location/path/whatever with NSString *path = [[finder insertionLocation] get]; which results in a path like that: 2011-06-03 18:38:55.132 CutIt[1980:903] is there a common way to convert that into a usable path, like /users/ei... | [
"objective-c",
"cocoa",
"path",
"finder",
"scripting-bridge"
] | 0 | 3 | 259 | 2 | 0 | 2011-06-03T16:42:04.683000 | 2011-06-03T16:48:37.393000 |
6,230,085 | 6,230,148 | Determine which object posted a notification? | I'm having trouble identifying how to tell which object posted a notification. I subscribe to a notification in object A: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receivedNotification:) name=@"ReceivedData" object:nil] I post a notification from object B: [[NSNotificationCenter defaultC... | The NSNotification class has a method called object that returns the object associated with the notification. This is often the object that posted this notification. - (void) receivedNotification: (NSNotification*) notification {... id myObject = [notification object];... } | Determine which object posted a notification? I'm having trouble identifying how to tell which object posted a notification. I subscribe to a notification in object A: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receivedNotification:) name=@"ReceivedData" object:nil] I post a notification ... | TITLE:
Determine which object posted a notification?
QUESTION:
I'm having trouble identifying how to tell which object posted a notification. I subscribe to a notification in object A: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receivedNotification:) name=@"ReceivedData" object:nil] I po... | [
"cocoa-touch"
] | 0 | 3 | 244 | 2 | 0 | 2011-06-03T16:42:45.087000 | 2011-06-03T16:50:28.710000 |
6,230,089 | 6,230,218 | Trying a canned program and getting an exception Unsatisfied Link Error | I seem to be in over my head. I have been trying to change the Linux TTY serial ports on the Android to work as regular serial ports (in and out). After struggling for a while, I found the following web page: http://code.google.com/p/android-serialport-api/ I decided that instead of reinventing the wheel, I would copy ... | Most likely the unatisfied link error is occuring because the native library is not getting packaged in your apk and then unpackaged in the right place on the device when the apk is installed. It could also be that the library depends on a system library that was present on an earlier device but is not available on you... | Trying a canned program and getting an exception Unsatisfied Link Error I seem to be in over my head. I have been trying to change the Linux TTY serial ports on the Android to work as regular serial ports (in and out). After struggling for a while, I found the following web page: http://code.google.com/p/android-serial... | TITLE:
Trying a canned program and getting an exception Unsatisfied Link Error
QUESTION:
I seem to be in over my head. I have been trying to change the Linux TTY serial ports on the Android to work as regular serial ports (in and out). After struggling for a while, I found the following web page: http://code.google.co... | [
"android"
] | 0 | 1 | 404 | 1 | 0 | 2011-06-03T16:43:00.547000 | 2011-06-03T16:57:57.393000 |
6,230,092 | 6,231,176 | Facebook "Like" button callback help | I am using this code for facebook like callback: The problem is that if i call a php script (for example http://www.test.com/addfacebook?id=xx&user=xxx&code=xxxx ) someone can see my javascript and run this page and even spam it or use it without have liked first. The concept is that i want to give a unique special dis... | The easiest way to get at what you are doing is to verify the user is legitimate. I would have your ajax action have parameters that include the FacebookID and the access_token. This will prevent anyone from gaming your system. Since you are using the FB JS SDK - just make a call to the API like so: FB.getLoginStatus(f... | Facebook "Like" button callback help I am using this code for facebook like callback: The problem is that if i call a php script (for example http://www.test.com/addfacebook?id=xx&user=xxx&code=xxxx ) someone can see my javascript and run this page and even spam it or use it without have liked first. The concept is tha... | TITLE:
Facebook "Like" button callback help
QUESTION:
I am using this code for facebook like callback: The problem is that if i call a php script (for example http://www.test.com/addfacebook?id=xx&user=xxx&code=xxxx ) someone can see my javascript and run this page and even spam it or use it without have liked first. ... | [
"php",
"ajax",
"facebook",
"facebook-like"
] | 2 | 0 | 2,450 | 2 | 0 | 2011-06-03T16:43:08.357000 | 2011-06-03T18:30:04.757000 |
6,230,105 | 6,230,145 | Android LinearLayout filling width | I am wondering why this happens: If I set "fill_parent" to my EditText's layout_width, it takes the whole width of the parent and the button disappears (I guess it is hidden below the EditText). Can anybody explain me? I would like to get the Button takes its own width and the EditText takes the remaining width. | Your telling the EditText to fill_parent, therefore it fills the screen (the whole width, leaving no space for your button). You want the button to wrap its content and the edit text to fill the remainder, you can do this using layout_weight property: (I took your drawable references out to make it generic for other pe... | Android LinearLayout filling width I am wondering why this happens: If I set "fill_parent" to my EditText's layout_width, it takes the whole width of the parent and the button disappears (I guess it is hidden below the EditText). Can anybody explain me? I would like to get the Button takes its own width and the EditTex... | TITLE:
Android LinearLayout filling width
QUESTION:
I am wondering why this happens: If I set "fill_parent" to my EditText's layout_width, it takes the whole width of the parent and the button disappears (I guess it is hidden below the EditText). Can anybody explain me? I would like to get the Button takes its own wid... | [
"android",
"android-linearlayout"
] | 10 | 25 | 15,035 | 1 | 0 | 2011-06-03T16:44:35.090000 | 2011-06-03T16:49:50.800000 |
6,230,116 | 6,230,151 | symfony wrong index and auto redirect to xampp webpage | I installed xampp and it works great with my symfony. I even made few excercises on projects. However I cannot setup my latest project which was coppied from another PC. How it looks: well the site opening in http://localhost/ppz/chujwiecotobedzie/web/frontend_dev.php looks good, but when i make symfony cc (in case) an... | It seems to me like there is a mix up regarding the folders. frontend_dev.php should be inside of the web/ directory if localhost/myproject/project1/frontend_dev.php is working, then the production version should be accessible at: localhost/myproject/project1/index.php | symfony wrong index and auto redirect to xampp webpage I installed xampp and it works great with my symfony. I even made few excercises on projects. However I cannot setup my latest project which was coppied from another PC. How it looks: well the site opening in http://localhost/ppz/chujwiecotobedzie/web/frontend_dev.... | TITLE:
symfony wrong index and auto redirect to xampp webpage
QUESTION:
I installed xampp and it works great with my symfony. I even made few excercises on projects. However I cannot setup my latest project which was coppied from another PC. How it looks: well the site opening in http://localhost/ppz/chujwiecotobedzie... | [
"symfony1",
"xampp",
"redirect"
] | 0 | 1 | 1,628 | 1 | 0 | 2011-06-03T16:45:51.830000 | 2011-06-03T16:50:56.993000 |
6,230,117 | 6,230,229 | Python - reduce function and | operator | I am looking at some Web2py code. The variable tokens is some kind of a list of strings. To be more precise, it is defined as tokens = form.vars.name.split() where form.vars.name is a string. My question deals with the following instruction: query = reduce(lambda a,b:a&b,[User.first_name.contains(k)|User.last_name.cont... | In Web2Py & and | are not bitwise and/or here, but are used to build a special object that represents a database query! They correspond to AND and OR in SQL statements contains is part of Web2Pys DAL See 1. reduce is fold, a very fundamental higher order function that essentially reduces a list to a result, using the f... | Python - reduce function and | operator I am looking at some Web2py code. The variable tokens is some kind of a list of strings. To be more precise, it is defined as tokens = form.vars.name.split() where form.vars.name is a string. My question deals with the following instruction: query = reduce(lambda a,b:a&b,[User.fi... | TITLE:
Python - reduce function and | operator
QUESTION:
I am looking at some Web2py code. The variable tokens is some kind of a list of strings. To be more precise, it is defined as tokens = form.vars.name.split() where form.vars.name is a string. My question deals with the following instruction: query = reduce(lambd... | [
"python",
"web2py",
"reduce"
] | 2 | 7 | 2,062 | 3 | 0 | 2011-06-03T16:45:53.080000 | 2011-06-03T16:59:14.043000 |
6,230,123 | 6,230,390 | Flex how to format a date string when it could be two different formats | I have a date field in flex and have the format set to YYYY-MM-DD. As long as the user clicks the calendar pop-up it set's it that way. However, I need to allow the field to be human enter-able so they can type in a date. The problem is, most users want to type the format MM/DD/YYYY. I have a tool tip that shows the fo... | Easy enough: DateFormatter.parseDate(yourString); As long as your string is somewhat of a standard format, it should work. | Flex how to format a date string when it could be two different formats I have a date field in flex and have the format set to YYYY-MM-DD. As long as the user clicks the calendar pop-up it set's it that way. However, I need to allow the field to be human enter-able so they can type in a date. The problem is, most users... | TITLE:
Flex how to format a date string when it could be two different formats
QUESTION:
I have a date field in flex and have the format set to YYYY-MM-DD. As long as the user clicks the calendar pop-up it set's it that way. However, I need to allow the field to be human enter-able so they can type in a date. The prob... | [
"apache-flex",
"date",
"format",
"flash-builder"
] | 1 | 1 | 1,424 | 1 | 0 | 2011-06-03T16:46:36.167000 | 2011-06-03T17:14:11.547000 |
6,230,129 | 6,230,141 | jQuery delegate() won't work with $(this) | I am currently putting together some jQuery that will activate slideDown() when an element is clicked that is generated by js. Here is my function: $('.radiowrap').delegate("span[title='yes']", "click", function() { $('.radiowrap').next('.secondq:first').slideDown('medium'); }); This works fine but only if I specify th... | Use $(this).closest(".radiowrap") instead..delegate() and.live() try to emulate.bind() as close as possible; thus, inside the event handler, this points to the.radiowrap span[title='yes'] that was clicked, just as if you had bound to that directly. Using.closest(".radiowrap") will find the ancestor.radiowrap of the cli... | jQuery delegate() won't work with $(this) I am currently putting together some jQuery that will activate slideDown() when an element is clicked that is generated by js. Here is my function: $('.radiowrap').delegate("span[title='yes']", "click", function() { $('.radiowrap').next('.secondq:first').slideDown('medium'); })... | TITLE:
jQuery delegate() won't work with $(this)
QUESTION:
I am currently putting together some jQuery that will activate slideDown() when an element is clicked that is generated by js. Here is my function: $('.radiowrap').delegate("span[title='yes']", "click", function() { $('.radiowrap').next('.secondq:first').slide... | [
"javascript",
"jquery"
] | 0 | 6 | 277 | 1 | 0 | 2011-06-03T16:47:13.010000 | 2011-06-03T16:49:31.470000 |
6,230,131 | 6,230,156 | How to update database from dynamically created webpage? PHP MySQL | I have a part of webpage that is dynamically generated using MySQL queries: First Name Last Name Phone number Email Address Rating As you can see, 2 fields are of input type="text". Once the user has made entries in these fields, I need to update the database table with these values on clicking Submit. However, I don't... | The name of an input should not be generated dynamically. Instead use a constant. The dynamic value of that input should be set in the value attribute of the input. Example for one of your inputs: You can retrieve the value by using the $_GET or $_POST arrays. Assuming your form uses the POST method you can do the foll... | How to update database from dynamically created webpage? PHP MySQL I have a part of webpage that is dynamically generated using MySQL queries: First Name Last Name Phone number Email Address Rating As you can see, 2 fields are of input type="text". Once the user has made entries in these fields, I need to update the da... | TITLE:
How to update database from dynamically created webpage? PHP MySQL
QUESTION:
I have a part of webpage that is dynamically generated using MySQL queries: First Name Last Name Phone number Email Address Rating As you can see, 2 fields are of input type="text". Once the user has made entries in these fields, I nee... | [
"php",
"mysql"
] | 1 | 4 | 3,967 | 5 | 0 | 2011-06-03T16:47:39.400000 | 2011-06-03T16:51:39.413000 |
6,230,135 | 6,230,157 | How to create Character based arrays in Turbo C++? | I was trying some C++, but I'm too new to this and you can say that this is my first day at C++. So I was trying to create a function but I was stuck with arrays! When I create a Character based array like this: char x[7][7] = {"sec","min","hr","day","week","month","year"}; And when I try to fetch the data from it like... | Since you have 7 values, and the array is indexed from 0, you only need to count up to 6, not 7. Modify your for loop as for (i=0;i < 7;i++). ( < instead of <=.) You're going over the end of the array, which may give you garbage data or may just crash your program. | How to create Character based arrays in Turbo C++? I was trying some C++, but I'm too new to this and you can say that this is my first day at C++. So I was trying to create a function but I was stuck with arrays! When I create a Character based array like this: char x[7][7] = {"sec","min","hr","day","week","month","ye... | TITLE:
How to create Character based arrays in Turbo C++?
QUESTION:
I was trying some C++, but I'm too new to this and you can say that this is my first day at C++. So I was trying to create a function but I was stuck with arrays! When I create a Character based array like this: char x[7][7] = {"sec","min","hr","day",... | [
"c++",
"c",
"arrays",
"multidimensional-array"
] | 0 | 6 | 1,450 | 3 | 0 | 2011-06-03T16:48:46.973000 | 2011-06-03T16:51:46.683000 |
6,230,142 | 6,230,378 | Html Agility Pack cannot find list option using xpath | This is related to my previous question, but it seems I have another corner case where Html Agility Pack doesn't work as expected. Here's the Html (stripped down to the essentials, and sensitive information removed): Frarma Express Maderas Garcia Miaris, S.A. Ricoh Panama UNO EXPRESS Garrett Blaser Gretsch Oriel Antoni... | This is "by design". It's the same idea for OPTION and FORM. Some tags are handled differently because of historical reasons by the Html Agility Pack. Back then in HTML 3.2 time, OPTION was not always closed, and in HTML 3.2, it's not required. Try adding this: HtmlNode.ElementsFlags.Remove("option"); | Html Agility Pack cannot find list option using xpath This is related to my previous question, but it seems I have another corner case where Html Agility Pack doesn't work as expected. Here's the Html (stripped down to the essentials, and sensitive information removed): Frarma Express Maderas Garcia Miaris, S.A. Ricoh ... | TITLE:
Html Agility Pack cannot find list option using xpath
QUESTION:
This is related to my previous question, but it seems I have another corner case where Html Agility Pack doesn't work as expected. Here's the Html (stripped down to the essentials, and sensitive information removed): Frarma Express Maderas Garcia M... | [
"c#",
"xpath",
"html-agility-pack",
"webdriver"
] | 3 | 5 | 1,379 | 1 | 0 | 2011-06-03T16:49:31.877000 | 2011-06-03T17:13:04.013000 |
6,230,143 | 6,230,244 | C# Split Times into Hour Blocks | I am in need of some assistance in getting 2 datetimes to split into the hour intervals between them. This is working with 'pay' data, so it needs to be very accurate. I need to take clockin and clockout, and split them into hour intervals. Example: clockin = 5/25/2011 1:40:56PM clockout = 5/25/2011 6:22:12PM I need th... | var hours = new List (); hours.Add(clockin);
var next = new DateTime(clockin.Year, clockin.Month, clockin.Day, clockin.Hour, 0, 0, clockin.Kind);
while ((next = next.AddHours(1)) < clockout) { hours.Add(next); } hours.Add(clockout); | C# Split Times into Hour Blocks I am in need of some assistance in getting 2 datetimes to split into the hour intervals between them. This is working with 'pay' data, so it needs to be very accurate. I need to take clockin and clockout, and split them into hour intervals. Example: clockin = 5/25/2011 1:40:56PM clockout... | TITLE:
C# Split Times into Hour Blocks
QUESTION:
I am in need of some assistance in getting 2 datetimes to split into the hour intervals between them. This is working with 'pay' data, so it needs to be very accurate. I need to take clockin and clockout, and split them into hour intervals. Example: clockin = 5/25/2011 ... | [
"c#",
"sql-server",
"datetime",
"timestamp"
] | 6 | 8 | 3,912 | 4 | 0 | 2011-06-03T16:49:37.663000 | 2011-06-03T17:00:54.597000 |
6,230,149 | 6,230,213 | SQL Server view takes a long time to alter but query itself finishes quickly? | I am trying to alter an existing view in my SQL Server database. When I run the query by itself it finishes in about 4 seconds. When I run the alter statement with the same query it runs and never finishes (waited 15 minutes before stopping it). I do not have any indexes on the view I am trying to alter. Any ideas what... | Make sure there's no contention for that view. If something else is accessing it, or if there's a spid somewhere that's idle but has a connection to it, you may be blocked from the ALTER statement. A simple sp_who2 active during the ALTER should give you the culprit. | SQL Server view takes a long time to alter but query itself finishes quickly? I am trying to alter an existing view in my SQL Server database. When I run the query by itself it finishes in about 4 seconds. When I run the alter statement with the same query it runs and never finishes (waited 15 minutes before stopping i... | TITLE:
SQL Server view takes a long time to alter but query itself finishes quickly?
QUESTION:
I am trying to alter an existing view in my SQL Server database. When I run the query by itself it finishes in about 4 seconds. When I run the alter statement with the same query it runs and never finishes (waited 15 minutes... | [
"sql-server",
"sql-server-2008"
] | 9 | 23 | 15,611 | 2 | 0 | 2011-06-03T16:50:35.043000 | 2011-06-03T16:57:40.860000 |
6,230,152 | 6,231,997 | Backbone/JavaScript ignore new objects | Backbone seems to ignore the new operator. In the following code, the stock depends on a different product for each call. Backbone's first call is a POST — the model does not exist — but following are PUT even if a new StockModel is created each times. Are backbone's model singleton? if (validName && validPrice) { this... | I'm pretty sure that the problem is that you are using id: product.get('id') as the stock item's id. Backbone uses id to determine weather something is a new object or not. I'd rename this to productId: product.get('id'). It's hard to tell exactly from the code snippet above exactly what you are doing, but I suspect th... | Backbone/JavaScript ignore new objects Backbone seems to ignore the new operator. In the following code, the stock depends on a different product for each call. Backbone's first call is a POST — the model does not exist — but following are PUT even if a new StockModel is created each times. Are backbone's model singlet... | TITLE:
Backbone/JavaScript ignore new objects
QUESTION:
Backbone seems to ignore the new operator. In the following code, the stock depends on a different product for each call. Backbone's first call is a POST — the model does not exist — but following are PUT even if a new StockModel is created each times. Are backbo... | [
"rest",
"model",
"backbone.js"
] | 0 | 0 | 181 | 1 | 0 | 2011-06-03T16:51:02.343000 | 2011-06-03T19:56:08.147000 |
6,230,154 | 6,231,020 | check the state of a radio button android and count the answers | I edited the code the way @CommonsWare told me i get force close when I try to click r1 and the problem is it seems button[i].isChecked() doesn;t work--> fixed I have final RadioButton[] buttons = {r1,r3,r5,r7}; And I want to count them (basically yes answers) public void onClick(View view){
checkStates(buttons);} } p... | How to check the state of a radio button in android? Call isChecked(). But you knew this already. And I want to count them There is no point in calling setChecked(true) on a RadioButton that returns true from isChecked(), since that RadioButton is already checked. I want to count the yes answers and if the user changes... | check the state of a radio button android and count the answers I edited the code the way @CommonsWare told me i get force close when I try to click r1 and the problem is it seems button[i].isChecked() doesn;t work--> fixed I have final RadioButton[] buttons = {r1,r3,r5,r7}; And I want to count them (basically yes answ... | TITLE:
check the state of a radio button android and count the answers
QUESTION:
I edited the code the way @CommonsWare told me i get force close when I try to click r1 and the problem is it seems button[i].isChecked() doesn;t work--> fixed I have final RadioButton[] buttons = {r1,r3,r5,r7}; And I want to count them (... | [
"android",
"radio-button"
] | 1 | 1 | 15,030 | 2 | 0 | 2011-06-03T16:51:06.150000 | 2011-06-03T18:14:47.827000 |
6,230,164 | 6,230,377 | How to parse list of dictionaries string returned by facebook api with python? | Using django-social-auth to grab user data from facebook, it is returning a list of dicts in a unicode string. For example, response.get('education') for a user is returning: u"[{u'school': {u'id': u'12345', u'name': u'Joe Thiesman High'}, u'type': u'High School'}, {u'school': {u'id': u'23456', u'name': u'Joe Montana U... | Take a look at the answer to this question: Convert a String representation of a Dictionary to a dictionary? The use of python's ast.literal_eval might be very useful to you. It is also a lot safer to use than eval because it only will evaluate python data literals (strings, tuples, etc...) but not executable code. See... | How to parse list of dictionaries string returned by facebook api with python? Using django-social-auth to grab user data from facebook, it is returning a list of dicts in a unicode string. For example, response.get('education') for a user is returning: u"[{u'school': {u'id': u'12345', u'name': u'Joe Thiesman High'}, u... | TITLE:
How to parse list of dictionaries string returned by facebook api with python?
QUESTION:
Using django-social-auth to grab user data from facebook, it is returning a list of dicts in a unicode string. For example, response.get('education') for a user is returning: u"[{u'school': {u'id': u'12345', u'name': u'Joe ... | [
"python",
"django"
] | 1 | 3 | 1,180 | 3 | 0 | 2011-06-03T16:52:30.753000 | 2011-06-03T17:12:54.400000 |
6,230,175 | 6,230,279 | How to test for presence of "nohref" attribute in IE6/7? | The nohref attribute on an area tag causes the are to be specifically excluded from an image map. It works in IE 6-7 in that you can see the mouse pointer is not changed when hovering over an area marked as such. The rectangle has a "nohref" and the blue circle doesn't. http://jsfiddle.net/ZNMEC/7/ However, I can't fig... | By the XHTML standard, nohref attributes should be written as nohref="nohref". If you do that, you can easily test for it as.attr('nohref') will return the string "nohref". However this attribute is no longer supported in HTML5. From the W3C working draft: The nohref attribute on the area element is obsolete. Omitting ... | How to test for presence of "nohref" attribute in IE6/7? The nohref attribute on an area tag causes the are to be specifically excluded from an image map. It works in IE 6-7 in that you can see the mouse pointer is not changed when hovering over an area marked as such. The rectangle has a "nohref" and the blue circle d... | TITLE:
How to test for presence of "nohref" attribute in IE6/7?
QUESTION:
The nohref attribute on an area tag causes the are to be specifically excluded from an image map. It works in IE 6-7 in that you can see the mouse pointer is not changed when hovering over an area marked as such. The rectangle has a "nohref" and... | [
"javascript",
"jquery",
"internet-explorer-6",
"imagemap"
] | 0 | 2 | 295 | 2 | 0 | 2011-06-03T16:54:19.380000 | 2011-06-03T17:03:51.927000 |
6,230,180 | 6,230,257 | Can sort() in C++ have a n^2 performance? | When trying to estimated the performance of a program, I always treated sort() function as a worst-performance-n^2 function. However, I came across a Wikipedia page: sort(C++) Which states that the GNU C Library sort() uses some hybrid sorting algorithm called Introsort first, then do insertion sort. The corresponding ... | The use of quicksort and introsort (which is a variant of the former, with guaranteed O(n log n) performance achieved by switching to heapsort on worst case inputs) in place of other theoretically better algorithms like mergesort is due to the fact that the average case is the same, and the constants much lower (in the... | Can sort() in C++ have a n^2 performance? When trying to estimated the performance of a program, I always treated sort() function as a worst-performance-n^2 function. However, I came across a Wikipedia page: sort(C++) Which states that the GNU C Library sort() uses some hybrid sorting algorithm called Introsort first, ... | TITLE:
Can sort() in C++ have a n^2 performance?
QUESTION:
When trying to estimated the performance of a program, I always treated sort() function as a worst-performance-n^2 function. However, I came across a Wikipedia page: sort(C++) Which states that the GNU C Library sort() uses some hybrid sorting algorithm called... | [
"c++",
"algorithm",
"sorting",
"gnu"
] | 4 | 5 | 1,302 | 5 | 0 | 2011-06-03T16:54:42.470000 | 2011-06-03T17:01:44.567000 |
6,230,188 | 6,230,210 | In emacs with X, Edit->Copy is mapped to "<copy>" - what key is that on a Linux based PC? | In my Linux setup, Emacs has the Edit->Copy menu item mapped to -- what key is that? And where does it get that keyname definition from? Is that internal to emacs? Or does it get that further upstream? Specifically, I am running Gnome under Ubuntu Lucid (10.04LTS) - but I believe this is a far more generic question. Is... | Yes, it's a standard X11 keysym for which there are no equivalents on a 105-key PC keyboard. Sun and various other workstation keyboards had such keys, and you can find them on some multimedia PC keyboards. | In emacs with X, Edit->Copy is mapped to "<copy>" - what key is that on a Linux based PC? In my Linux setup, Emacs has the Edit->Copy menu item mapped to -- what key is that? And where does it get that keyname definition from? Is that internal to emacs? Or does it get that further upstream? Specifically, I am running G... | TITLE:
In emacs with X, Edit->Copy is mapped to "<copy>" - what key is that on a Linux based PC?
QUESTION:
In my Linux setup, Emacs has the Edit->Copy menu item mapped to -- what key is that? And where does it get that keyname definition from? Is that internal to emacs? Or does it get that further upstream? Specifical... | [
"emacs",
"ubuntu",
"x11",
"keymapping"
] | 2 | 2 | 325 | 1 | 0 | 2011-06-03T16:55:31.293000 | 2011-06-03T16:57:36.967000 |
6,230,190 | 6,230,245 | Convert International String to \u Codes in java | How can I convert an international (e.g. Russian) String to \u numbers (unicode numbers) e.g. \u041e\u041a for OK? | In case you need this to write a.properties file you can just add the Strings into a Properties object and then save it to a file. It will take care for the conversion. | Convert International String to \u Codes in java How can I convert an international (e.g. Russian) String to \u numbers (unicode numbers) e.g. \u041e\u041a for OK? | TITLE:
Convert International String to \u Codes in java
QUESTION:
How can I convert an international (e.g. Russian) String to \u numbers (unicode numbers) e.g. \u041e\u041a for OK?
ANSWER:
In case you need this to write a.properties file you can just add the Strings into a Properties object and then save it to a file... | [
"java",
"unicode",
"escaping",
"unicode-escapes"
] | 54 | 6 | 124,964 | 12 | 0 | 2011-06-03T16:56:00.877000 | 2011-06-03T17:00:56.413000 |
6,230,193 | 6,230,300 | Trouble performing simple GET request returning JSON with Javascript | I'm horrible at Javascript, so sorry in advance for what I'm going to go ahead and assume is an amazingly stupid question. I'm simply trying to perform a GET request to GitHub's public repo API for a given user, and return the value as JSON. Here's the function I'm trying to use: function get_github_public_repos(userna... | jQuery's ajax function supports JSONP which allows cross-domain requests (which you need because you're trying to request data from github.com from another domain). Just change the dataType from 'json' to 'jsonp'; function get_github_public_repos(username) {
var the_url = "http://github.com/api/v2/json/repos/show/" + ... | Trouble performing simple GET request returning JSON with Javascript I'm horrible at Javascript, so sorry in advance for what I'm going to go ahead and assume is an amazingly stupid question. I'm simply trying to perform a GET request to GitHub's public repo API for a given user, and return the value as JSON. Here's th... | TITLE:
Trouble performing simple GET request returning JSON with Javascript
QUESTION:
I'm horrible at Javascript, so sorry in advance for what I'm going to go ahead and assume is an amazingly stupid question. I'm simply trying to perform a GET request to GitHub's public repo API for a given user, and return the value ... | [
"javascript",
"jquery",
"ajax",
"json"
] | 1 | 3 | 1,978 | 6 | 0 | 2011-06-03T16:56:23.873000 | 2011-06-03T17:05:26.730000 |
6,230,199 | 6,232,655 | Problem with opening contacts - Android | I've put a feature in my app that opens the contacts list. The problem is that some users reported that the app crashed when they tried to use it. The feature seems to works fine for most people(me included, with Nexus S). Here's the code I've used to open the contacts - call_friend.setOnClickListener(new OnClickListen... | Use an implicit Intent to launch the Contacts activity - i.e. tell the OS you want to view a list of contacts, and it will figure out the right activity to use (or prompt the user if more than one Contacts app is installed). The following Intent will do the trick: Intent i = new Intent(); i.setAction(Intent.ACTION_VIEW... | Problem with opening contacts - Android I've put a feature in my app that opens the contacts list. The problem is that some users reported that the app crashed when they tried to use it. The feature seems to works fine for most people(me included, with Nexus S). Here's the code I've used to open the contacts - call_fri... | TITLE:
Problem with opening contacts - Android
QUESTION:
I've put a feature in my app that opens the contacts list. The problem is that some users reported that the app crashed when they tried to use it. The feature seems to works fine for most people(me included, with Nexus S). Here's the code I've used to open the c... | [
"android",
"android-intent",
"android-contacts"
] | 2 | 13 | 5,389 | 3 | 0 | 2011-06-03T16:56:53.520000 | 2011-06-03T21:00:29.523000 |
6,230,206 | 6,230,425 | ios/iphone sdk form management best practices | I'm working on an iPhone app that will have involve a lot of forms. Currently I have a ViewController class for each settings page which has an UITableView loaded with possible settings. When someone clicks on a setting they are taken taken to a new view to enter the form value, or allowed to enter things in place. Wha... | You can programmatically: create view hierarchy UIButton UILabel You get the idea. However, I would recommend getting your logic working for a few of the cases, and then it should become obvious what parts are redundant as you find yourself typing in the same thing over and over. At that point, refactor to get the redu... | ios/iphone sdk form management best practices I'm working on an iPhone app that will have involve a lot of forms. Currently I have a ViewController class for each settings page which has an UITableView loaded with possible settings. When someone clicks on a setting they are taken taken to a new view to enter the form v... | TITLE:
ios/iphone sdk form management best practices
QUESTION:
I'm working on an iPhone app that will have involve a lot of forms. Currently I have a ViewController class for each settings page which has an UITableView loaded with possible settings. When someone clicks on a setting they are taken taken to a new view t... | [
"ios",
"iphone",
"objective-c",
"programmatically-created"
] | 1 | 6 | 1,283 | 2 | 0 | 2011-06-03T16:57:28.067000 | 2011-06-03T17:16:54.980000 |
6,230,216 | 6,232,308 | WPF Themes not applying to background | I have a WPF application I am developing, that allows the user to switch the current theme. I figured out how to switch themes... but it appears that the background of the application isn't affected by the theme: (I blended three pictures together to conserve space) How can I fix this? It clearly shows here that the ba... | The themes define a background but you need to set it up yourself since it is not being referenced anywhere within the theme: Background="{DynamicResource WindowBackgroundBrush}" Why? I'd assume because styles are not automatically applied to derived classes, so if a style with the TargetType Window is set up that woul... | WPF Themes not applying to background I have a WPF application I am developing, that allows the user to switch the current theme. I figured out how to switch themes... but it appears that the background of the application isn't affected by the theme: (I blended three pictures together to conserve space) How can I fix t... | TITLE:
WPF Themes not applying to background
QUESTION:
I have a WPF application I am developing, that allows the user to switch the current theme. I figured out how to switch themes... but it appears that the background of the application isn't affected by the theme: (I blended three pictures together to conserve spac... | [
"wpf"
] | 4 | 7 | 2,522 | 2 | 0 | 2011-06-03T16:57:45.737000 | 2011-06-03T20:27:18.617000 |
6,230,219 | 6,234,259 | How can I debug a PHP Web Application's (Magento specifically) Installation Flow? | I can't get passed the Magento Installer's Terms of Service. After clicking the Accept check box and clicking Submit, the page (seemingly?) refreshes itself. I’ve changed perms to 0777 with this script #!/bin/sh find. -type f -exec chmod 644 {} \; find. -type d -exec chmod 777 {} \; chmod o+w var/.htaccess chmod 550 ma... | You can install via CLI to get around the web based installer issues (usually), I've encountered some anomalies before when installing: http://www.magentocommerce.com/wiki/groups/227/command_line_installation_wizard It may help also shed some light on why the web based installer isn't working if any errors are thrown, ... | How can I debug a PHP Web Application's (Magento specifically) Installation Flow? I can't get passed the Magento Installer's Terms of Service. After clicking the Accept check box and clicking Submit, the page (seemingly?) refreshes itself. I’ve changed perms to 0777 with this script #!/bin/sh find. -type f -exec chmod ... | TITLE:
How can I debug a PHP Web Application's (Magento specifically) Installation Flow?
QUESTION:
I can't get passed the Magento Installer's Terms of Service. After clicking the Accept check box and clicking Submit, the page (seemingly?) refreshes itself. I’ve changed perms to 0777 with this script #!/bin/sh find. -t... | [
"php",
"javascript",
"magento"
] | 2 | 0 | 246 | 2 | 0 | 2011-06-03T16:58:05.417000 | 2011-06-04T02:13:26.143000 |
6,230,222 | 6,230,483 | android - draw slope / slant line on a textview | hi, I'm trying to implement something similar to the image attached. I have two textviews one on top of the other and i want their borders to look like the one in the image. I was able to draw rounded corners by setting the cornerradii of the GradientDrawable but i have no clue as in how to draw the slope on the right ... | I would in this case do the graphics in a some graphics editing program (Photshop, GIMP or Inkscape for example). Two different drawings, one for the top part and one for the bottom. Then convert the drawings to NinePatchDrawable to be used as backgrounds for the text views. Since this type of drawable can be made larg... | android - draw slope / slant line on a textview hi, I'm trying to implement something similar to the image attached. I have two textviews one on top of the other and i want their borders to look like the one in the image. I was able to draw rounded corners by setting the cornerradii of the GradientDrawable but i have n... | TITLE:
android - draw slope / slant line on a textview
QUESTION:
hi, I'm trying to implement something similar to the image attached. I have two textviews one on top of the other and i want their borders to look like the one in the image. I was able to draw rounded corners by setting the cornerradii of the GradientDra... | [
"android"
] | 0 | 1 | 1,105 | 2 | 0 | 2011-06-03T16:58:37.570000 | 2011-06-03T17:23:16.390000 |
6,230,227 | 6,253,028 | Calling Net Tcp WCF Service from Claims based SharePoint | I have a windows service that runs a WCF Net Tcp binding service. All binding and endpoint information is set programmatically. _host.AddServiceEndpoint(typeof(IService), new NetTcpBinding(), serviceName); In sharepoint I am accessing this service using a channel factory: var channelFactory = new ChannelFactory ( new N... | We solved it using this approach: using(WindowsIdentity.Impersonate(IntPtr.Zero)) { var result = channel.ServiceMethod(); } This in my opinion is better then needlessly elevating SharePoint credentials using RunWithElevatedPrivileges. | Calling Net Tcp WCF Service from Claims based SharePoint I have a windows service that runs a WCF Net Tcp binding service. All binding and endpoint information is set programmatically. _host.AddServiceEndpoint(typeof(IService), new NetTcpBinding(), serviceName); In sharepoint I am accessing this service using a channel... | TITLE:
Calling Net Tcp WCF Service from Claims based SharePoint
QUESTION:
I have a windows service that runs a WCF Net Tcp binding service. All binding and endpoint information is set programmatically. _host.AddServiceEndpoint(typeof(IService), new NetTcpBinding(), serviceName); In sharepoint I am accessing this servi... | [
"wcf",
"sharepoint-2010",
"claims-based-identity",
"claims",
"net-tcp"
] | 2 | 2 | 1,115 | 1 | 0 | 2011-06-03T16:59:08.940000 | 2011-06-06T13:51:40.850000 |
6,230,237 | 6,230,640 | Rails 3 - Subdomain Issue Moving to Heroku | I've written an application that uses a subdomain per user account to segregate environments. All this is working fine, except I have one issue. I can't get both www and "" to have a different root path than all other subdomains. For all account subdomains, I have a root page of: root:to => "applications#index" I need ... | You can use an object that implements 'matches?' to do some real custom stuff. Below we'll set applications#index if you are a customer subdomain, and send you to promo#index if you're not In your routes: Yourapp::Application.routes.draw do constraints(SubDomain) do root:to => "applications#index" end root:to => "promo... | Rails 3 - Subdomain Issue Moving to Heroku I've written an application that uses a subdomain per user account to segregate environments. All this is working fine, except I have one issue. I can't get both www and "" to have a different root path than all other subdomains. For all account subdomains, I have a root page ... | TITLE:
Rails 3 - Subdomain Issue Moving to Heroku
QUESTION:
I've written an application that uses a subdomain per user account to segregate environments. All this is working fine, except I have one issue. I can't get both www and "" to have a different root path than all other subdomains. For all account subdomains, I... | [
"ruby-on-rails",
"ruby-on-rails-3",
"heroku"
] | 1 | 3 | 577 | 1 | 0 | 2011-06-03T17:00:20.883000 | 2011-06-03T17:39:33.733000 |
6,230,249 | 6,230,451 | Query String How to transfer from url to url | I have page that is receiving a query string and I want it so that if the user is on a mobile site, it will redirect them to the mobile version of that page and move the query string with it. How would I do this? Thank is advanced. | Will request forwarding not work in this scenario? RequestDispatcher rd = getServletContext().getRequestDispatcher(mobileSiteUrl);
rd.forward(req, resp); | Query String How to transfer from url to url I have page that is receiving a query string and I want it so that if the user is on a mobile site, it will redirect them to the mobile version of that page and move the query string with it. How would I do this? Thank is advanced. | TITLE:
Query String How to transfer from url to url
QUESTION:
I have page that is receiving a query string and I want it so that if the user is on a mobile site, it will redirect them to the mobile version of that page and move the query string with it. How would I do this? Thank is advanced.
ANSWER:
Will request for... | [
"redirect",
"mobile",
"query-string"
] | 1 | 1 | 112 | 1 | 0 | 2011-06-03T17:01:12.203000 | 2011-06-03T17:19:23.800000 |
6,230,256 | 6,230,865 | perl sort question | I have some huge log files I need to sort. All entries have a 32 bit hex number which is the sort key I want to use. some entries are one liners like bla bla bla 0x97860afa bla bla others are a bit more complex, start with the same type of line above and expand to a block of lines marked by curly brackets like the exam... | Something like this might work (Not tested): my $line; my $lastkey; my %data; while($line = <>) { chomp $line; if ($line =~ /\b(0x\p{AHex}{8})\b/) { # Begin a new entry my $unique_key = $1. $.; # cred to [Brian Gerard][1] for uniqueness $data{$1} = $line; $lastkey = $unique_key; } else { # Continue an old entry $data{$... | perl sort question I have some huge log files I need to sort. All entries have a 32 bit hex number which is the sort key I want to use. some entries are one liners like bla bla bla 0x97860afa bla bla others are a bit more complex, start with the same type of line above and expand to a block of lines marked by curly bra... | TITLE:
perl sort question
QUESTION:
I have some huge log files I need to sort. All entries have a 32 bit hex number which is the sort key I want to use. some entries are one liners like bla bla bla 0x97860afa bla bla others are a bit more complex, start with the same type of line above and expand to a block of lines m... | [
"perl",
"awk"
] | 3 | 2 | 396 | 5 | 0 | 2011-06-03T17:01:39.687000 | 2011-06-03T18:00:16.037000 |
6,230,263 | 6,230,340 | Where can I find a good C# console app that demonstrates polling? | I'm looking for a good example of polling in C#. Basically, every X seconds an instrument is read and the values logged to a text file. I was looking for a sample that makes use of.NET 4's parallel library. Or, maybe I'm overthinking this solution by looking at TPL... ps- this question is unrelated to my previous quest... | I'm not sure I'd particularly bother with TPL here. Just use System.Threading.Timer or System.Timers.Timer to perform an action periodically. Those will both use the thread pool - what are you planning on doing in the main console thread during this time? Of course, another extremely simple option would be to just make... | Where can I find a good C# console app that demonstrates polling? I'm looking for a good example of polling in C#. Basically, every X seconds an instrument is read and the values logged to a text file. I was looking for a sample that makes use of.NET 4's parallel library. Or, maybe I'm overthinking this solution by loo... | TITLE:
Where can I find a good C# console app that demonstrates polling?
QUESTION:
I'm looking for a good example of polling in C#. Basically, every X seconds an instrument is read and the values logged to a text file. I was looking for a sample that makes use of.NET 4's parallel library. Or, maybe I'm overthinking th... | [
"c#",
".net-4.0",
"polling"
] | 2 | 4 | 3,447 | 3 | 0 | 2011-06-03T17:02:01.507000 | 2011-06-03T17:08:56.657000 |
6,230,266 | 6,230,394 | jQuery single selector vs .find() | Which is better to use as a performance perspective: $(".div1 h2,.div1 h3") or $(".div1").find("h2, h3") | The answer to your question is: yes. Don't worry about the performance difference, unless your code is slow. If it is, use a profiler to determine bottlenecks. From an analysis standpoint: $(".div1 h2, div1 h3") should be faster as jQuery will pipe it through querySelectorAll (if it exists) and native code will run fas... | jQuery single selector vs .find() Which is better to use as a performance perspective: $(".div1 h2,.div1 h3") or $(".div1").find("h2, h3") | TITLE:
jQuery single selector vs .find()
QUESTION:
Which is better to use as a performance perspective: $(".div1 h2,.div1 h3") or $(".div1").find("h2, h3")
ANSWER:
The answer to your question is: yes. Don't worry about the performance difference, unless your code is slow. If it is, use a profiler to determine bottlen... | [
"javascript",
"jquery",
"jquery-selectors"
] | 60 | 38 | 38,729 | 4 | 0 | 2011-06-03T17:02:22.907000 | 2011-06-03T17:14:22.480000 |
6,230,269 | 6,230,297 | 3-promise rule for functions | I need help remembering what book I read this from, It might have been Effective C++ or something, but I don't remember. I was reading something that basically stated that functions have 3 promises: Validate input parameters to make sure they meet the expected input requirements Guaranteed to respect & maintain invaria... | The name of the concept is Design by Contract: Expect a certain condition to be guaranteed on entry by any client module that calls it: the routine's precondition—an obligation for the client, and a benefit for the supplier (the routine itself), as it frees it from having to handle cases outside of the precondition. Gu... | 3-promise rule for functions I need help remembering what book I read this from, It might have been Effective C++ or something, but I don't remember. I was reading something that basically stated that functions have 3 promises: Validate input parameters to make sure they meet the expected input requirements Guaranteed ... | TITLE:
3-promise rule for functions
QUESTION:
I need help remembering what book I read this from, It might have been Effective C++ or something, but I don't remember. I was reading something that basically stated that functions have 3 promises: Validate input parameters to make sure they meet the expected input requir... | [
"c++"
] | 3 | 7 | 162 | 1 | 0 | 2011-06-03T17:02:35.870000 | 2011-06-03T17:05:12.200000 |
6,230,272 | 6,251,925 | Reactive Extensions Subject<IEnumerable<Obj>> to Subject<IEnumerable<AggregatedObj>> | I'm having trouble taking a subject of public Subject > PersonDataSubject; And converting it to: public Subject > BornInYearSubject;... using some linq aggregation. The example below puts it in more context, and where I'm struggling is working out how to get an IEnumerable into the BornInYearSubject from a subscription... | Ok this works. Thanks for the ideas guys - the answer seems strikingly obvious in hindsight! using System; using System.Collections.Generic; using System.Linq;
namespace TestReactive { public class ReactiveTest { public class Person { public string name; public DateTime dob; };
public class BornInYear { public int Ye... | Reactive Extensions Subject<IEnumerable<Obj>> to Subject<IEnumerable<AggregatedObj>> I'm having trouble taking a subject of public Subject > PersonDataSubject; And converting it to: public Subject > BornInYearSubject;... using some linq aggregation. The example below puts it in more context, and where I'm struggling is... | TITLE:
Reactive Extensions Subject<IEnumerable<Obj>> to Subject<IEnumerable<AggregatedObj>>
QUESTION:
I'm having trouble taking a subject of public Subject > PersonDataSubject; And converting it to: public Subject > BornInYearSubject;... using some linq aggregation. The example below puts it in more context, and where... | [
"ienumerable",
"system.reactive",
"task-parallel-library"
] | 0 | 0 | 337 | 2 | 0 | 2011-06-03T17:03:12.073000 | 2011-06-06T12:23:27.923000 |
6,230,274 | 6,230,289 | lvalue required as increment operand error | #include int main() { int i = 10; printf("%d\n", ++(-i)); // <-- Error Here } What is wrong with ++(-i)? Please clarify. | -i generates a temporary and you can't apply ++ on a temporary(generated as a result of an rvalue expression). Pre increment ++ requires its operand to be an lvalue, -i isn't an lvalue so you get the error. | lvalue required as increment operand error #include int main() { int i = 10; printf("%d\n", ++(-i)); // <-- Error Here } What is wrong with ++(-i)? Please clarify. | TITLE:
lvalue required as increment operand error
QUESTION:
#include int main() { int i = 10; printf("%d\n", ++(-i)); // <-- Error Here } What is wrong with ++(-i)? Please clarify.
ANSWER:
-i generates a temporary and you can't apply ++ on a temporary(generated as a result of an rvalue expression). Pre increment ++ r... | [
"c++",
"c",
"operators",
"lvalue",
"rvalue"
] | 9 | 10 | 9,991 | 4 | 0 | 2011-06-03T17:03:21.660000 | 2011-06-03T17:04:41.927000 |
6,230,277 | 6,237,618 | Can I customize text on jqGrid search options on per-column basis? | So, in my ASP.NET MVC 3 app, I've got pages with jqGrids on them. I've customized the search operations on a per-column basis like so: colModel: [ { name: 'IceCreamName', index: 'IceCreamName', align: 'left', searchoptions: {sopt: ['eq', 'ne', 'cn']} },... { name: 'InitialDate', index: 'InitialDate', align: 'left', sea... | You don't wrote which version of jqGrid you use, so I suppose that you use the last 4.0.0 version of jqGrid. There are no jqGrid option of couse which can make searching dialog like you as want. I find your question very interesting, so I extended the code of my this and this old answers so that it do wat you need. The... | Can I customize text on jqGrid search options on per-column basis? So, in my ASP.NET MVC 3 app, I've got pages with jqGrids on them. I've customized the search operations on a per-column basis like so: colModel: [ { name: 'IceCreamName', index: 'IceCreamName', align: 'left', searchoptions: {sopt: ['eq', 'ne', 'cn']} },... | TITLE:
Can I customize text on jqGrid search options on per-column basis?
QUESTION:
So, in my ASP.NET MVC 3 app, I've got pages with jqGrids on them. I've customized the search operations on a per-column basis like so: colModel: [ { name: 'IceCreamName', index: 'IceCreamName', align: 'left', searchoptions: {sopt: ['eq... | [
"asp.net-mvc",
"jqgrid"
] | 1 | 1 | 3,066 | 1 | 0 | 2011-06-03T17:03:44.807000 | 2011-06-04T15:29:15.257000 |
6,230,284 | 6,230,321 | PHP pass a string containing quotations via GET | I am trying to pass a string that already contains quotation marks from one php file to another via a hyperlink and the GET method. I am retrieving thousands of lines which contain quotation marks in a while loop and saving the output to a variable as follows: while ($trouble_row = mysql_fetch_array($trouble_result)) {... | For parameters in links, you need to use urlencode(): echo ' Export to CSV '; note however that GET requests have length limits starting in the 1-2k area (depending on browser and server). Alternative approaches: Forms One method that is immune to length limits is creating a element for each link with method="post" and... | PHP pass a string containing quotations via GET I am trying to pass a string that already contains quotation marks from one php file to another via a hyperlink and the GET method. I am retrieving thousands of lines which contain quotation marks in a while loop and saving the output to a variable as follows: while ($tro... | TITLE:
PHP pass a string containing quotations via GET
QUESTION:
I am trying to pass a string that already contains quotation marks from one php file to another via a hyperlink and the GET method. I am retrieving thousands of lines which contain quotation marks in a while loop and saving the output to a variable as fo... | [
"php",
"hyperlink",
"get"
] | 1 | 8 | 5,133 | 5 | 0 | 2011-06-03T17:04:19.660000 | 2011-06-03T17:07:24.513000 |
6,230,288 | 6,230,534 | Am I converting local space to world space coordinates properly? | I'm trying to create a bone and IK system. Below is the method that is recursive and that calculates the absolute positions and absolute angles of each bone. I call it with the root bone and zero'd parameters. It works fine, but when I try to use CCD IK I get discrepancies between the resulting end point and the calcul... | This looks wrong. float vecX = sin(realStartAngle); float vecY = cos(realStartAngle); Swap sin() and cos(). float vecX = cos(realStartAngle); float vecY = sin(realStartAngle); | Am I converting local space to world space coordinates properly? I'm trying to create a bone and IK system. Below is the method that is recursive and that calculates the absolute positions and absolute angles of each bone. I call it with the root bone and zero'd parameters. It works fine, but when I try to use CCD IK I... | TITLE:
Am I converting local space to world space coordinates properly?
QUESTION:
I'm trying to create a bone and IK system. Below is the method that is recursive and that calculates the absolute positions and absolute angles of each bone. I call it with the root bone and zero'd parameters. It works fine, but when I t... | [
"c++",
"algorithm",
"coordinates"
] | 0 | 1 | 986 | 1 | 0 | 2011-06-03T17:04:33.190000 | 2011-06-03T17:29:20.930000 |
6,230,301 | 6,231,513 | Javascript / jQuery - Goto URL based on Drop Down Selections | I have 3 drop down boxes and a go button. I need to goto a URL that is built based on what is selected in the 3 URL boxes - here is an example of my code. http:// ftp:// https:// google yahoo bbc hotmail.com.net.co.uk So, for example, if a user selects http:// + yahoo +.net - then hits a "Go" button, they would be sent... | var d1 = $("#dd1").find(":selected").attr("value"); var d2 = $("#dd2").find(":selected").attr("value"); var d3 = $("#dd3").find(":selected").attr("value");
location.href = d1+d2+d3+""; | Javascript / jQuery - Goto URL based on Drop Down Selections I have 3 drop down boxes and a go button. I need to goto a URL that is built based on what is selected in the 3 URL boxes - here is an example of my code. http:// ftp:// https:// google yahoo bbc hotmail.com.net.co.uk So, for example, if a user selects http:/... | TITLE:
Javascript / jQuery - Goto URL based on Drop Down Selections
QUESTION:
I have 3 drop down boxes and a go button. I need to goto a URL that is built based on what is selected in the 3 URL boxes - here is an example of my code. http:// ftp:// https:// google yahoo bbc hotmail.com.net.co.uk So, for example, if a u... | [
"javascript",
"jquery",
"build",
"conditional-statements"
] | 1 | 0 | 2,603 | 5 | 0 | 2011-06-03T17:05:30.740000 | 2011-06-03T19:04:32.393000 |
6,230,303 | 6,230,337 | jQuery clear Values in a Div | I have a DIV that contains many input text. I need a way in jQuery 1.3.2 to clear all the values inside the inputs onclick. So when I click on a specific link all the values of the inputs inside that DIV will be cleared. I do not have any sample code, I just need to know if there is a way to clear all the values of inp... | yes there is html like this then jQuery $('#div_id input[type="text"]').val(''); working demo | jQuery clear Values in a Div I have a DIV that contains many input text. I need a way in jQuery 1.3.2 to clear all the values inside the inputs onclick. So when I click on a specific link all the values of the inputs inside that DIV will be cleared. I do not have any sample code, I just need to know if there is a way t... | TITLE:
jQuery clear Values in a Div
QUESTION:
I have a DIV that contains many input text. I need a way in jQuery 1.3.2 to clear all the values inside the inputs onclick. So when I click on a specific link all the values of the inputs inside that DIV will be cleared. I do not have any sample code, I just need to know i... | [
"html",
"jquery"
] | 3 | 7 | 34,501 | 6 | 0 | 2011-06-03T17:05:56.803000 | 2011-06-03T17:08:54.100000 |
6,230,304 | 6,230,470 | WCF - Array or Collection (are they both interoperable)? | Basically, are they both interoperable or is it just the array that is? | They're both projected the same in the WSDL, so you can use one in the client and another in the server without problems. Both T[], Collection and List are considered "the same" as far as WCF is concerned. | WCF - Array or Collection (are they both interoperable)? Basically, are they both interoperable or is it just the array that is? | TITLE:
WCF - Array or Collection (are they both interoperable)?
QUESTION:
Basically, are they both interoperable or is it just the array that is?
ANSWER:
They're both projected the same in the WSDL, so you can use one in the client and another in the server without problems. Both T[], Collection and List are consider... | [
"arrays",
"wcf",
"collections",
"interop",
"wcf-interoperability"
] | 0 | 2 | 168 | 1 | 0 | 2011-06-03T17:05:58.543000 | 2011-06-03T17:22:01.780000 |
6,230,310 | 6,230,389 | What amount of data does select (2) guarantee to be able to be written to a file without blocking | select (2) (amongst other things) tells me whether I can write to a fd of a file without blocking. However, does it guarentee me that I can write a full 4096 bytes without blocking? Note I am interested in normal files on disk. Not sockets or the like. In other words: does select signal when we can just write one singl... | Whenever select() indicates that your file is ready, you can try writing N bytes, for any N>0. write() will return the number of bytes actually written. If it equals N, you can write again. If it's less than N, then the next write will block. Note Normal files on disk don't block. Sockets, pipes and terminals do. | What amount of data does select (2) guarantee to be able to be written to a file without blocking select (2) (amongst other things) tells me whether I can write to a fd of a file without blocking. However, does it guarentee me that I can write a full 4096 bytes without blocking? Note I am interested in normal files on ... | TITLE:
What amount of data does select (2) guarantee to be able to be written to a file without blocking
QUESTION:
select (2) (amongst other things) tells me whether I can write to a fd of a file without blocking. However, does it guarentee me that I can write a full 4096 bytes without blocking? Note I am interested i... | [
"c",
"linux",
"select",
"system-calls"
] | 2 | 3 | 189 | 4 | 0 | 2011-06-03T17:06:41.350000 | 2011-06-03T17:14:09.090000 |
6,230,323 | 6,231,024 | Modifying htmlpurifier allowed tags for this markup | My html purifier settings now allow only these tags $configuration->set('HTML.Allowed', 'p,ul,ol,li'); I want to allow indentation of lists and my editor uses this html How should I change my HTMLPurifier Allowed tags? I thought to add style, but I think it would be better to specify exactly which style is allowed, whi... | Allow the style attributes, and then modify the allowed CSS attributes using %CSS.AllowedProperties. $configuration->set('HTML.Allowed', 'p,ul[style],ol,li'); $configuration->set('CSS.AllowedProperties', 'margin-left'); | Modifying htmlpurifier allowed tags for this markup My html purifier settings now allow only these tags $configuration->set('HTML.Allowed', 'p,ul,ol,li'); I want to allow indentation of lists and my editor uses this html How should I change my HTMLPurifier Allowed tags? I thought to add style, but I think it would be b... | TITLE:
Modifying htmlpurifier allowed tags for this markup
QUESTION:
My html purifier settings now allow only these tags $configuration->set('HTML.Allowed', 'p,ul,ol,li'); I want to allow indentation of lists and my editor uses this html How should I change my HTMLPurifier Allowed tags? I thought to add style, but I t... | [
"php",
"xss",
"htmlpurifier"
] | 6 | 19 | 9,192 | 4 | 0 | 2011-06-03T17:07:27.583000 | 2011-06-03T18:15:07.193000 |
6,230,330 | 6,230,427 | After submit make ajax call! | I won't to write some values into database with ajax on submit event, after that I want to query the database (with ajax) once again to check for some response that will be written after the first ajax action. Last, if the response values are "ok" then I want to refresh the page, else I will make the query 2 secs latte... | If I have this correctly, you are using ajax to submit the form and want to do the check on callback. $.ajax({ url: '/path/to/file', type: 'POST', dataType: 'xml/html/script/json/jsonp', data: {param1: 'value1'}, complete: function(xhr, textStatus) { //called when complete }, success: function(data, textStatus, xhr) { ... | After submit make ajax call! I won't to write some values into database with ajax on submit event, after that I want to query the database (with ajax) once again to check for some response that will be written after the first ajax action. Last, if the response values are "ok" then I want to refresh the page, else I wil... | TITLE:
After submit make ajax call!
QUESTION:
I won't to write some values into database with ajax on submit event, after that I want to query the database (with ajax) once again to check for some response that will be written after the first ajax action. Last, if the response values are "ok" then I want to refresh th... | [
"javascript",
"jquery",
"ajax"
] | 0 | 0 | 1,351 | 4 | 0 | 2011-06-03T17:08:13.727000 | 2011-06-03T17:17:02.583000 |
6,230,348 | 6,230,461 | Array new methods | Array.prototype.push8 = function (num) { this.push(num & 0xFF); };
Array.prototype.push16 = function (num) { this.push((num >> 8) & 0xFF, (num ) & 0xFF ); }; Array.prototype.push32 = function (num) { this.push((num >> 24) & 0xFF, (num >> 16) & 0xFF, (num >> 8) & 0xFF, (num ) & 0xFF ); }; What does this code mean?? fro... | This is the methods to pack numbers in array. Consider array as a sequence of bytes. Then push8 will add the lowest 8 bits of number to the one cell of array, push16 will add the lowest 16 bits to the to cells of array and push32 will do the same with 32 bits of number and 4 array's cells. push8(256); 259 = 0000 0001 0... | Array new methods Array.prototype.push8 = function (num) { this.push(num & 0xFF); };
Array.prototype.push16 = function (num) { this.push((num >> 8) & 0xFF, (num ) & 0xFF ); }; Array.prototype.push32 = function (num) { this.push((num >> 24) & 0xFF, (num >> 16) & 0xFF, (num >> 8) & 0xFF, (num ) & 0xFF ); }; What does th... | TITLE:
Array new methods
QUESTION:
Array.prototype.push8 = function (num) { this.push(num & 0xFF); };
Array.prototype.push16 = function (num) { this.push((num >> 8) & 0xFF, (num ) & 0xFF ); }; Array.prototype.push32 = function (num) { this.push((num >> 24) & 0xFF, (num >> 16) & 0xFF, (num >> 8) & 0xFF, (num ) & 0xFF ... | [
"javascript",
"arrays"
] | 1 | 2 | 272 | 3 | 0 | 2011-06-03T17:09:58.547000 | 2011-06-03T17:20:47.370000 |
6,230,349 | 6,230,410 | How to validate expression on button click in asp.net C# | I am making a website and I have made a form fields like email field and validation expressions associated with it. Validation is initiated on text change. But i want it t execute on "submit" button click event. I have searched but could not locate the solution to my problem. Please tel me why is this happening and how... | You could disable showing errors in the validator itself and instead make a validation summary which will be shown only after you click submit. Like this: and then declare a validation summary: | How to validate expression on button click in asp.net C# I am making a website and I have made a form fields like email field and validation expressions associated with it. Validation is initiated on text change. But i want it t execute on "submit" button click event. I have searched but could not locate the solution t... | TITLE:
How to validate expression on button click in asp.net C#
QUESTION:
I am making a website and I have made a form fields like email field and validation expressions associated with it. Validation is initiated on text change. But i want it t execute on "submit" button click event. I have searched but could not loc... | [
"c#",
"asp.net",
"html"
] | 3 | 6 | 17,581 | 6 | 0 | 2011-06-03T17:10:32.117000 | 2011-06-03T17:15:34.713000 |
6,230,350 | 6,230,632 | Keeping std::list iterators valid through insertion | Note: This is not a question whether I should "use list or deque". It's a question about the validity of iterators in the face of insert(). This may be a simple question and I'm just too dense to see the right way to do this. I'm implementing (for better or worse) a network traffic buffer as a std::list buf, and I'm ma... | if (readpos == buf.begin()) { buf.insert(buf.end(), newdata.begin(), newdata.end()); readpos = buf.begin(); } else { --readpos; buf.insert(buf.end(), newdata.begin(), newdata.end()); ++readpos; } Not elegant, but it should work. | Keeping std::list iterators valid through insertion Note: This is not a question whether I should "use list or deque". It's a question about the validity of iterators in the face of insert(). This may be a simple question and I'm just too dense to see the right way to do this. I'm implementing (for better or worse) a n... | TITLE:
Keeping std::list iterators valid through insertion
QUESTION:
Note: This is not a question whether I should "use list or deque". It's a question about the validity of iterators in the face of insert(). This may be a simple question and I'm just too dense to see the right way to do this. I'm implementing (for be... | [
"c++",
"iterator",
"stdlist"
] | 7 | 5 | 7,736 | 4 | 0 | 2011-06-03T17:10:34.037000 | 2011-06-03T17:38:01.560000 |
6,230,352 | 6,231,100 | Socket.io and session data | Is this a suitable way of storing my temporary app data? socket.on('connection', function(client){ client.myappsdata = { a: true, b: false } } | I prefer something slightly more heavy. Pseudo-Code: // ClientManager.js var Manager = new function() { this._clients = [];
this.set = function(client, data) { this._clients[client.sessionId] = data; };
this.get = function(client) { return this._clients[client.sessionId]; }
};
module.exports = function() { return O... | Socket.io and session data Is this a suitable way of storing my temporary app data? socket.on('connection', function(client){ client.myappsdata = { a: true, b: false } } | TITLE:
Socket.io and session data
QUESTION:
Is this a suitable way of storing my temporary app data? socket.on('connection', function(client){ client.myappsdata = { a: true, b: false } }
ANSWER:
I prefer something slightly more heavy. Pseudo-Code: // ClientManager.js var Manager = new function() { this._clients = [];... | [
"session",
"node.js",
"socket.io"
] | 6 | 9 | 1,917 | 1 | 0 | 2011-06-03T17:10:37.820000 | 2011-06-03T18:22:44.973000 |
6,230,353 | 6,230,510 | how to create gif animation from a stack of jpgs | I have around 200 jpg images. I need to stack them so that i can convert them into a simple animated gif image. Are there any free tools available to do that job? My os is windows. I'm not so bothered about the quality of the output. | Might want to look at GiftedMotion: http://www.onyxbits.de/giftedmotion | how to create gif animation from a stack of jpgs I have around 200 jpg images. I need to stack them so that i can convert them into a simple animated gif image. Are there any free tools available to do that job? My os is windows. I'm not so bothered about the quality of the output. | TITLE:
how to create gif animation from a stack of jpgs
QUESTION:
I have around 200 jpg images. I need to stack them so that i can convert them into a simple animated gif image. Are there any free tools available to do that job? My os is windows. I'm not so bothered about the quality of the output.
ANSWER:
Might want... | [
"gif",
"jpeg",
"animated-gif"
] | 17 | 5 | 45,590 | 5 | 0 | 2011-06-03T17:10:47.577000 | 2011-06-03T17:27:05.363000 |
6,230,357 | 6,230,911 | Error in data-binding database to web form | i am a beginner in making website, i learned things at msdn only, but now when i try to make a very simple Website, i am having this error "Unable to find the requested.Net Framework Data Provider. It may not be installed." https://i.stack.imgur.com/RV5qY.jpg steps followed to create the web site > New WebSite>Empty We... | For a web site, you should be using SQL Server Express, not SQL Server Compact Edition. SQL Server Compact Edition is designed for standalone, single-user scenarios. ASP.NET is looking for the SQL Server Express drivers and not finding them. I suggest uninstalling SQL Server Compact Edition, then installing SQL Server ... | Error in data-binding database to web form i am a beginner in making website, i learned things at msdn only, but now when i try to make a very simple Website, i am having this error "Unable to find the requested.Net Framework Data Provider. It may not be installed." https://i.stack.imgur.com/RV5qY.jpg steps followed to... | TITLE:
Error in data-binding database to web form
QUESTION:
i am a beginner in making website, i learned things at msdn only, but now when i try to make a very simple Website, i am having this error "Unable to find the requested.Net Framework Data Provider. It may not be installed." https://i.stack.imgur.com/RV5qY.jpg... | [
".net",
"asp.net",
"sql-server",
"visual-studio-2010",
"data-binding"
] | 0 | 1 | 575 | 2 | 0 | 2011-06-03T17:11:46.253000 | 2011-06-03T18:04:34.890000 |
6,230,358 | 6,230,419 | PHP long decimal number issue | Im parsing xml using php and one of my variables receive a long decimal value. $ctr = 0.00529440333938; But I need to make this number as 0.52%, so I tried multiplying by 100 and forcing just 2 decimals. $real_ctr = $ctr * 100; echo number_format($real_ctr, 2). "%"; I get as result 0.00% instead 0f 0.52% And then I tri... | It seams $ctr what you get from the XML parser is a string. Use: $ctr = floatval($ctr); // or (double)$ctr; or (float)$ctr; to make sure your variable is a float. | PHP long decimal number issue Im parsing xml using php and one of my variables receive a long decimal value. $ctr = 0.00529440333938; But I need to make this number as 0.52%, so I tried multiplying by 100 and forcing just 2 decimals. $real_ctr = $ctr * 100; echo number_format($real_ctr, 2). "%"; I get as result 0.00% i... | TITLE:
PHP long decimal number issue
QUESTION:
Im parsing xml using php and one of my variables receive a long decimal value. $ctr = 0.00529440333938; But I need to make this number as 0.52%, so I tried multiplying by 100 and forcing just 2 decimals. $real_ctr = $ctr * 100; echo number_format($real_ctr, 2). "%"; I get... | [
"php",
"long-integer",
"number-formatting"
] | 1 | 2 | 2,108 | 4 | 0 | 2011-06-03T17:11:47.680000 | 2011-06-03T17:16:13.237000 |
6,230,362 | 6,230,414 | Oracle query cast attribute | I am trying to convert a decimal to text. Every time I try to cast, it converts the number this way: number: converted: --------------------- 0.1234.1234 I tried using TO_CHAR, but without success. | Use the second format parameter of TO_CHAR function. Try something like: SELECT TO_CHAR(0.1234, '00000000.00') FROM DUAL | Oracle query cast attribute I am trying to convert a decimal to text. Every time I try to cast, it converts the number this way: number: converted: --------------------- 0.1234.1234 I tried using TO_CHAR, but without success. | TITLE:
Oracle query cast attribute
QUESTION:
I am trying to convert a decimal to text. Every time I try to cast, it converts the number this way: number: converted: --------------------- 0.1234.1234 I tried using TO_CHAR, but without success.
ANSWER:
Use the second format parameter of TO_CHAR function. Try something ... | [
"sql",
"oracle",
"string"
] | 0 | 5 | 106 | 1 | 0 | 2011-06-03T17:11:57.343000 | 2011-06-03T17:15:53.887000 |
6,230,363 | 6,230,437 | How to draw a circle sector on an html5 canvas? | I'm trying to make a sort of pie-chart shape on a canvas element, however I can't seem to find any function that does this by itself. I only seem to be able to draw full circles and segments. Is there an easy way to do this? (See also: Wikipedia on circle terminology ) | The following should work: context.moveTo(cx,cy); context.arc(cx,cy,radius,startangle,endangle); context.lineTo(cx,cy); context.stroke(); // or context.fill() with cx, cy being the center of the arc. | How to draw a circle sector on an html5 canvas? I'm trying to make a sort of pie-chart shape on a canvas element, however I can't seem to find any function that does this by itself. I only seem to be able to draw full circles and segments. Is there an easy way to do this? (See also: Wikipedia on circle terminology ) | TITLE:
How to draw a circle sector on an html5 canvas?
QUESTION:
I'm trying to make a sort of pie-chart shape on a canvas element, however I can't seem to find any function that does this by itself. I only seem to be able to draw full circles and segments. Is there an easy way to do this? (See also: Wikipedia on circl... | [
"html",
"canvas",
"geometry",
"geometric-arc",
"sector"
] | 20 | 39 | 23,470 | 1 | 0 | 2011-06-03T17:11:59.987000 | 2011-06-03T17:18:15.573000 |
6,230,371 | 6,230,387 | Hide Gridview Data but still accessible | I use a gridview to query a DB and pull out results. The View then places the results in the view on the page. I then use a JS function to grab the data. Is there anyway can hide the gridview but still have the data on the page html side? | How do you mean "hide"? You can always use CSS to set the display to none. The GridView would still be on the page in HTML but not visible to the user. document.getElementById('myGridID').style.display = 'none'; | Hide Gridview Data but still accessible I use a gridview to query a DB and pull out results. The View then places the results in the view on the page. I then use a JS function to grab the data. Is there anyway can hide the gridview but still have the data on the page html side? | TITLE:
Hide Gridview Data but still accessible
QUESTION:
I use a gridview to query a DB and pull out results. The View then places the results in the view on the page. I then use a JS function to grab the data. Is there anyway can hide the gridview but still have the data on the page html side?
ANSWER:
How do you mea... | [
"javascript",
"vb.net"
] | 0 | 0 | 247 | 2 | 0 | 2011-06-03T17:12:31.570000 | 2011-06-03T17:14:05.500000 |
6,230,372 | 6,230,438 | Linq Edit ListView | im trying to edit a field using code instead of the wizard. im not entirely sure if the code i have is correct to update the field. here is the code i have to edit the field: Protected Sub ListView1_ItemEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.ListViewEditEventArgs) Handles ListView1.ItemEdi... | The framework is preventing you from posting html code as a security measure. This can be turned off for the current page by adding a page directive. <%@ Page validateRequest="false" %> The other option is to use javascript on the client side to change '<' to < and '>' to > and '&' to & before posting. Then on the serv... | Linq Edit ListView im trying to edit a field using code instead of the wizard. im not entirely sure if the code i have is correct to update the field. here is the code i have to edit the field: Protected Sub ListView1_ItemEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.ListViewEditEventArgs) Handle... | TITLE:
Linq Edit ListView
QUESTION:
im trying to edit a field using code instead of the wizard. im not entirely sure if the code i have is correct to update the field. here is the code i have to edit the field: Protected Sub ListView1_ItemEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.ListViewEdi... | [
"asp.net",
"linq",
"listview"
] | 0 | 1 | 441 | 1 | 0 | 2011-06-03T17:12:38.160000 | 2011-06-03T17:18:20.073000 |
6,230,374 | 6,234,742 | Remove Users from MailList based on Bounce Message | What is the best way to figure out which email users can be removed from their bounce mail message? Example being a bounce mail error code of 5.1.1, where the mailbox no longer exists. I'm using the mbox file format from Thunderbird. My ideas include searching for Status: 5.1.1 then looking ~2 lines down to see the X-D... | One way you handle bounces is the way the ezmlm bounce handler does it. It sends a series of bounce messages to the address that bounced to test whether the bounce was temporary or permanent. They describe their technique in a fair bit of detail on their Bounces and Automated Bounce Handling help page. There is Jason R... | Remove Users from MailList based on Bounce Message What is the best way to figure out which email users can be removed from their bounce mail message? Example being a bounce mail error code of 5.1.1, where the mailbox no longer exists. I'm using the mbox file format from Thunderbird. My ideas include searching for Stat... | TITLE:
Remove Users from MailList based on Bounce Message
QUESTION:
What is the best way to figure out which email users can be removed from their bounce mail message? Example being a bounce mail error code of 5.1.1, where the mailbox no longer exists. I'm using the mbox file format from Thunderbird. My ideas include ... | [
"email",
"delphi",
"email-bounces"
] | 3 | 3 | 345 | 2 | 0 | 2011-06-03T17:12:45.307000 | 2011-06-04T04:42:59.733000 |
6,230,376 | 6,230,656 | Why virtual function can't be unimplemented when allocated with 'new'? | struct A { virtual void foo(); // unused and unimplemented virtual void bar () {} };
int main () { A obj; // ok obj.bar(); // <-- added this edition A* pm = (A*)malloc(sizeof(A)); // ok A* pn = new A; // linker error } For objects on stack it works fine. But for allocation on heap with new (not malloc ), it gives link... | Firstly, this code is not compilable, since in C++ void * cannot be implicitly converted to A *. An explicit cast is required. Secondly, the example with malloc is completely irrelevant. malloc allocates raw memory, with has absolutely no relation to any specific types. In this case malloc knows noting about any A and ... | Why virtual function can't be unimplemented when allocated with 'new'? struct A { virtual void foo(); // unused and unimplemented virtual void bar () {} };
int main () { A obj; // ok obj.bar(); // <-- added this edition A* pm = (A*)malloc(sizeof(A)); // ok A* pn = new A; // linker error } For objects on stack it works... | TITLE:
Why virtual function can't be unimplemented when allocated with 'new'?
QUESTION:
struct A { virtual void foo(); // unused and unimplemented virtual void bar () {} };
int main () { A obj; // ok obj.bar(); // <-- added this edition A* pm = (A*)malloc(sizeof(A)); // ok A* pn = new A; // linker error } For objects... | [
"c++",
"linker-errors",
"language-lawyer",
"virtual-functions"
] | 8 | 6 | 1,652 | 5 | 0 | 2011-06-03T17:12:50.383000 | 2011-06-03T17:41:06.767000 |
6,230,379 | 6,230,676 | Z-Index : Internet Explorer (Z Ordering) | I am working with: http://glustik.com/essex/index.php And I am having trouble Z-Indexing the main logo to the front only in IE:7. I have placed the large image div with a index of 5 and the logo with an index of 35. I am not sure what would be making this happen? Any Help? James | Try adding a negative z-index to the elements it should be overlapping. I added z-index:-1 to #topFrame and position:relative and z-index:-2 to #midFrame EDIT: Adding a higher z-index to #header also seems to work, as suggested by Jrod in a comment. | Z-Index : Internet Explorer (Z Ordering) I am working with: http://glustik.com/essex/index.php And I am having trouble Z-Indexing the main logo to the front only in IE:7. I have placed the large image div with a index of 5 and the logo with an index of 35. I am not sure what would be making this happen? Any Help? James | TITLE:
Z-Index : Internet Explorer (Z Ordering)
QUESTION:
I am working with: http://glustik.com/essex/index.php And I am having trouble Z-Indexing the main logo to the front only in IE:7. I have placed the large image div with a index of 5 and the logo with an index of 35. I am not sure what would be making this happe... | [
"html",
"css",
"internet-explorer-7",
"z-index"
] | 1 | 1 | 147 | 3 | 0 | 2011-06-03T17:13:05.510000 | 2011-06-03T17:42:37.283000 |
6,230,395 | 6,270,737 | How to prevent triggering of other events when closing a JPopupMenu by clicking outside it? | There are some properties of the right-click context menu I would like to replicate with a JPopupMenu: When menu is open and you click elsewhere, menu closes. When menu is open and you click elsewhere, nothing else happens. I've got the first part down just fine. But when I click elsewhere, other events can occur. For ... | Taking into account what was said in your question and comments, I would approach your problem in one of the following ways. Technically you have two options here: 1.Hide the popup whenever user moves the mouse outside of the popup. This way you do not have the problem of user clicking since the popup will disappear it... | How to prevent triggering of other events when closing a JPopupMenu by clicking outside it? There are some properties of the right-click context menu I would like to replicate with a JPopupMenu: When menu is open and you click elsewhere, menu closes. When menu is open and you click elsewhere, nothing else happens. I've... | TITLE:
How to prevent triggering of other events when closing a JPopupMenu by clicking outside it?
QUESTION:
There are some properties of the right-click context menu I would like to replicate with a JPopupMenu: When menu is open and you click elsewhere, menu closes. When menu is open and you click elsewhere, nothing ... | [
"java",
"swing",
"menu",
"jpopupmenu"
] | 6 | 4 | 2,759 | 2 | 0 | 2011-06-03T17:14:32.137000 | 2011-06-07T19:45:08.333000 |
6,230,396 | 6,233,202 | running executable (windows) file inside ocaml | Quick question. How to run an executable file in ocaml? I believe this is possible, but I don't know how. Please provide an example code. | If you just want to run a program and not communicate with it, use Sys.command. let exit_code = Sys.command "c:\\path\\to\\executable.exe /argument" in (* if exit_code=0, the command succeeded. Otherwise it failed. *) For more complex cases, you need to use the functions in the Unix module. Despite the name, most of th... | running executable (windows) file inside ocaml Quick question. How to run an executable file in ocaml? I believe this is possible, but I don't know how. Please provide an example code. | TITLE:
running executable (windows) file inside ocaml
QUESTION:
Quick question. How to run an executable file in ocaml? I believe this is possible, but I don't know how. Please provide an example code.
ANSWER:
If you just want to run a program and not communicate with it, use Sys.command. let exit_code = Sys.command ... | [
"ocaml",
"exe"
] | 3 | 6 | 726 | 1 | 0 | 2011-06-03T17:14:42.973000 | 2011-06-03T22:17:44.170000 |
6,230,398 | 6,252,742 | Installing a file to the GAC through a Sharepoint 2007 WSP package | I'm creating a WSP package in Visual Studio 2010 to deploy my feature to the sharepoint 2007 environment on a Windows 2003 Server box. Currently, the xml file that references the assembly containing the code I have written is referenced from the GAC. What I'd like to do is make it so this WSP file will add the dll to t... | Solution: If you are packaging your wsp manually, then you need to include your dll in your DDF file, bin\Debug\MyFile.dll MyFile.dll and you include the assembly in the solution manifest, e.g. MSDN Reference | Installing a file to the GAC through a Sharepoint 2007 WSP package I'm creating a WSP package in Visual Studio 2010 to deploy my feature to the sharepoint 2007 environment on a Windows 2003 Server box. Currently, the xml file that references the assembly containing the code I have written is referenced from the GAC. Wh... | TITLE:
Installing a file to the GAC through a Sharepoint 2007 WSP package
QUESTION:
I'm creating a WSP package in Visual Studio 2010 to deploy my feature to the sharepoint 2007 environment on a Windows 2003 Server box. Currently, the xml file that references the assembly containing the code I have written is reference... | [
"sharepoint",
"deployment"
] | 1 | 0 | 1,147 | 2 | 0 | 2011-06-03T17:14:45.267000 | 2011-06-06T13:30:08.083000 |
6,230,399 | 6,230,506 | Forking a new version of my application | I am looking for some ideas as to how to branch my application so as to have a feature limited version of it. Let me give a hypothetical. Lets say my desktop app interacts with all web browsers. I get into a partnership with the guys at Google Chrome who want to release a version of my app that works ONLY with their br... | If you fix something in your full program then you'll obviously run your build script to check for regression bugs right? So maybe a targeted build script could be an option. I'd say that or look into adapting the use of flags (the guys at Asana are big fans ). | Forking a new version of my application I am looking for some ideas as to how to branch my application so as to have a feature limited version of it. Let me give a hypothetical. Lets say my desktop app interacts with all web browsers. I get into a partnership with the guys at Google Chrome who want to release a version... | TITLE:
Forking a new version of my application
QUESTION:
I am looking for some ideas as to how to branch my application so as to have a feature limited version of it. Let me give a hypothetical. Lets say my desktop app interacts with all web browsers. I get into a partnership with the guys at Google Chrome who want to... | [
"git",
"version-control",
"branch",
"fork"
] | 0 | 1 | 103 | 4 | 0 | 2011-06-03T17:14:46.787000 | 2011-06-03T17:26:35.947000 |
6,230,420 | 6,230,468 | C# Insert directory structure into a rich text box on form | private void button6_Click(object sender, EventArgs e) { string[] filePaths = Directory.GetFiles(@"c:\MyDir\"); } And I have a RichTextBox: private void richTextBox4_TextChanged(object sender, EventArgs e) { } How can I return / output the data from the method into the RichTextBox? | Once you get the filenames, you can use Enumerable.Aggregate to turn them into a string and set that string as the text for the Rich Text Box: private void button6_Click(object sender, EventArgs e) { richTextBox4.Text = Directory.GetFiles(@"C:\MyDir\").Aggregate("", (text, pathName) => text += String.Format("{0}\n", pa... | C# Insert directory structure into a rich text box on form private void button6_Click(object sender, EventArgs e) { string[] filePaths = Directory.GetFiles(@"c:\MyDir\"); } And I have a RichTextBox: private void richTextBox4_TextChanged(object sender, EventArgs e) { } How can I return / output the data from the method ... | TITLE:
C# Insert directory structure into a rich text box on form
QUESTION:
private void button6_Click(object sender, EventArgs e) { string[] filePaths = Directory.GetFiles(@"c:\MyDir\"); } And I have a RichTextBox: private void richTextBox4_TextChanged(object sender, EventArgs e) { } How can I return / output the dat... | [
"c#",
".net",
"richtextbox"
] | 1 | 2 | 723 | 3 | 0 | 2011-06-03T17:16:17.717000 | 2011-06-03T17:21:34.750000 |
6,230,428 | 6,230,467 | jQuery Dollar Sign Confusion | I'm a bit confused regarding the dollar sign in jQuery, and was hoping someone could help me out. I have the following function declaration: $(function() { $( "#create-discussion" ).button().click(function() { alert("Clicked"); });
$( "#listitems tr" ).click(function(event) { alert("clicked"); }); }); For some reason,... | A dollar sign ( $ ) is actually an alias for jQuery function. And according to the documentation, if you pass a callback as an argument to this function, it will be executed when the DOM is ready. When it comes to the second part of your question (about why the second part of the code is not working): just check the se... | jQuery Dollar Sign Confusion I'm a bit confused regarding the dollar sign in jQuery, and was hoping someone could help me out. I have the following function declaration: $(function() { $( "#create-discussion" ).button().click(function() { alert("Clicked"); });
$( "#listitems tr" ).click(function(event) { alert("clicke... | TITLE:
jQuery Dollar Sign Confusion
QUESTION:
I'm a bit confused regarding the dollar sign in jQuery, and was hoping someone could help me out. I have the following function declaration: $(function() { $( "#create-discussion" ).button().click(function() { alert("Clicked"); });
$( "#listitems tr" ).click(function(even... | [
"javascript",
"jquery",
"events",
"onclick",
"dollar-sign"
] | 10 | 13 | 10,945 | 2 | 0 | 2011-06-03T17:17:03.280000 | 2011-06-03T17:21:25.197000 |
6,230,432 | 6,236,063 | Is there a way to use git-svn to mirror a Git repo to SVN and have the Git tags/branches become SVN tags/branches? | I've played around with using git-svn to mirror a Git repo to an SVN repo, but I can't seem to do more than push the master changes to the SVN repos trunk. Essentially what I've done so far is create an SVN repo with the standard layout (project-name/trunk, project-name/tags, project-name/branches) and then do a 'git s... | With git svn alone, you cannot mirror any Git operation back in the SVN. Only new commits done in mirrored branches can be safely dcommit back to SVN. For a more complete round-trip, you could try git2svn to rebuild a SVN repo. In the meantime, you can study this git svn workflow, even though tags aren't explicitly men... | Is there a way to use git-svn to mirror a Git repo to SVN and have the Git tags/branches become SVN tags/branches? I've played around with using git-svn to mirror a Git repo to an SVN repo, but I can't seem to do more than push the master changes to the SVN repos trunk. Essentially what I've done so far is create an SV... | TITLE:
Is there a way to use git-svn to mirror a Git repo to SVN and have the Git tags/branches become SVN tags/branches?
QUESTION:
I've played around with using git-svn to mirror a Git repo to an SVN repo, but I can't seem to do more than push the master changes to the SVN repos trunk. Essentially what I've done so f... | [
"git",
"git-svn",
"mirror"
] | 3 | 0 | 2,328 | 2 | 0 | 2011-06-03T17:17:54.877000 | 2011-06-04T10:00:59.510000 |
6,230,444 | 6,233,512 | How to install python developer package? | I am trying to get mod_wsgi 3.3 to work. When I run make it is telling me that I am missing the Python developer package. How do I get and install the Python developer package? The error I get is as follows: mod_wsgi.c:135:20: error: Python.h: No such file or directory mod_wsgi.c:138:2: error: #error Sorry, Python deve... | yum install python-devel will work. If yum doesn't work then use apt-get install python-dev | How to install python developer package? I am trying to get mod_wsgi 3.3 to work. When I run make it is telling me that I am missing the Python developer package. How do I get and install the Python developer package? The error I get is as follows: mod_wsgi.c:135:20: error: Python.h: No such file or directory mod_wsgi.... | TITLE:
How to install python developer package?
QUESTION:
I am trying to get mod_wsgi 3.3 to work. When I run make it is telling me that I am missing the Python developer package. How do I get and install the Python developer package? The error I get is as follows: mod_wsgi.c:135:20: error: Python.h: No such file or d... | [
"python",
"linux",
"amazon-ec2",
"mod-wsgi"
] | 54 | 99 | 178,202 | 3 | 0 | 2011-06-03T17:18:57.847000 | 2011-06-03T23:11:47.307000 |
6,230,448 | 6,230,473 | Is it possible to have a templated constructor like 'template<class T> X(){}'? | struct X{ template X(){} }; Is it possible to instantate such a type? | Yes, it is possible to have such a constructor, but it's impossible to call it. All the template parameters of a templated constructor must be deduced from the parameter list or have a default value. In Your example you can't instantiate the class. [temp.mem] [ Note: Because the explicit template argument list follows ... | Is it possible to have a templated constructor like 'template<class T> X(){}'? struct X{ template X(){} }; Is it possible to instantate such a type? | TITLE:
Is it possible to have a templated constructor like 'template<class T> X(){}'?
QUESTION:
struct X{ template X(){} }; Is it possible to instantate such a type?
ANSWER:
Yes, it is possible to have such a constructor, but it's impossible to call it. All the template parameters of a templated constructor must be d... | [
"c++",
"templates",
"constructor"
] | 9 | 12 | 477 | 1 | 0 | 2011-06-03T17:19:15.007000 | 2011-06-03T17:22:16.390000 |
6,230,452 | 6,230,585 | Uniquely identify an email on send using System.Net.Mail | I am looking for a way to uniquely identify an email at the time it is sent using the.NET SmtpClient class (in System.Net.Mail), ie SmtpClient client = new SmtpClient(smtpServer, smtpPort);
client.EnableSsl = false;
MailAddress from = new MailAddress(fromAddress); MailAddress to = new MailAddress(destinationAddress);... | One option is to attach a custom header to the message. Custom headers are indicated with a X- prefix. So in this case, you might create one called X-Unique-Id which would not be overwritten. However, it's not necessarily the case that all mail clients will allow filtering/searching based on custom headers, you'd have ... | Uniquely identify an email on send using System.Net.Mail I am looking for a way to uniquely identify an email at the time it is sent using the.NET SmtpClient class (in System.Net.Mail), ie SmtpClient client = new SmtpClient(smtpServer, smtpPort);
client.EnableSsl = false;
MailAddress from = new MailAddress(fromAddres... | TITLE:
Uniquely identify an email on send using System.Net.Mail
QUESTION:
I am looking for a way to uniquely identify an email at the time it is sent using the.NET SmtpClient class (in System.Net.Mail), ie SmtpClient client = new SmtpClient(smtpServer, smtpPort);
client.EnableSsl = false;
MailAddress from = new Mail... | [
"c#",
".net",
"email",
"smtp",
"guid"
] | 7 | 8 | 8,883 | 3 | 0 | 2011-06-03T17:19:39.437000 | 2011-06-03T17:34:16.107000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.