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,183,575 | 6,183,672 | scrollbar height in jscrollpane (jquery) | I've been messing around for hours now trying to adjust the height of the.jspVerticalBar. it appears that default is setting the height of the bar to 100% of the panes height. does anyone know where to set this? i'm not talking about the draggable portion, but the entire bar. for example currently it's like this::up | ... | Looking at this demo, it seems you need to add "caps" to your scrollbar. So using the example from that page, something like,.jspVerticalBar.jspCap { display: block; height: 20px; } In the example, showArrows:true; is also added to the initialisation of jSrollPane, it's not mentioned whether this is required or not tho... | scrollbar height in jscrollpane (jquery) I've been messing around for hours now trying to adjust the height of the.jspVerticalBar. it appears that default is setting the height of the bar to 100% of the panes height. does anyone know where to set this? i'm not talking about the draggable portion, but the entire bar. fo... | TITLE:
scrollbar height in jscrollpane (jquery)
QUESTION:
I've been messing around for hours now trying to adjust the height of the.jspVerticalBar. it appears that default is setting the height of the bar to 100% of the panes height. does anyone know where to set this? i'm not talking about the draggable portion, but ... | [
"jquery",
"jscrollpane",
"jquery-jscrollpane"
] | 0 | 1 | 2,965 | 1 | 0 | 2011-05-31T06:01:39.960000 | 2011-05-31T06:15:13.863000 |
6,183,581 | 6,183,591 | How to find the speed using x,y,z axis values? | hai,In my application i want to calculate the spped based on x,y,z values.So How to find the speed using x,y,z axis values? | Integrate the acceleration of each axis then add together the velocity vectors, and finally take the magnitude. You now have speed. | How to find the speed using x,y,z axis values? hai,In my application i want to calculate the spped based on x,y,z values.So How to find the speed using x,y,z axis values? | TITLE:
How to find the speed using x,y,z axis values?
QUESTION:
hai,In my application i want to calculate the spped based on x,y,z values.So How to find the speed using x,y,z axis values?
ANSWER:
Integrate the acceleration of each axis then add together the velocity vectors, and finally take the magnitude. You now ha... | [
"iphone"
] | 3 | 3 | 8,819 | 2 | 0 | 2011-05-31T06:02:51.757000 | 2011-05-31T06:03:58.277000 |
6,183,582 | 6,222,912 | Keyboard Focus navigation problem with ElementHost hosted WPF view with WindowsFormsHost hosted controls | I have a keyboard focus problem with Windows Forms application that hosts WPF UserControls. When I press tab, the navigation works well if there are only WPF controls in the UserControl. If I add a WindowsFormsHost hosted control to this WPF UserControl, the focus is not moving away from the WindowsFormsHosted control ... | Thank you for Mark Staff of the knowledge about focusing. The problem was really fixed with OnNoMoreTabStops method. I posted this problem to MSDN forum too and they found the solution for my problem. Here is the link to MSDN forums thread: http://social.msdn.microsoft.com/Forums/en-ZA/wpf/thread/054d8509-dd2d-4b60-9b0... | Keyboard Focus navigation problem with ElementHost hosted WPF view with WindowsFormsHost hosted controls I have a keyboard focus problem with Windows Forms application that hosts WPF UserControls. When I press tab, the navigation works well if there are only WPF controls in the UserControl. If I add a WindowsFormsHost ... | TITLE:
Keyboard Focus navigation problem with ElementHost hosted WPF view with WindowsFormsHost hosted controls
QUESTION:
I have a keyboard focus problem with Windows Forms application that hosts WPF UserControls. When I press tab, the navigation works well if there are only WPF controls in the UserControl. If I add a... | [
"wpf",
"winforms",
"wpf-controls",
"windowsformshost",
"elementhost"
] | 3 | 0 | 5,229 | 2 | 0 | 2011-05-31T06:02:55.113000 | 2011-06-03T04:18:44.913000 |
6,183,584 | 6,183,653 | iphone - do an action while a button is pressed | Say for example i have two volume buttons ( + and - ) How can I implement something such as when holding the + button, it will raise up the volume incrementally at an interval? (I'm only interested in doing an action at an interval while the button is being pressed) | You can use a timer for this. Start the timer when the touch starts. If the timer expires, increase or decrease the volume and restart the timer. When the touch ends, cancel the timer. | iphone - do an action while a button is pressed Say for example i have two volume buttons ( + and - ) How can I implement something such as when holding the + button, it will raise up the volume incrementally at an interval? (I'm only interested in doing an action at an interval while the button is being pressed) | TITLE:
iphone - do an action while a button is pressed
QUESTION:
Say for example i have two volume buttons ( + and - ) How can I implement something such as when holding the + button, it will raise up the volume incrementally at an interval? (I'm only interested in doing an action at an interval while the button is be... | [
"iphone",
"objective-c",
"button"
] | 0 | 4 | 505 | 3 | 0 | 2011-05-31T06:03:29.630000 | 2011-05-31T06:12:32.240000 |
6,183,593 | 6,183,654 | hpricot: get image from URL and parse element | i am trying to get the exact URL of an image inside a page and then download it. i haven't yet gotten to the download point, as i am trying to isolate the URL of the image. here is the code: #!/usr/bin/ruby -w
require 'rubygems' require 'hpricot' require 'open-uri'
raw = Hpricot(open("http://www.amazon.com/Weezer/dp/... | Change this line: img = ele.match("(\")(.*?)(\")").captures To: img = ele[:src] The reason for the errors is that Hpricot:Elem isn't a string. Try: ele.responde.to?:match and you get false. However, you could do: ele.to_s.match("(\")(.*?)(\")").captures[1] the secret is in the to_s | hpricot: get image from URL and parse element i am trying to get the exact URL of an image inside a page and then download it. i haven't yet gotten to the download point, as i am trying to isolate the URL of the image. here is the code: #!/usr/bin/ruby -w
require 'rubygems' require 'hpricot' require 'open-uri'
raw = ... | TITLE:
hpricot: get image from URL and parse element
QUESTION:
i am trying to get the exact URL of an image inside a page and then download it. i haven't yet gotten to the download point, as i am trying to isolate the URL of the image. here is the code: #!/usr/bin/ruby -w
require 'rubygems' require 'hpricot' require ... | [
"ruby",
"regex",
"hpricot"
] | 0 | 1 | 665 | 1 | 0 | 2011-05-31T06:04:01.817000 | 2011-05-31T06:12:57.030000 |
6,183,602 | 6,183,630 | How to determine how big the Request.Form object is? | I am making a web service and a portion of it includes enforcing different maximum form sizes on different pages. Other than running through the Form object and doing a.Length on all of the strings, is there a clean way of quickly determining the size of the submitted form values? Particularly in the context of a POST ... | Is this an ASMX web service? Then what about Request.TotalBytes? | How to determine how big the Request.Form object is? I am making a web service and a portion of it includes enforcing different maximum form sizes on different pages. Other than running through the Form object and doing a.Length on all of the strings, is there a clean way of quickly determining the size of the submitte... | TITLE:
How to determine how big the Request.Form object is?
QUESTION:
I am making a web service and a portion of it includes enforcing different maximum form sizes on different pages. Other than running through the Form object and doing a.Length on all of the strings, is there a clean way of quickly determining the si... | [
"c#",
"asp.net",
"http",
"post"
] | 6 | 2 | 164 | 1 | 0 | 2011-05-31T06:05:11.517000 | 2011-05-31T06:09:26.163000 |
6,183,605 | 6,184,308 | I don't want to move header with VerticalFieldManager, how? | This is my coding, I don't want header to move as i scrolldown the main1, how to do that? VerticalFieldManager main1 = new VerticalFieldManager(Manager.NO_VERTICAL_SCROLL); XmlDataManager xmlData = new XmlDataManager(); BitmapField header = xmlData.getImageFromUrl("http://wiztech.pk/ali/eve/"+bannerData.catg); main1.ad... | Try to add header to MainScreen, not to VerticalFieldManager. Just use add(header) | I don't want to move header with VerticalFieldManager, how? This is my coding, I don't want header to move as i scrolldown the main1, how to do that? VerticalFieldManager main1 = new VerticalFieldManager(Manager.NO_VERTICAL_SCROLL); XmlDataManager xmlData = new XmlDataManager(); BitmapField header = xmlData.getImageFro... | TITLE:
I don't want to move header with VerticalFieldManager, how?
QUESTION:
This is my coding, I don't want header to move as i scrolldown the main1, how to do that? VerticalFieldManager main1 = new VerticalFieldManager(Manager.NO_VERTICAL_SCROLL); XmlDataManager xmlData = new XmlDataManager(); BitmapField header = x... | [
"blackberry",
"java-me"
] | 0 | 1 | 127 | 1 | 0 | 2011-05-31T06:06:28.613000 | 2011-05-31T07:31:11.403000 |
6,183,608 | 6,183,677 | i need help with a jquery plugin im making | im trying to make an easy drop down menu plugin for jquery but for some reason i cant get it to work, will someone help me? im new to plugins. http://jsfiddle.net/twvd4/ i want the plugin to work like this below, but it isnt working at all http://jsfiddle.net/cZe5x/ | Updated: http://jsfiddle.net/twvd4/2/ First you named your plugin wrong: jDropIt vs jDroptIt. Second you called the plugin before it was even attachted to the $.fn. | i need help with a jquery plugin im making im trying to make an easy drop down menu plugin for jquery but for some reason i cant get it to work, will someone help me? im new to plugins. http://jsfiddle.net/twvd4/ i want the plugin to work like this below, but it isnt working at all http://jsfiddle.net/cZe5x/ | TITLE:
i need help with a jquery plugin im making
QUESTION:
im trying to make an easy drop down menu plugin for jquery but for some reason i cant get it to work, will someone help me? im new to plugins. http://jsfiddle.net/twvd4/ i want the plugin to work like this below, but it isnt working at all http://jsfiddle.net... | [
"jquery",
"plugins"
] | 0 | 1 | 57 | 1 | 0 | 2011-05-31T06:06:41.900000 | 2011-05-31T06:15:48.620000 |
6,183,620 | 6,183,662 | testPreconditions for EditText hint field | I am trying to test that my EditText hint field is not null in junit's testPreconditions() There are examples online for asserting that a TextView is not null, but using EditText in the following way private EditText editTextField;
public void testPreconditions() { assertNotNull(editTextField); } does not work (tests ... | To get hint from EditText use getHint function. But it looks like your problem is different. Your test fails because your editTextField is null. You should read "Activity Testing" article. Shortly, JUnit is not enough, you need to setup a special Android Test project in order to access UI views of Activity under test. | testPreconditions for EditText hint field I am trying to test that my EditText hint field is not null in junit's testPreconditions() There are examples online for asserting that a TextView is not null, but using EditText in the following way private EditText editTextField;
public void testPreconditions() { assertNotNu... | TITLE:
testPreconditions for EditText hint field
QUESTION:
I am trying to test that my EditText hint field is not null in junit's testPreconditions() There are examples online for asserting that a TextView is not null, but using EditText in the following way private EditText editTextField;
public void testPreconditio... | [
"android",
"testing",
"junit",
"unit-testing"
] | 2 | 1 | 571 | 2 | 0 | 2011-05-31T06:08:05.830000 | 2011-05-31T06:13:58.917000 |
6,183,621 | 6,183,839 | Copying data of only few columns to one more data table | I have a scenario where I get a data table with 65 columns and 100 rows. I need to create one more data table with all 100 rows, i.e. the same as the original data table but should be having only 5 columns out of 65 present in original table. Is there any way to achieve this without looping? | Try DataView.ToTable method. Use it like this: DataTable newTable = oldTable.DefaultView.ToTable(false, "ColumnName1", "ColumnName2", "ColumnName3", "ColumnName4", "ColumnName5"); | Copying data of only few columns to one more data table I have a scenario where I get a data table with 65 columns and 100 rows. I need to create one more data table with all 100 rows, i.e. the same as the original data table but should be having only 5 columns out of 65 present in original table. Is there any way to a... | TITLE:
Copying data of only few columns to one more data table
QUESTION:
I have a scenario where I get a data table with 65 columns and 100 rows. I need to create one more data table with all 100 rows, i.e. the same as the original data table but should be having only 5 columns out of 65 present in original table. Is ... | [
"c#",
".net",
".net-4.0",
"ado.net"
] | 13 | 31 | 32,210 | 4 | 0 | 2011-05-31T06:08:10.353000 | 2011-05-31T06:36:23.950000 |
6,183,622 | 6,183,669 | Which cast is fastest? | Which cast is fastest in C#? Assume that I have a 64 bit floating point. Would it be faster to convert it to a 32 bit integer, or a 64 bit integer (assuming that data loss is not relevant to me)? | There are several ways to find this out, each with their own advantages. experimental evidence: do a large number of each cast in a massive loop and time them, trying to keep all other possible factors consistent. look at the machine code for the two casts and do an proper analysis on which is faster. ask the developer... | Which cast is fastest? Which cast is fastest in C#? Assume that I have a 64 bit floating point. Would it be faster to convert it to a 32 bit integer, or a 64 bit integer (assuming that data loss is not relevant to me)? | TITLE:
Which cast is fastest?
QUESTION:
Which cast is fastest in C#? Assume that I have a 64 bit floating point. Would it be faster to convert it to a 32 bit integer, or a 64 bit integer (assuming that data loss is not relevant to me)?
ANSWER:
There are several ways to find this out, each with their own advantages. e... | [
"c#",
"casting",
"types"
] | 0 | 4 | 205 | 1 | 0 | 2011-05-31T06:08:36.820000 | 2011-05-31T06:14:50.763000 |
6,183,623 | 6,183,683 | Installation of Zend Framework in WampServer | How to install Zend Framework in wampserver 5.2.6, anyone can help me? And my wampserver is not in C:/ but it is in E:/,so can not work "ZF" in windows powershell. I am new in Zend Framework, so please give me all steps for installation of Zend Framework in Wamp Server. Thanks in advace. | Download Zend Framework tarball / zip Extract somewhere, lets say "E:/ZendFramework" for example Edit your php.ini file and append the path to the library folder to your include_path directive For example include_path = ".;c:\php\includes;E:\ZendFramework\library" Also, don't forget to restart / reload Apache Update Yo... | Installation of Zend Framework in WampServer How to install Zend Framework in wampserver 5.2.6, anyone can help me? And my wampserver is not in C:/ but it is in E:/,so can not work "ZF" in windows powershell. I am new in Zend Framework, so please give me all steps for installation of Zend Framework in Wamp Server. Than... | TITLE:
Installation of Zend Framework in WampServer
QUESTION:
How to install Zend Framework in wampserver 5.2.6, anyone can help me? And my wampserver is not in C:/ but it is in E:/,so can not work "ZF" in windows powershell. I am new in Zend Framework, so please give me all steps for installation of Zend Framework in... | [
"php",
"zend-framework",
"wamp"
] | 1 | 2 | 3,798 | 1 | 0 | 2011-05-31T06:08:50.727000 | 2011-05-31T06:16:20.853000 |
6,183,633 | 6,183,743 | How to deal with unstable data received from RFID reader? | My application has to connect and receive data from RFID reader for every 2 seconds so it has developed on django framework. Here are related lines in views.py: HOST = '192.168.0.1' PORT = 50007 soc = socket.socket(socket.AF_INET, socket.SOCK_STREAM) soc.settimeout(2) soc.connect((HOST, PORT)) soc.send('tag.db.scan_tag... | One of the easier things to do would be to use Django's cache framework, and store the data in local memory, or memcached, or the database, etc. You could cache any data recieved, and used the cached data if you don't recieve data, or it's erroneous or whatever: from django.core.cache import cache
# set cached data ca... | How to deal with unstable data received from RFID reader? My application has to connect and receive data from RFID reader for every 2 seconds so it has developed on django framework. Here are related lines in views.py: HOST = '192.168.0.1' PORT = 50007 soc = socket.socket(socket.AF_INET, socket.SOCK_STREAM) soc.settime... | TITLE:
How to deal with unstable data received from RFID reader?
QUESTION:
My application has to connect and receive data from RFID reader for every 2 seconds so it has developed on django framework. Here are related lines in views.py: HOST = '192.168.0.1' PORT = 50007 soc = socket.socket(socket.AF_INET, socket.SOCK_S... | [
"python",
"django",
"rfid"
] | 4 | 1 | 1,038 | 1 | 0 | 2011-05-31T06:09:37.913000 | 2011-05-31T06:24:41.787000 |
6,183,636 | 6,183,742 | Filter the Data According to range using linq | I have a datatable which contains following data as SrNo Roll Name 1 1 XYZ 99 45 ABC 150 120 POQ 10 9 RTY 190 180 MNZ According to the range of of srNo the output should be derived & there should be a additional column Result should be added & according to the range the result should be filled with 0 or 1(if range is b... | SrNo Roll Name Result 1 1 XYZ 0 99 45 ABC 0 10 9 RTY 0 150 120 POQ 1 190 180 MNZ 1 Try this: var dt = new DataTable(); dt.Columns.Add(new DataColumn("SrNo", typeof (int))); dt.Columns.Add(new DataColumn("Roll", typeof (int))); dt.Columns.Add(new DataColumn("Name", typeof (string)));
dt.Rows.Add(1, 1, "XYZ"); dt.Rows.A... | Filter the Data According to range using linq I have a datatable which contains following data as SrNo Roll Name 1 1 XYZ 99 45 ABC 150 120 POQ 10 9 RTY 190 180 MNZ According to the range of of srNo the output should be derived & there should be a additional column Result should be added & according to the range the res... | TITLE:
Filter the Data According to range using linq
QUESTION:
I have a datatable which contains following data as SrNo Roll Name 1 1 XYZ 99 45 ABC 150 120 POQ 10 9 RTY 190 180 MNZ According to the range of of srNo the output should be derived & there should be a additional column Result should be added & according to... | [
"linq"
] | 0 | 1 | 232 | 1 | 0 | 2011-05-31T06:10:13.373000 | 2011-05-31T06:24:38.290000 |
6,183,640 | 6,183,953 | How to get powered list of a string in C# | Possible Duplicate: Get all possible word combinations I want to get a "power list" of a string. So given this input: string[] s = new string[] { "a", "b", "c" }; The function would return: string[] s = new string[] { "a", "b", "c", "ab", "ac", "bc", "abc" }; How can I do this? | Try this: string[] chars = new string[] { "a", "b", "c" };
List result = new List (); foreach (int i in Enumerable.Range(0, 4)) { IEnumerable coll = chars; foreach (int j in Enumerable.Range(0, i)) { coll = coll.SelectMany(s => chars, (c, r) => c + r); } result.AddRange(coll); } | How to get powered list of a string in C# Possible Duplicate: Get all possible word combinations I want to get a "power list" of a string. So given this input: string[] s = new string[] { "a", "b", "c" }; The function would return: string[] s = new string[] { "a", "b", "c", "ab", "ac", "bc", "abc" }; How can I do this? | TITLE:
How to get powered list of a string in C#
QUESTION:
Possible Duplicate: Get all possible word combinations I want to get a "power list" of a string. So given this input: string[] s = new string[] { "a", "b", "c" }; The function would return: string[] s = new string[] { "a", "b", "c", "ab", "ac", "bc", "abc" }; ... | [
"c#"
] | 0 | 0 | 114 | 1 | 0 | 2011-05-31T06:10:46.663000 | 2011-05-31T06:50:56.333000 |
6,183,649 | 6,183,724 | how to draw line on map in android | in my app i need to draw lines on map while i am walking,running or driving. for get location i use OnLocationChanged method of LocattionListener class. in OnLocationChanged method i call line drawing class. the class is called it printed in log but i do not get no lines on my map. please help me. if you have experienc... | you should get list of coordinates between source and destination by calling google api. then you can draw the line. Refer this | how to draw line on map in android in my app i need to draw lines on map while i am walking,running or driving. for get location i use OnLocationChanged method of LocattionListener class. in OnLocationChanged method i call line drawing class. the class is called it printed in log but i do not get no lines on my map. pl... | TITLE:
how to draw line on map in android
QUESTION:
in my app i need to draw lines on map while i am walking,running or driving. for get location i use OnLocationChanged method of LocattionListener class. in OnLocationChanged method i call line drawing class. the class is called it printed in log but i do not get no l... | [
"android",
"android-maps"
] | 1 | 2 | 2,668 | 1 | 0 | 2011-05-31T06:12:13.407000 | 2011-05-31T06:22:55.140000 |
6,183,656 | 6,183,983 | cocos2d schedule selector outside class | I want to schedule a @selector(count) interval: 1.0f to count the time left. here is my code: (In GameManager.m file) -(void) count { duration++; [[[GameScene sharedScene] gadgetLayer] updateTimerLabel]; if (timeLimit - duration <= 5 && ticking == NO) { ticking = YES; [self schedule:@selector(untick) interval:5]; [[Sim... | Actually I don't know why, but it work: -(void) onEnter { GameManager *sharedManager = [GameManager sharedManager]; [[CCScheduler sharedScheduler] scheduleSelector:@selector(count) forTarget:sharedManager interval:1.0 paused:NO];
// [self schedule:@selector(tick:) interval:0.5]; } Answering next question: Unscheduling... | cocos2d schedule selector outside class I want to schedule a @selector(count) interval: 1.0f to count the time left. here is my code: (In GameManager.m file) -(void) count { duration++; [[[GameScene sharedScene] gadgetLayer] updateTimerLabel]; if (timeLimit - duration <= 5 && ticking == NO) { ticking = YES; [self sched... | TITLE:
cocos2d schedule selector outside class
QUESTION:
I want to schedule a @selector(count) interval: 1.0f to count the time left. here is my code: (In GameManager.m file) -(void) count { duration++; [[[GameScene sharedScene] gadgetLayer] updateTimerLabel]; if (timeLimit - duration <= 5 && ticking == NO) { ticking ... | [
"iphone",
"objective-c",
"cocos2d-iphone",
"schedule"
] | 0 | 1 | 1,820 | 1 | 0 | 2011-05-31T06:13:08.677000 | 2011-05-31T06:55:05.067000 |
6,183,658 | 6,183,901 | A Portable typeof() in C++ using SFINAE? | Possible Duplicate: Absence of typeof operator in C++03? Is it possible to use templates to get the compile-time type of an expression portably in pre-C++0x C++? Something like: int foo() { return 0; } //Let's say we have this typeof(foo()) x; //x would now be of type 'int' but since we're working with templates, sligh... | It's impossible in the general case. And yes, quite a lot of effort has been put into this problem over the years. There are a lot of tricks for determining the type of an expression in specific cases (for example, functors are commonly annotated with a typedef indicating their return type), but in general, you need de... | A Portable typeof() in C++ using SFINAE? Possible Duplicate: Absence of typeof operator in C++03? Is it possible to use templates to get the compile-time type of an expression portably in pre-C++0x C++? Something like: int foo() { return 0; } //Let's say we have this typeof(foo()) x; //x would now be of type 'int' but ... | TITLE:
A Portable typeof() in C++ using SFINAE?
QUESTION:
Possible Duplicate: Absence of typeof operator in C++03? Is it possible to use templates to get the compile-time type of an expression portably in pre-C++0x C++? Something like: int foo() { return 0; } //Let's say we have this typeof(foo()) x; //x would now be ... | [
"c++",
"templates",
"typeof",
"sfinae"
] | 0 | 6 | 496 | 3 | 0 | 2011-05-31T06:13:37.940000 | 2011-05-31T06:44:09.427000 |
6,183,660 | 6,183,691 | Why doesn't the function recognize the member when using "this" | I have a class called imageResizing. It has a member, MAX_WIDTH_ORIGINAL_IMG which is defined as 650: MAX_WIDTH_ORIGINAL_IMG:650, and a function called setMaxSizeOriginalImg, and the only thing it does is alert the member MAX_WIDTH_ORIGINAL_IMG: alert(this.MAX_WIDTH_ORIGINAL_IMG); I call the function on load as follows... | If you call foo.bar() then this is foo. You are passing the value of foo.bar. This is somewhat akin to: baz = foo.bar; So when it gets called, it is a bit like baz(). Pass a new function instead: addEventSimple(window,'load',function () { imageResizing.setMaxSizeOriginalImg() }); | Why doesn't the function recognize the member when using "this" I have a class called imageResizing. It has a member, MAX_WIDTH_ORIGINAL_IMG which is defined as 650: MAX_WIDTH_ORIGINAL_IMG:650, and a function called setMaxSizeOriginalImg, and the only thing it does is alert the member MAX_WIDTH_ORIGINAL_IMG: alert(this... | TITLE:
Why doesn't the function recognize the member when using "this"
QUESTION:
I have a class called imageResizing. It has a member, MAX_WIDTH_ORIGINAL_IMG which is defined as 650: MAX_WIDTH_ORIGINAL_IMG:650, and a function called setMaxSizeOriginalImg, and the only thing it does is alert the member MAX_WIDTH_ORIGIN... | [
"javascript"
] | 2 | 3 | 70 | 1 | 0 | 2011-05-31T06:13:46.210000 | 2011-05-31T06:18:07.327000 |
6,183,664 | 6,183,758 | How can i get the cookie value from header to template pages in wordpress? | I have set the cookie in header.php like below now i need to get this cookie value in the page signup.php. but i cant retrive the value in that page. in Signup.php page i am using the below code for check the cookie, but it goes to the else condition only (if the cookie is set also). kindly advice... | Try to create a plugin and hook with init action: http://codex.wordpress.org/Plugin_API/Action_Reference/init function my_set_cookie() { if($_GET['signup'] == '123' &&!isset($_COOKIE['sign'])) { setcookie("sign", "1", time()+3600); } }
add_action('init', 'my_set_cookie'); | How can i get the cookie value from header to template pages in wordpress? I have set the cookie in header.php like below now i need to get this cookie value in the page signup.php. but i cant retrive the value in that page. in Signup.php page i am using the below code for check the cookie, but it goes to the else cond... | TITLE:
How can i get the cookie value from header to template pages in wordpress?
QUESTION:
I have set the cookie in header.php like below now i need to get this cookie value in the page signup.php. but i cant retrive the value in that page. in Signup.php page i am using the below code for check the cookie, but it goe... | [
"php",
"wordpress",
"cookies"
] | 0 | 0 | 1,919 | 1 | 0 | 2011-05-31T06:13:59.703000 | 2011-05-31T06:26:32.097000 |
6,183,667 | 6,183,686 | Jquery insertAfter only once if element exist | How to check if an element exist, and if it does i want the insertAfter to be not valid.And if the element isn't exist, then i want the insertAfter to be valib but only once.My goal is to send only once insertAfter if an element isn't existing and if it does not send anything | Just do a length check. Assuming you have a selector #sel, and you want to insert something after it. var foo = 'something'; if ($('#sel').length) { //do something if elem is present } else { $('#sel').insertAfter(foo); } | Jquery insertAfter only once if element exist How to check if an element exist, and if it does i want the insertAfter to be not valid.And if the element isn't exist, then i want the insertAfter to be valib but only once.My goal is to send only once insertAfter if an element isn't existing and if it does not send anythi... | TITLE:
Jquery insertAfter only once if element exist
QUESTION:
How to check if an element exist, and if it does i want the insertAfter to be not valid.And if the element isn't exist, then i want the insertAfter to be valib but only once.My goal is to send only once insertAfter if an element isn't existing and if it do... | [
"jquery"
] | 11 | 13 | 16,861 | 3 | 0 | 2011-05-31T06:14:19.760000 | 2011-05-31T06:16:48.603000 |
6,183,668 | 6,183,685 | Question about if statement in function in javascript - how if the if statement return true but the function return false | can i ask you guys a question? Below is my code: var num = 1; var isNumberEqualOne = function(){ if(num == 1){ return true; } return false; }(); alert(isNumberEqualOne); In this code, the statement in the function return true, after return true, the code in the function is still executing right? So at the end, the code... | return will halt the function and return immediately. The remaining body of code in the function will not be executed. In your example, num is assigned 1, so the condition inside your function is true. This means that your function will return there and then with true. You could also rewrite that function so its body i... | Question about if statement in function in javascript - how if the if statement return true but the function return false can i ask you guys a question? Below is my code: var num = 1; var isNumberEqualOne = function(){ if(num == 1){ return true; } return false; }(); alert(isNumberEqualOne); In this code, the statement ... | TITLE:
Question about if statement in function in javascript - how if the if statement return true but the function return false
QUESTION:
can i ask you guys a question? Below is my code: var num = 1; var isNumberEqualOne = function(){ if(num == 1){ return true; } return false; }(); alert(isNumberEqualOne); In this co... | [
"javascript",
"function"
] | 5 | 6 | 32,963 | 3 | 0 | 2011-05-31T06:14:49.017000 | 2011-05-31T06:16:30.997000 |
6,183,670 | 6,289,872 | EJB 3.1 Dependency Injection Failed | i have created a stateless session bean like this: @WebServlet(name = "ProductController", urlPatterns = {"/ProductController"}) public class ProductController extends HttpServlet {
@EJB private ProductFacadeBean productBean; }
@Stateless public class ProductFacadeBean extends AbstractFacade implements ProductFacadeL... | you must use the interface. If you use Seam Solder and CDI you can specify the exact implementation with @Inject @Exact(ProductFacadeBean.class) | EJB 3.1 Dependency Injection Failed i have created a stateless session bean like this: @WebServlet(name = "ProductController", urlPatterns = {"/ProductController"}) public class ProductController extends HttpServlet {
@EJB private ProductFacadeBean productBean; }
@Stateless public class ProductFacadeBean extends Abst... | TITLE:
EJB 3.1 Dependency Injection Failed
QUESTION:
i have created a stateless session bean like this: @WebServlet(name = "ProductController", urlPatterns = {"/ProductController"}) public class ProductController extends HttpServlet {
@EJB private ProductFacadeBean productBean; }
@Stateless public class ProductFacad... | [
"java",
"dependencies",
"ejb",
"code-injection"
] | 4 | 5 | 17,906 | 2 | 0 | 2011-05-31T06:14:53.333000 | 2011-06-09T08:10:04.673000 |
6,183,676 | 6,186,265 | Delayed Job not logging in Production | I want my delayed job "code" to log in a different log file for business requirements. So I log a custom status in a log called as dj.log. Inside the "serialized" job, I am putting the log statements to log in my file. Here is how the setup is Delayed::Worker.destroy_failed_jobs = false Delayed::Worker.sleep_delay = 60... | DelayedJob maintains it's own logger so you'll need to point that to your specific log file. So, in your initializer file (either environment.rb or, better, a specific delayed_job.rb file in config/initializers ) add the following: Delayed::Worker.logger = Logger.new(File.join(Rails.root, 'log', 'dj.log')) | Delayed Job not logging in Production I want my delayed job "code" to log in a different log file for business requirements. So I log a custom status in a log called as dj.log. Inside the "serialized" job, I am putting the log statements to log in my file. Here is how the setup is Delayed::Worker.destroy_failed_jobs = ... | TITLE:
Delayed Job not logging in Production
QUESTION:
I want my delayed job "code" to log in a different log file for business requirements. So I log a custom status in a log called as dj.log. Inside the "serialized" job, I am putting the log statements to log in my file. Here is how the setup is Delayed::Worker.dest... | [
"ruby-on-rails",
"ruby-on-rails-3",
"delayed-job"
] | 7 | 13 | 8,465 | 3 | 0 | 2011-05-31T06:15:44.940000 | 2011-05-31T10:32:38.180000 |
6,183,684 | 6,183,830 | manage site settings disabled in expression web | I want to check how my site is working with ie6, ie7. So I installed expression web (which comes with expression blend) ultimate version. After searching I found that i should configure site ---> site settings. But site settings is disabled in my expression web. Can any body help me with this. If possible can any one p... | Because you got Expression Web, you also got SuperPreview. SuperPreview is a great tool for comparing renderings of websites. You can have a base version and compare that in various ways with different other browsers. There's even a beta going on where a webpage is rendered online somewhere and shown as it would be ren... | manage site settings disabled in expression web I want to check how my site is working with ie6, ie7. So I installed expression web (which comes with expression blend) ultimate version. After searching I found that i should configure site ---> site settings. But site settings is disabled in my expression web. Can any b... | TITLE:
manage site settings disabled in expression web
QUESTION:
I want to check how my site is working with ie6, ie7. So I installed expression web (which comes with expression blend) ultimate version. After searching I found that i should configure site ---> site settings. But site settings is disabled in my express... | [
"asp.net",
"cross-browser",
"expression-blend",
"expression-web"
] | 1 | 1 | 131 | 2 | 0 | 2011-05-31T06:16:23.003000 | 2011-05-31T06:34:57.590000 |
6,183,689 | 6,184,154 | Get handles of process forms c# | I have a process which opens a form and a tray icon on startup. I want to discover from a c# application what is the handle of the form and tray icon of the exe process above, and what are the handles of all child windows of this exe. Thanks. | For the window handle it is easiest to use System.Diagnostics.Process and the MainWindowHandle property. You don't state how you want to identify the other process but the Process class has lots of options for that. Regarding the notification area icon, there is no API for what you are asking. You'd need to either hook... | Get handles of process forms c# I have a process which opens a form and a tray icon on startup. I want to discover from a c# application what is the handle of the form and tray icon of the exe process above, and what are the handles of all child windows of this exe. Thanks. | TITLE:
Get handles of process forms c#
QUESTION:
I have a process which opens a form and a tray icon on startup. I want to discover from a c# application what is the handle of the form and tray icon of the exe process above, and what are the handles of all child windows of this exe. Thanks.
ANSWER:
For the window han... | [
"c#",
"process",
"window-handles"
] | 1 | 2 | 1,940 | 1 | 0 | 2011-05-31T06:17:17.060000 | 2011-05-31T07:14:44.057000 |
6,183,700 | 6,261,553 | How to have only some constructor parameters injected with Autofac combined with using an InjectionModule | Summary: How to combine an injection module with regular contain.Resolve() calls in registration? ~ Update (5 hours later and after feedback)~: The use of RegisterType<> as opposed to Register() does not solve the actual complexity level I have in production code, I have updated the demo code on BitBucket to include a ... | Thanks to bentayloruk 's suggestion, the solution was in fact using: WithParameter(/*... */) So the registration code now looks like this: builder.RegisterType >().As ().WithParameter( (pi, c) => pi.ParameterType == (typeof(ISecond<>)), (pi, c) => c.ResolveNamed >("second") ); The sample application has been updated, b... | How to have only some constructor parameters injected with Autofac combined with using an InjectionModule Summary: How to combine an injection module with regular contain.Resolve() calls in registration? ~ Update (5 hours later and after feedback)~: The use of RegisterType<> as opposed to Register() does not solve the ... | TITLE:
How to have only some constructor parameters injected with Autofac combined with using an InjectionModule
QUESTION:
Summary: How to combine an injection module with regular contain.Resolve() calls in registration? ~ Update (5 hours later and after feedback)~: The use of RegisterType<> as opposed to Register() d... | [
".net",
"registration",
"autofac"
] | 5 | 9 | 7,144 | 1 | 0 | 2011-05-31T06:19:58.603000 | 2011-06-07T06:49:25.813000 |
6,183,704 | 6,191,067 | How to initialize classes (not instances) in Python? | I want to merge constraints from the current and inherited classes only once a class is loaded (not per object!). class Domain(Validatable):
constraints = {...} To do this I defined a method _initialize_class_not_instance that should be called once for each class: class Validatable:
@classmethod def _initialize_class... | I ended up with a class decorator and without inheritance. This decorator merges the constraints of the current and inherited classes and overrides the __init__ method: def validatable(cls):
# merge constraints from derived class and base classes here...
original_init = cls.__init__ def init_to_insert(self, *args, **... | How to initialize classes (not instances) in Python? I want to merge constraints from the current and inherited classes only once a class is loaded (not per object!). class Domain(Validatable):
constraints = {...} To do this I defined a method _initialize_class_not_instance that should be called once for each class: c... | TITLE:
How to initialize classes (not instances) in Python?
QUESTION:
I want to merge constraints from the current and inherited classes only once a class is loaded (not per object!). class Domain(Validatable):
constraints = {...} To do this I defined a method _initialize_class_not_instance that should be called once... | [
"python",
"oop",
"inheritance",
"class-method"
] | 14 | 2 | 7,869 | 2 | 0 | 2011-05-31T06:20:25.423000 | 2011-05-31T17:12:05.577000 |
6,183,707 | 6,183,834 | How to convert an html submit button to a link in php | I have a Submit button to remove a user: My Script removes the user as follows: if (isset($_POST['remove_user'])) { for ($j = 1; $j <= $_SESSION['highest_user_index']; $j++) { if (array_key_exists($j, $_POST['remove_user'])) { // remove user details from session variables unset($_SESSION["delegate".$j]); $_SESSION['num... | You can use javascript: Delete user or a link with GET parameters: ">Delete user in your server side code you have to read out the get parameters if (isset($_GET['remove_user'])) { userid = $_GET['userid'];
} Sorry if there are any errors in the code I didn't try it | How to convert an html submit button to a link in php I have a Submit button to remove a user: My Script removes the user as follows: if (isset($_POST['remove_user'])) { for ($j = 1; $j <= $_SESSION['highest_user_index']; $j++) { if (array_key_exists($j, $_POST['remove_user'])) { // remove user details from session var... | TITLE:
How to convert an html submit button to a link in php
QUESTION:
I have a Submit button to remove a user: My Script removes the user as follows: if (isset($_POST['remove_user'])) { for ($j = 1; $j <= $_SESSION['highest_user_index']; $j++) { if (array_key_exists($j, $_POST['remove_user'])) { // remove user detail... | [
"php",
"html"
] | 0 | 1 | 6,180 | 3 | 0 | 2011-05-31T06:20:35.983000 | 2011-05-31T06:35:11.693000 |
6,183,713 | 6,183,922 | PHP continue inside function | This is likely very trivial but I haven't been able to figure it out. This works: function MyFunction(){
//Do stuff
}
foreach($x as $y){
MyFunction();
if($foo === 'bar'){continue;}
//Do stuff
echo $output. ' ';
} But this doesn't: function MyFunction(){
//Do stuff
if($foo === 'bar'){continue;}
}
foreach($x ... | You can't break/continue a loop outside a function, from within a function. However, you can break/continue your loop based on the return value of your function: function myFunction(){ //Do stuff return $foo === 'bar'; }
foreach($x as $y) { if(myFunction()) { continue; }
//Do stuff
echo $output. ' '; } | PHP continue inside function This is likely very trivial but I haven't been able to figure it out. This works: function MyFunction(){
//Do stuff
}
foreach($x as $y){
MyFunction();
if($foo === 'bar'){continue;}
//Do stuff
echo $output. ' ';
} But this doesn't: function MyFunction(){
//Do stuff
if($foo === 'bar... | TITLE:
PHP continue inside function
QUESTION:
This is likely very trivial but I haven't been able to figure it out. This works: function MyFunction(){
//Do stuff
}
foreach($x as $y){
MyFunction();
if($foo === 'bar'){continue;}
//Do stuff
echo $output. ' ';
} But this doesn't: function MyFunction(){
//Do stuff... | [
"php",
"function",
"continue"
] | 9 | 13 | 10,352 | 4 | 0 | 2011-05-31T06:21:25.193000 | 2011-05-31T06:46:08.867000 |
6,183,714 | 6,184,358 | Collision Detection and Collision Response | I've been trying my hand at representing a few moving/rotating objects using androids Opengl. Now I'd like to allow them to collide and respond realistically. Researching the issue, I can find many resources that advise me on ways to determine whether two 3d shapes are colliding in the current frame (or whether they'll... | For collision detection the solution you are looking for is called continuous collision detection, and an explanation can be found here. Detecting contacts between two bodies is relatively simple, especially if you ignore angular velocities, but if you are doing a simulation with more than two objects you will need to ... | Collision Detection and Collision Response I've been trying my hand at representing a few moving/rotating objects using androids Opengl. Now I'd like to allow them to collide and respond realistically. Researching the issue, I can find many resources that advise me on ways to determine whether two 3d shapes are collidi... | TITLE:
Collision Detection and Collision Response
QUESTION:
I've been trying my hand at representing a few moving/rotating objects using androids Opengl. Now I'd like to allow them to collide and respond realistically. Researching the issue, I can find many resources that advise me on ways to determine whether two 3d ... | [
"android",
"collision-detection"
] | 10 | 4 | 2,331 | 3 | 0 | 2011-05-31T06:21:33.117000 | 2011-05-31T07:36:48.667000 |
6,183,737 | 6,184,661 | Dynamically create an iframe and attach onload event to it | I have created a iframe dynamically and added a src attribute to it. Then I have appended this iframe to body of the page. Know I want to attach an onload event to iframe to read the iframe content. Can somebody suggest how do I do that? frame = document.createElement('iframe'); frame.setAttribute('src','http://example... | Some browsers do have the onload event for an iframe, first you should try to attach it before setting the iframe's src attribute. I'd avoid using it altogether since in certain browsers it might not fire under certain conditions (e.g. the target was in cache in IE). You could user a timer to check if the frame's conte... | Dynamically create an iframe and attach onload event to it I have created a iframe dynamically and added a src attribute to it. Then I have appended this iframe to body of the page. Know I want to attach an onload event to iframe to read the iframe content. Can somebody suggest how do I do that? frame = document.create... | TITLE:
Dynamically create an iframe and attach onload event to it
QUESTION:
I have created a iframe dynamically and added a src attribute to it. Then I have appended this iframe to body of the page. Know I want to attach an onload event to iframe to read the iframe content. Can somebody suggest how do I do that? frame... | [
"javascript",
"iframe",
"dom-events"
] | 12 | 15 | 39,327 | 4 | 0 | 2011-05-31T06:24:23.243000 | 2011-05-31T08:07:43.317000 |
6,183,739 | 6,184,027 | How to store the address pointed to by a pointer? | I am trying to create a map of addresses of objects that I create with the time at which it is allocated. The key is the address returned by the call to new(). How do I get the address returned by new()? type T struct{a, b int }
func main(){
var t int64 = time.Nanoseconds() memmap:= make(map[uint8]int64) fmt.Printf("... | You can use the type Pointer from the unsafe package, but that is, the package name implies it, unsafe. The address itself is a opaque thing and there's only little use in actually using a address value alone for a map, better use a tuple of type and address. That's what unsafe.Reflect does provide you. The package ref... | How to store the address pointed to by a pointer? I am trying to create a map of addresses of objects that I create with the time at which it is allocated. The key is the address returned by the call to new(). How do I get the address returned by new()? type T struct{a, b int }
func main(){
var t int64 = time.Nanosec... | TITLE:
How to store the address pointed to by a pointer?
QUESTION:
I am trying to create a map of addresses of objects that I create with the time at which it is allocated. The key is the address returned by the call to new(). How do I get the address returned by new()? type T struct{a, b int }
func main(){
var t in... | [
"pointers",
"go"
] | 3 | 7 | 1,511 | 2 | 0 | 2011-05-31T06:24:25.250000 | 2011-05-31T07:01:50.337000 |
6,183,746 | 6,184,089 | Resources for learning advanced javascript like the stuff written for jquery , mootools? | CAn anyone please provide me some resources where I can learn advanced javascript like the stuff written for jquery, mootools, etc? | I can totally recommend Douglas Crockford's "JavaScript: The Good Parts". Awesome book. You should also check out his website where he covers some advanced JavaScript topics (and how he ported Maniac Mansion to the NES). | Resources for learning advanced javascript like the stuff written for jquery , mootools? CAn anyone please provide me some resources where I can learn advanced javascript like the stuff written for jquery, mootools, etc? | TITLE:
Resources for learning advanced javascript like the stuff written for jquery , mootools?
QUESTION:
CAn anyone please provide me some resources where I can learn advanced javascript like the stuff written for jquery, mootools, etc?
ANSWER:
I can totally recommend Douglas Crockford's "JavaScript: The Good Parts"... | [
"javascript"
] | 4 | 1 | 732 | 2 | 0 | 2011-05-31T06:24:52.253000 | 2011-05-31T07:06:26.367000 |
6,183,747 | 6,183,764 | PHP forward slash match | How I can check if some string contains forward slash in PHP? | Check for occurences with strpos() if (strpos($string, '/')!== FALSE) // Found Returns the position as an integer. If needle is not found, strpos() will return boolean FALSE. This is faster than a regular expression, and most other methods, because it stops checking at the first occurrence. | PHP forward slash match How I can check if some string contains forward slash in PHP? | TITLE:
PHP forward slash match
QUESTION:
How I can check if some string contains forward slash in PHP?
ANSWER:
Check for occurences with strpos() if (strpos($string, '/')!== FALSE) // Found Returns the position as an integer. If needle is not found, strpos() will return boolean FALSE. This is faster than a regular ex... | [
"php",
"regex"
] | 2 | 10 | 6,172 | 2 | 0 | 2011-05-31T06:24:59.327000 | 2011-05-31T06:27:02.113000 |
6,183,748 | 6,183,777 | How to pass a json object to a mvc controller | I want to be able pass 2 arguments to my controller. An id and an object[]. Here is my controller: [HttpPost] public string SaveCoordinates(string Id, object[] pFrame) {
string rslt = "ERROR"; if (pFrame!= null) { try { List pList = new List (); for (int i = 0; i < pFrame.Length; i++) { Dictionary kvps = (Dictionary )... | Try this data: {pFrame: JSON.stringify(window.image.pinpoints)}, | How to pass a json object to a mvc controller I want to be able pass 2 arguments to my controller. An id and an object[]. Here is my controller: [HttpPost] public string SaveCoordinates(string Id, object[] pFrame) {
string rslt = "ERROR"; if (pFrame!= null) { try { List pList = new List (); for (int i = 0; i < pFrame.... | TITLE:
How to pass a json object to a mvc controller
QUESTION:
I want to be able pass 2 arguments to my controller. An id and an object[]. Here is my controller: [HttpPost] public string SaveCoordinates(string Id, object[] pFrame) {
string rslt = "ERROR"; if (pFrame!= null) { try { List pList = new List (); for (int ... | [
"c#",
"jquery",
"asp.net",
"ajax",
"asp.net-mvc-3"
] | 4 | 2 | 1,361 | 2 | 0 | 2011-05-31T06:25:00.790000 | 2011-05-31T06:28:48.090000 |
6,183,751 | 6,183,798 | What error logging web services or apps exist that log handled and unhandled exceptions? | I know about ELMAH, but that only logs unhandled errors. I need something that logs ALL errors (handled and unhandled). Does anyone know of such a program or service which does this? Preferably something open source that can work on any platform using any language, though I'm willing to consider other projects that are... | log4net isn't that complicated and there are tons of examples of how to use it. another one you might consider which is a bit simpler than log4net is nlog. i'd suggest spending a few hours trying some examples of both of these. i am sure you'll see that they are actually pretty straight forward to implement. | What error logging web services or apps exist that log handled and unhandled exceptions? I know about ELMAH, but that only logs unhandled errors. I need something that logs ALL errors (handled and unhandled). Does anyone know of such a program or service which does this? Preferably something open source that can work o... | TITLE:
What error logging web services or apps exist that log handled and unhandled exceptions?
QUESTION:
I know about ELMAH, but that only logs unhandled errors. I need something that logs ALL errors (handled and unhandled). Does anyone know of such a program or service which does this? Preferably something open sour... | [
"error-handling",
"custom-error-handling"
] | 0 | 0 | 222 | 1 | 0 | 2011-05-31T06:25:25.953000 | 2011-05-31T06:31:36.560000 |
6,183,754 | 6,184,516 | Twitter library for smalltalk | I am new to smalltalk. I have some experience in java and I am looking forward to develop a twitter client in smalltalk (pharo environment). I have done this in java with the twitter4j library but I really have no clue about how to proceed with the same in smalltalk. Is there a twitter library available for the smallta... | There is OAuth implementation in cloudfork project that might come handy: http://blog.doit.st/2011/02/15/cloudforksso-openid-and-oauth-support-for-smalltalk/ | Twitter library for smalltalk I am new to smalltalk. I have some experience in java and I am looking forward to develop a twitter client in smalltalk (pharo environment). I have done this in java with the twitter4j library but I really have no clue about how to proceed with the same in smalltalk. Is there a twitter lib... | TITLE:
Twitter library for smalltalk
QUESTION:
I am new to smalltalk. I have some experience in java and I am looking forward to develop a twitter client in smalltalk (pharo environment). I have done this in java with the twitter4j library but I really have no clue about how to proceed with the same in smalltalk. Is t... | [
"twitter",
"smalltalk"
] | 3 | 2 | 221 | 3 | 0 | 2011-05-31T06:25:56.283000 | 2011-05-31T07:52:37.597000 |
6,183,762 | 6,183,815 | Problem adding tab bar items to UITabBar | I have a tab bar based application in which I am trying to add tab bar items to the tab bar dynamically using setItems method of the UITabBar. Here is the code: [self.tabBarController.tabBar setItems:self.level1TabBarItems animated:YES]; Where self.level1TabBarItems is an NSMutableArray with 4 UITabBarItems in it. When... | The documentation clearly states that you shouldn't modify the tab bar directly. Use setViewControllers:animated: instead. | Problem adding tab bar items to UITabBar I have a tab bar based application in which I am trying to add tab bar items to the tab bar dynamically using setItems method of the UITabBar. Here is the code: [self.tabBarController.tabBar setItems:self.level1TabBarItems animated:YES]; Where self.level1TabBarItems is an NSMuta... | TITLE:
Problem adding tab bar items to UITabBar
QUESTION:
I have a tab bar based application in which I am trying to add tab bar items to the tab bar dynamically using setItems method of the UITabBar. Here is the code: [self.tabBarController.tabBar setItems:self.level1TabBarItems animated:YES]; Where self.level1TabBar... | [
"iphone",
"objective-c",
"uitabbarcontroller",
"uitabbar",
"uitabbaritem"
] | 10 | 17 | 16,690 | 3 | 0 | 2011-05-31T06:26:58.730000 | 2011-05-31T06:33:25.373000 |
6,183,792 | 6,183,833 | asp.net - Disable some content during certain period of time | I want to change my content for example since 15:00 until 17:00. Disable labels or something like that. What can I use to do that? | VB.NET If DateTime.Now >= New DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 15, 0, 0) AndAlso DateTime.Now <= New DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 17, 0, 0) then MyPanel.Visible = false End If Contain the UI Elements, such as labels, that you want to hide within MyPa... | asp.net - Disable some content during certain period of time I want to change my content for example since 15:00 until 17:00. Disable labels or something like that. What can I use to do that? | TITLE:
asp.net - Disable some content during certain period of time
QUESTION:
I want to change my content for example since 15:00 until 17:00. Disable labels or something like that. What can I use to do that?
ANSWER:
VB.NET If DateTime.Now >= New DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 15, 0... | [
"asp.net",
"time"
] | 1 | 1 | 184 | 1 | 0 | 2011-05-31T06:30:39.977000 | 2011-05-31T06:35:07.807000 |
6,183,797 | 6,184,611 | How to remove a group from an ExpandableListView Widget? | I'm using a SimpleCursorTreeAdapter to fill an ExpandableListView widget. I start by providing the Adapter with a Cursor object that contains the info on the group nodes in the listview, and I define a method in the Adapter (getChildrenCursor()) to return a Cursor containing the info on the children for a specified gro... | When the user clicks the context menu entry for deleting the group you have to remove the entries in the database which match this group. After this you do a new query on the database and pass the new cursor to the adapter. Now you list should be updated and the deletes group should be gone. | How to remove a group from an ExpandableListView Widget? I'm using a SimpleCursorTreeAdapter to fill an ExpandableListView widget. I start by providing the Adapter with a Cursor object that contains the info on the group nodes in the listview, and I define a method in the Adapter (getChildrenCursor()) to return a Curso... | TITLE:
How to remove a group from an ExpandableListView Widget?
QUESTION:
I'm using a SimpleCursorTreeAdapter to fill an ExpandableListView widget. I start by providing the Adapter with a Cursor object that contains the info on the group nodes in the listview, and I define a method in the Adapter (getChildrenCursor())... | [
"android",
"android-widget"
] | 0 | 0 | 2,315 | 1 | 0 | 2011-05-31T06:31:19.400000 | 2011-05-31T08:01:45.520000 |
6,183,803 | 6,215,381 | Opposite code behind in Flex | Why in Flex the code behind pattern is using the Actionscript class as a base class instead of using the MXML component for that? I mean, instead of extending our AS3 code behind class, why we don't extend our MXML in a new AS3 class? Using that approach seems more natural, because is a real extension, we are adding co... | "Code in front" is a more natural extension and OOP design, because we are extending our MXML with functionalities in AS3 and we don't need to change our parent every time we change our child. But it has a proble, we can't use binding in MXML because now our MXML is our base class and we have our vars/functions in the ... | Opposite code behind in Flex Why in Flex the code behind pattern is using the Actionscript class as a base class instead of using the MXML component for that? I mean, instead of extending our AS3 code behind class, why we don't extend our MXML in a new AS3 class? Using that approach seems more natural, because is a rea... | TITLE:
Opposite code behind in Flex
QUESTION:
Why in Flex the code behind pattern is using the Actionscript class as a base class instead of using the MXML component for that? I mean, instead of extending our AS3 code behind class, why we don't extend our MXML in a new AS3 class? Using that approach seems more natural... | [
"apache-flex",
"code-behind"
] | 3 | 1 | 659 | 4 | 0 | 2011-05-31T06:32:22.020000 | 2011-06-02T13:45:31.717000 |
6,183,809 | 6,183,848 | Using StreamReader to check if a file contains a string | I have a string that is args[0]. Here is my code so far: static void Main(string[] args) { string latestversion = args[0]; // create reader & open file using (StreamReader sr = new StreamReader("C:\\Work\\list.txt")) { while (sr.Peek() >= 0) { // code here } } } I would like to check if my list.txt file contains args[0... | Are you expecting the file to be particularly big? If not, the simplest way of doing it would be to just read the whole thing: using (StreamReader sr = new StreamReader("C:\\Work\\list.txt")) { string contents = sr.ReadToEnd(); if (contents.Contains(args[0])) { //... } } Or: string contents = File.ReadAllText("C:\\Work... | Using StreamReader to check if a file contains a string I have a string that is args[0]. Here is my code so far: static void Main(string[] args) { string latestversion = args[0]; // create reader & open file using (StreamReader sr = new StreamReader("C:\\Work\\list.txt")) { while (sr.Peek() >= 0) { // code here } } } I... | TITLE:
Using StreamReader to check if a file contains a string
QUESTION:
I have a string that is args[0]. Here is my code so far: static void Main(string[] args) { string latestversion = args[0]; // create reader & open file using (StreamReader sr = new StreamReader("C:\\Work\\list.txt")) { while (sr.Peek() >= 0) { //... | [
"c#",
"string",
"file-io"
] | 22 | 38 | 66,749 | 4 | 0 | 2011-05-31T06:32:49.463000 | 2011-05-31T06:37:44.873000 |
6,183,810 | 6,183,852 | Transaction speed vs. Query speed | What is faster, one transaction with many queries or for every query a separate transaction? One transaction with many queries: db.transaction(function (tx){ tx.executeSql('INSERT INTO TEST VALUES ("Halo1","Halo2")', [], win, fail); tx.executeSql('INSERT INTO TEST VALUES ("Halo3","Halo4")', [], win, fail); tx.executeSq... | It's a trade-off. It's almost certainly going to be faster doing one transaction with lots of statements since you're avoiding the overhead of committing those transactions until the end, but measure, don't guess! On the other hand, you don't want to put too much into a single transaction since the DBMS has to maintain... | Transaction speed vs. Query speed What is faster, one transaction with many queries or for every query a separate transaction? One transaction with many queries: db.transaction(function (tx){ tx.executeSql('INSERT INTO TEST VALUES ("Halo1","Halo2")', [], win, fail); tx.executeSql('INSERT INTO TEST VALUES ("Halo3","Halo... | TITLE:
Transaction speed vs. Query speed
QUESTION:
What is faster, one transaction with many queries or for every query a separate transaction? One transaction with many queries: db.transaction(function (tx){ tx.executeSql('INSERT INTO TEST VALUES ("Halo1","Halo2")', [], win, fail); tx.executeSql('INSERT INTO TEST VAL... | [
"javascript",
"sql",
"sqlite",
"cordova"
] | 0 | 2 | 2,076 | 4 | 0 | 2011-05-31T06:32:51.050000 | 2011-05-31T06:38:09.803000 |
6,183,818 | 6,184,145 | How to make Ctrl+= behave like Ctrl+w = in Vim? | A lot of times I find myself using Ctrl + W =, which resizes all windows equally. However, when I add nnoremap = to my.vimrc and restart vim, windows don't resize after pressing Ctrl + =. How do I make Ctrl + = behave like Ctrl + W =? | According to the Vim FAQ this is because Vim can only map key combinations that have an ASCII equivalent, and there is no ASCII equivalent for. | How to make Ctrl+= behave like Ctrl+w = in Vim? A lot of times I find myself using Ctrl + W =, which resizes all windows equally. However, when I add nnoremap = to my.vimrc and restart vim, windows don't resize after pressing Ctrl + =. How do I make Ctrl + = behave like Ctrl + W =? | TITLE:
How to make Ctrl+= behave like Ctrl+w = in Vim?
QUESTION:
A lot of times I find myself using Ctrl + W =, which resizes all windows equally. However, when I add nnoremap = to my.vimrc and restart vim, windows don't resize after pressing Ctrl + =. How do I make Ctrl + = behave like Ctrl + W =?
ANSWER:
According ... | [
"vim"
] | 2 | 7 | 824 | 1 | 0 | 2011-05-31T06:33:37.103000 | 2011-05-31T07:13:46.523000 |
6,183,820 | 6,183,956 | Line-shift report, Line-day report | I'm generating a line-shift report: In my application, I'm providing a dropdownlist for selecting shift and line and they will select a date from calender I have 3 shifts shift1 starts at 7am and ends at 3pm shift2 starts at 3pm and ends at 11pm shift3 starts at 11pm and ends at 3am I have a table called datalogging wh... | You could get your report with following query SELECT d.Machine, CASE WHEN t.time BETWEEN '19:00:00.000' AND '23:59:59.999' THEN 'Shift1' WHEN t.time BETWEEN '00:00:00.000' AND '02:59:59.999' THEN 'Shift1' WHEN t.time BETWEEN '03:00:00.000' AND '10:59:59.999' THEN 'Shift2' WHEN t.time BETWEEN '11:00:00.000' AND '18:59:... | Line-shift report, Line-day report I'm generating a line-shift report: In my application, I'm providing a dropdownlist for selecting shift and line and they will select a date from calender I have 3 shifts shift1 starts at 7am and ends at 3pm shift2 starts at 3pm and ends at 11pm shift3 starts at 11pm and ends at 3am I... | TITLE:
Line-shift report, Line-day report
QUESTION:
I'm generating a line-shift report: In my application, I'm providing a dropdownlist for selecting shift and line and they will select a date from calender I have 3 shifts shift1 starts at 7am and ends at 3pm shift2 starts at 3pm and ends at 11pm shift3 starts at 11pm... | [
"c#",
"sql",
"sql-server",
"sql-server-2005",
"report"
] | 3 | 2 | 200 | 1 | 0 | 2011-05-31T06:33:49.973000 | 2011-05-31T06:51:23.027000 |
6,183,822 | 6,184,327 | How to get the # in some sorted group using SQL and PHP | Scenario: I have a table with games stats called gamesstats. I am given a team (for me the important part is the id), the league and the sesason. Now I could check what games did the team play using my games stats by asking only those where the league and the season are as given and the home team id or visitor team id ... | Sorry, I didn't really understand what you really want as you are saying that everything is "easy done". But I can advice you a bit about making your SQL faster. You should not use so much AVG() calls in your SQL. Just select all distinct AVG()'s that you need and then just calculate all other values in PHP. For exampl... | How to get the # in some sorted group using SQL and PHP Scenario: I have a table with games stats called gamesstats. I am given a team (for me the important part is the id), the league and the sesason. Now I could check what games did the team play using my games stats by asking only those where the league and the seas... | TITLE:
How to get the # in some sorted group using SQL and PHP
QUESTION:
Scenario: I have a table with games stats called gamesstats. I am given a team (for me the important part is the id), the league and the sesason. Now I could check what games did the team play using my games stats by asking only those where the l... | [
"php",
"sql"
] | 0 | 1 | 63 | 1 | 0 | 2011-05-31T06:34:30.490000 | 2011-05-31T07:33:41.867000 |
6,183,824 | 6,184,110 | How I create installable package of desktop projects as single setup | I have created desktop application wherein there are three projects include. any one can give me idea to create installable setup in visual studio 2008 & i feel second problem with | You can create setup project in visual studio 2008 Check this http://balanagaraj.wordpress.com/2007/05/29/create-exe-or-setup-file-in-net-windows-application/ | How I create installable package of desktop projects as single setup I have created desktop application wherein there are three projects include. any one can give me idea to create installable setup in visual studio 2008 & i feel second problem with | TITLE:
How I create installable package of desktop projects as single setup
QUESTION:
I have created desktop application wherein there are three projects include. any one can give me idea to create installable setup in visual studio 2008 & i feel second problem with
ANSWER:
You can create setup project in visual stud... | [
"asp.net",
"release",
"setup-project",
"windows"
] | 0 | 2 | 239 | 1 | 0 | 2011-05-31T06:34:36.730000 | 2011-05-31T07:09:08.137000 |
6,183,841 | 6,183,918 | Dynamically typed languages and remote method invocation | Some may know that PHP methods can be remotely invoked from Flash. Sometimes the input parameter of a remote PHP method is an array of integers. Because PHP is dynamically typed an attacker can pass an array of anything. The array of integers has to be used in a SQL query. At the moment I'm preventing injection like th... | You could use this: $aSafeArray = array_map('intval', $aUnsafeArray); to make sure all passed values are an integer. My advice would be to start using prepared statements! Example: $o->bindParam(':anint', $iInt, PDO::PARAM_INT); | Dynamically typed languages and remote method invocation Some may know that PHP methods can be remotely invoked from Flash. Sometimes the input parameter of a remote PHP method is an array of integers. Because PHP is dynamically typed an attacker can pass an array of anything. The array of integers has to be used in a ... | TITLE:
Dynamically typed languages and remote method invocation
QUESTION:
Some may know that PHP methods can be remotely invoked from Flash. Sometimes the input parameter of a remote PHP method is an array of integers. Because PHP is dynamically typed an attacker can pass an array of anything. The array of integers ha... | [
"php",
"mysql",
"flash",
"apache-flex"
] | 2 | 1 | 231 | 2 | 0 | 2011-05-31T06:36:51.010000 | 2011-05-31T06:45:39.840000 |
6,183,844 | 6,185,332 | Bind XML data(file) to an grid view in android? | can i bind an XML file to an grid view? if we can then how can i do this in android. | If you want a performant and fast search, you'll want to use a SQLiteDatabase ( Tutorial ). You can use the Search-Interface provided by Android to do this the normal way.You can specify the Activity and the art your results are presented to the user. Also, for the Database, you'll want to use a SQLiteOpenHelper to acc... | Bind XML data(file) to an grid view in android? can i bind an XML file to an grid view? if we can then how can i do this in android. | TITLE:
Bind XML data(file) to an grid view in android?
QUESTION:
can i bind an XML file to an grid view? if we can then how can i do this in android.
ANSWER:
If you want a performant and fast search, you'll want to use a SQLiteDatabase ( Tutorial ). You can use the Search-Interface provided by Android to do this the ... | [
"java",
"android",
"android-layout",
"android-widget"
] | 1 | 0 | 1,152 | 1 | 0 | 2011-05-31T06:37:14.983000 | 2011-05-31T09:08:56.563000 |
6,183,865 | 6,184,884 | How to register the interface variable into remobjects pascal script? | I using RemObjects Pascal Script component for Delphi XE, i've the following code: type ITest = interface(IInterface) ['{7762A355-052F-449D-8347-01B59E2D2738}'] procedure Execute; end;
TTest = class(TInterfacedObject, ITest) private procedure Execute; end; procedure TForm1.Button3Click(Sender: TObject); var T: ITest; ... | first you need to register your interface type in the OnCompile event: with ps.Compiler.AddInterface(ps.Compiler.FindInterface('IUnknown'), StringToGuid('{7762A355-052F-449D-8347-01B59E2D2738}'), 'ITest') do RegisterMethod('procedure Execute;', cdRegister); ps.AddRegisteredVariable('data', 'ITest'); then in OnExecute: ... | How to register the interface variable into remobjects pascal script? I using RemObjects Pascal Script component for Delphi XE, i've the following code: type ITest = interface(IInterface) ['{7762A355-052F-449D-8347-01B59E2D2738}'] procedure Execute; end;
TTest = class(TInterfacedObject, ITest) private procedure Execut... | TITLE:
How to register the interface variable into remobjects pascal script?
QUESTION:
I using RemObjects Pascal Script component for Delphi XE, i've the following code: type ITest = interface(IInterface) ['{7762A355-052F-449D-8347-01B59E2D2738}'] procedure Execute; end;
TTest = class(TInterfacedObject, ITest) privat... | [
"delphi",
"pascal",
"delphi-xe",
"pascalscript",
"remobjects"
] | 2 | 2 | 1,540 | 2 | 0 | 2011-05-31T06:39:26.243000 | 2011-05-31T08:30:10.127000 |
6,183,867 | 6,186,928 | Radiobutton Text alignment Issue | I am working in asp.net and have radiobutton list and I want to align their text as I require. Here is what I have currently: I want to make them like this: EDIT: Secondly, when I click Ages From radiobutton, I display a div against this like: and when I click back to All Ages radio button, I want to hide that div. But... | That was the problem of missing closing tag. I must have missed a closing tag of some control. I re-added all controls with taking care of closing tags. Now it is working fine. Thanks all for helping. | Radiobutton Text alignment Issue I am working in asp.net and have radiobutton list and I want to align their text as I require. Here is what I have currently: I want to make them like this: EDIT: Secondly, when I click Ages From radiobutton, I display a div against this like: and when I click back to All Ages radio but... | TITLE:
Radiobutton Text alignment Issue
QUESTION:
I am working in asp.net and have radiobutton list and I want to align their text as I require. Here is what I have currently: I want to make them like this: EDIT: Secondly, when I click Ages From radiobutton, I display a div against this like: and when I click back to ... | [
"asp.net",
"text",
"radio-button"
] | 3 | 1 | 8,474 | 3 | 0 | 2011-05-31T06:39:32.120000 | 2011-05-31T11:34:01.763000 |
6,183,872 | 6,184,017 | show / hide DOM elements in all browsers | I have something very simple but I can not make it work correctly in Webkit and Mozilla This is my HTML <%= image_tag "page/arrow.png"%> STUFF HERE MORE STUFF HERE And this is my JQuery: jQuery(function($) { $(".product").mouseenter( function () { $(this).find(".handle").css('display', 'inline'); //show(); $(this).css(... | I'm not sure if I understood your problem right, but I would recommend to try jQuery's show/hide functions: $(this).find(".handle").show(); $(this).find(".handle").hide(); | show / hide DOM elements in all browsers I have something very simple but I can not make it work correctly in Webkit and Mozilla This is my HTML <%= image_tag "page/arrow.png"%> STUFF HERE MORE STUFF HERE And this is my JQuery: jQuery(function($) { $(".product").mouseenter( function () { $(this).find(".handle").css('di... | TITLE:
show / hide DOM elements in all browsers
QUESTION:
I have something very simple but I can not make it work correctly in Webkit and Mozilla This is my HTML <%= image_tag "page/arrow.png"%> STUFF HERE MORE STUFF HERE And this is my JQuery: jQuery(function($) { $(".product").mouseenter( function () { $(this).find(... | [
"javascript",
"jquery",
"html",
"jquery-ui"
] | 0 | 2 | 3,256 | 3 | 0 | 2011-05-31T06:40:18.670000 | 2011-05-31T06:59:34.947000 |
6,183,878 | 6,183,889 | Url.Action to show page no in url | Trying like this Url.Action("Index", "Home", new { page = 5 }) is giving me url like /Home/Index?page=5 How to get a url like this /Home/Index/5 | By defining a route: routes.MapRoute( "PagedRoute", "{controller}/{action}/{page}", new { controller = "Home", action = "Index", page = UrlParameter.Optional } ); And be careful with the default route (the one that uses an id ) as it is similar. You will might need to put this custom route before the default one or rem... | Url.Action to show page no in url Trying like this Url.Action("Index", "Home", new { page = 5 }) is giving me url like /Home/Index?page=5 How to get a url like this /Home/Index/5 | TITLE:
Url.Action to show page no in url
QUESTION:
Trying like this Url.Action("Index", "Home", new { page = 5 }) is giving me url like /Home/Index?page=5 How to get a url like this /Home/Index/5
ANSWER:
By defining a route: routes.MapRoute( "PagedRoute", "{controller}/{action}/{page}", new { controller = "Home", act... | [
"asp.net-mvc-3"
] | 0 | 1 | 323 | 1 | 0 | 2011-05-31T06:40:42.393000 | 2011-05-31T06:42:27.010000 |
6,183,879 | 6,184,466 | Qt for Symbian S60 - "Feature not supported" | I'm developing an application with Qt for the Symbian platform, and I ran into a problem when testing the app on an S60 phone, Nokia E90. The application compiles just fine, but when I'm installing the sis-file the phone notifies me that a "Feature is not supported". Here's a list of capabilities that I'm using: LocalS... | the question is which version of QtSDK do you use. QtSDK 1.1 does not support S60 anymore. Only Symbian^1 (5th generation) and Symbian^3 are supported by QtSDK 1.1. S60 devices are supported only by the QtSDK 1.0. Best Regards | Qt for Symbian S60 - "Feature not supported" I'm developing an application with Qt for the Symbian platform, and I ran into a problem when testing the app on an S60 phone, Nokia E90. The application compiles just fine, but when I'm installing the sis-file the phone notifies me that a "Feature is not supported". Here's ... | TITLE:
Qt for Symbian S60 - "Feature not supported"
QUESTION:
I'm developing an application with Qt for the Symbian platform, and I ran into a problem when testing the app on an S60 phone, Nokia E90. The application compiles just fine, but when I'm installing the sis-file the phone notifies me that a "Feature is not s... | [
"qt",
"symbian",
"s60",
"sis"
] | 1 | 1 | 1,022 | 1 | 0 | 2011-05-31T06:40:54.870000 | 2011-05-31T07:47:26.193000 |
6,183,882 | 6,184,069 | how to query LIST using linq | Suppose if I add person class instance to list and then I need to query the list using linq. List lst=new List(); lst.add(new person{ID=1,Name="jhon",salary=2500}); lst.add(new person{ID=2,Name="Sena",salary=1500}); lst.add(new person{ID=3,Name="Max",salary=5500}); lst.add(new person{ID=4,Name="Gen",salary=3500}); Now ... | I would also suggest LinqPad as a convenient way to tackle with Linq for both advanced and beginners. Example: | how to query LIST using linq Suppose if I add person class instance to list and then I need to query the list using linq. List lst=new List(); lst.add(new person{ID=1,Name="jhon",salary=2500}); lst.add(new person{ID=2,Name="Sena",salary=1500}); lst.add(new person{ID=3,Name="Max",salary=5500}); lst.add(new person{ID=4,N... | TITLE:
how to query LIST using linq
QUESTION:
Suppose if I add person class instance to list and then I need to query the list using linq. List lst=new List(); lst.add(new person{ID=1,Name="jhon",salary=2500}); lst.add(new person{ID=2,Name="Sena",salary=1500}); lst.add(new person{ID=3,Name="Max",salary=5500}); lst.add... | [
"c#",
"linq-to-objects"
] | 23 | 34 | 131,534 | 4 | 0 | 2011-05-31T06:41:38.273000 | 2011-05-31T07:05:12.410000 |
6,183,883 | 6,183,925 | Adding icons to navigation bar in xcode | I want to add icon to the navigation bar present in my xcode project.Can anyone guide me through any method to do so and also i want to do it programmatically.Any help will be appreciated. Thanks, Christy | IBOutlet UIImageView *image;
UIImage *image1=[UIImage imageNamed:@name.jpg"]; image=[[UIImageview alloc]initWithImage:image1];
image.frame=CGRectMake(0,0,320,400); navigationbar.titleview=image; EDIT: image to the right side: UIButton* fakeButton = (UIButton *) [[UIImageView alloc] initWithImage:[UIImage imageNamed:@... | Adding icons to navigation bar in xcode I want to add icon to the navigation bar present in my xcode project.Can anyone guide me through any method to do so and also i want to do it programmatically.Any help will be appreciated. Thanks, Christy | TITLE:
Adding icons to navigation bar in xcode
QUESTION:
I want to add icon to the navigation bar present in my xcode project.Can anyone guide me through any method to do so and also i want to do it programmatically.Any help will be appreciated. Thanks, Christy
ANSWER:
IBOutlet UIImageView *image;
UIImage *image1=[U... | [
"iphone",
"cocoa-touch",
"xcode",
"ipad",
"uinavigationcontroller"
] | 1 | 1 | 10,269 | 2 | 0 | 2011-05-31T06:41:55.393000 | 2011-05-31T06:47:09.117000 |
6,183,888 | 6,184,310 | Is it possible to set pthread CPU affinity in OS X? | In Linux there is a sched_setaffinity() function defined in sched.h, but I can't seem to find anything like that in Mac OS X 10.6 pthreads implementation... If it is not possible to set affinity, what is the default policy in OS X? | Mac OS X has Thread Affinity API and you can use it with pthread ID as thread_policy_set(pthread_mach_thread_np(pthreadId), but, as far as I know, there are no APIs like sched_setaffinity. | Is it possible to set pthread CPU affinity in OS X? In Linux there is a sched_setaffinity() function defined in sched.h, but I can't seem to find anything like that in Mac OS X 10.6 pthreads implementation... If it is not possible to set affinity, what is the default policy in OS X? | TITLE:
Is it possible to set pthread CPU affinity in OS X?
QUESTION:
In Linux there is a sched_setaffinity() function defined in sched.h, but I can't seem to find anything like that in Mac OS X 10.6 pthreads implementation... If it is not possible to set affinity, what is the default policy in OS X?
ANSWER:
Mac OS X ... | [
"linux",
"multithreading",
"macos",
"pthreads",
"affinity"
] | 6 | 6 | 7,351 | 1 | 0 | 2011-05-31T06:42:17.837000 | 2011-05-31T07:31:17.560000 |
6,183,891 | 6,183,943 | Enforcing event handling wireup | Is there a way to perform compile time enforcement of event handling wireup? So for example lets say I have a class that exposes the standard EventHandler can I ensure that any instantiated instances of this class have the OnMyEvent handler, handled? (Preferably at compile time) The only way I can see of performing thi... | Events are usually intended for optional consumption by the calling code of the object - for example, as an observer (or multiple observers). It is pretty rare that handling the event is enforced. There is no standard language / compiler construct for verifying an event gets subscribed at compile-time (and I suspect it... | Enforcing event handling wireup Is there a way to perform compile time enforcement of event handling wireup? So for example lets say I have a class that exposes the standard EventHandler can I ensure that any instantiated instances of this class have the OnMyEvent handler, handled? (Preferably at compile time) The only... | TITLE:
Enforcing event handling wireup
QUESTION:
Is there a way to perform compile time enforcement of event handling wireup? So for example lets say I have a class that exposes the standard EventHandler can I ensure that any instantiated instances of this class have the OnMyEvent handler, handled? (Preferably at comp... | [
"c#",
"events",
"language-agnostic",
"programming-languages",
"delegates"
] | 6 | 3 | 151 | 1 | 0 | 2011-05-31T06:42:38.360000 | 2011-05-31T06:49:22.820000 |
6,183,894 | 6,184,056 | Does android support HFP bluetooth profile? | Does android support Bluetooth HFP profile? Or is it device dependent?. What are the profiles supported by Android at the OS level. | Next profiles are natively supported by Android: A2DP, HFP, HSP. By "natively" I mean that Android is capable to stream audio to devices that support at least one of these profiles. Handling of A2DP and HFP profiles is almost transparent to your application. You just play audio into STREAM_MUSIC and those devices will ... | Does android support HFP bluetooth profile? Does android support Bluetooth HFP profile? Or is it device dependent?. What are the profiles supported by Android at the OS level. | TITLE:
Does android support HFP bluetooth profile?
QUESTION:
Does android support Bluetooth HFP profile? Or is it device dependent?. What are the profiles supported by Android at the OS level.
ANSWER:
Next profiles are natively supported by Android: A2DP, HFP, HSP. By "natively" I mean that Android is capable to stre... | [
"android",
"bluetooth"
] | 2 | 3 | 15,714 | 1 | 0 | 2011-05-31T06:43:23.893000 | 2011-05-31T07:03:54.997000 |
6,183,899 | 6,183,935 | undefined reference to `dlopen' | I have a program that does not build with modern GCC with the foollowing output: gcc -I/usr/lib/qt3/include -I/opt/kde3/include/ -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -lqt-mt -ldl -L/usr/lib/qt3/lib64 -o autocheck autocheck.cpp autocheck.cpp: In ... | Move autocheck.cpp so that it is before the libraries in your command. Libraries are only searched for things that need resolving in files that appear before them. So your command should look like this: gcc autocheck.cpp -I/usr/lib/qt3/include -I/opt/kde3/include/ -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstac... | undefined reference to `dlopen' I have a program that does not build with modern GCC with the foollowing output: gcc -I/usr/lib/qt3/include -I/opt/kde3/include/ -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -lqt-mt -ldl -L/usr/lib/qt3/lib64 -o autocheck ... | TITLE:
undefined reference to `dlopen'
QUESTION:
I have a program that does not build with modern GCC with the foollowing output: gcc -I/usr/lib/qt3/include -I/opt/kde3/include/ -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -lqt-mt -ldl -L/usr/lib/qt3/l... | [
"linux",
"gcc",
"linker"
] | 2 | 15 | 18,858 | 1 | 0 | 2011-05-31T06:44:02.797000 | 2011-05-31T06:48:11.210000 |
6,183,910 | 6,183,950 | FLV duration from Class | I have a class which load and play a flv video file. My problem is, How can I get the flv`s duration in my main code?.. This is my video class: package src { import flash.display.Sprite; import flash.media.Video; import flash.net.NetConnection; import flash.net.NetStream; import flash.events.Event; import flash.events.... | Add a private var at the top: private var _duration:Number = 0; Update this like so: public function metaDataHandler(infoObject:Object):void { _duration = infoObject["duration"]; } Now create a getter for duration. public function get duration():Number { return _duration; } Now you can do a: trace(Veed.duration); The m... | FLV duration from Class I have a class which load and play a flv video file. My problem is, How can I get the flv`s duration in my main code?.. This is my video class: package src { import flash.display.Sprite; import flash.media.Video; import flash.net.NetConnection; import flash.net.NetStream; import flash.events.Eve... | TITLE:
FLV duration from Class
QUESTION:
I have a class which load and play a flv video file. My problem is, How can I get the flv`s duration in my main code?.. This is my video class: package src { import flash.display.Sprite; import flash.media.Video; import flash.net.NetConnection; import flash.net.NetStream; impor... | [
"flash",
"actionscript-3",
"class",
"video",
"duration"
] | 0 | 1 | 256 | 1 | 0 | 2011-05-31T06:45:05.397000 | 2011-05-31T06:50:48.580000 |
6,183,911 | 6,184,032 | How to switch views using Objective-C and Interface Builder | I am creating a program that will run an experiment on a user. It has a 'start' page with a button. When they click the button, I want the window to change to the 'test' page. I believe this is done by switching views, and I have tried to find some tutorials/answered questions on it by I have had trouble due to a few t... | Let me strongly suggest that you forget about your particular task for a little while and instead spend some time learning how the Cocoa framework works. A good place to start might be the Cocoa Application Tutorial, which will walk you through the creation of a small MacOS X application (and quite possibly answer your... | How to switch views using Objective-C and Interface Builder I am creating a program that will run an experiment on a user. It has a 'start' page with a button. When they click the button, I want the window to change to the 'test' page. I believe this is done by switching views, and I have tried to find some tutorials/a... | TITLE:
How to switch views using Objective-C and Interface Builder
QUESTION:
I am creating a program that will run an experiment on a user. It has a 'start' page with a button. When they click the button, I want the window to change to the 'test' page. I believe this is done by switching views, and I have tried to fin... | [
"objective-c",
"xcode",
"interface-builder",
"view"
] | 2 | 3 | 2,470 | 3 | 0 | 2011-05-31T06:45:05.677000 | 2011-05-31T07:02:10.807000 |
6,183,916 | 6,184,296 | want to send javascript code to socket.io server | I want to send a javascript code to the socket.io server so that server broadcast to the clients and that code get executed. what i tried i make a json variable like this.and send that via socket.io var sent={ 'code': function(){ console.log('javascript code'); }
};
socket.send(sent); when i check at server the messa... | Do not do this. You will open all listening clients to being hacked. that said......you could follow pimbdb and pass the function in as a string, then use eval on the receiving end to execute it: // on the sending client var sent = { "code": "function() { /* do something not evil */ }" } socket.send(sent);
// on the r... | want to send javascript code to socket.io server I want to send a javascript code to the socket.io server so that server broadcast to the clients and that code get executed. what i tried i make a json variable like this.and send that via socket.io var sent={ 'code': function(){ console.log('javascript code'); }
};
so... | TITLE:
want to send javascript code to socket.io server
QUESTION:
I want to send a javascript code to the socket.io server so that server broadcast to the clients and that code get executed. what i tried i make a json variable like this.and send that via socket.io var sent={ 'code': function(){ console.log('javascript... | [
"javascript",
"socket.io"
] | 3 | 2 | 570 | 1 | 0 | 2011-05-31T06:45:27.427000 | 2011-05-31T07:29:38.007000 |
6,183,926 | 6,183,968 | <h:inputText> howto execute bean method on blur? | I have on form and what I need is to execute some method from backing bean on BLUR event: public void test() { System.out.print("HELLO!"); } Can you help me? | You can use @ManagedBean(name = "managedBean") public class Bean { private String val; // getter and setter...
public void test() { System.out.print("HELLO!"); }
} Alternative: If you are using richfaces then you can use a4j:jsFunction See Also JSF2: Ajax in JSF – using f:ajax tag How-to-update-a-value-displayed-in-t... | <h:inputText> howto execute bean method on blur? I have on form and what I need is to execute some method from backing bean on BLUR event: public void test() { System.out.print("HELLO!"); } Can you help me? | TITLE:
<h:inputText> howto execute bean method on blur?
QUESTION:
I have on form and what I need is to execute some method from backing bean on BLUR event: public void test() { System.out.print("HELLO!"); } Can you help me?
ANSWER:
You can use @ManagedBean(name = "managedBean") public class Bean { private String val;... | [
"java",
"ajax",
"jsf"
] | 2 | 8 | 6,535 | 1 | 0 | 2011-05-31T06:47:14.717000 | 2011-05-31T06:52:58.850000 |
6,183,927 | 6,184,127 | Exception handling with get_meta_tags() & get_headers()? | In PHP, I am using get_meta_tags() and get_headers(), however, when there is a 404, those two functions throw a warning. Is there any way for me to catch it? Thanks! | get_headers does not throw a Warning/Error on 404, but get_meta_tags does. So you can check the header response and do something, when it's not OK: $url = 'http://www.example.com/';
$headers = array(); $metatags = array();
$validhost = filter_var(gethostbyname(parse_url($url,PHP_URL_HOST)), FILTER_VALIDATE_IP); if($v... | Exception handling with get_meta_tags() & get_headers()? In PHP, I am using get_meta_tags() and get_headers(), however, when there is a 404, those two functions throw a warning. Is there any way for me to catch it? Thanks! | TITLE:
Exception handling with get_meta_tags() & get_headers()?
QUESTION:
In PHP, I am using get_meta_tags() and get_headers(), however, when there is a 404, those two functions throw a warning. Is there any way for me to catch it? Thanks!
ANSWER:
get_headers does not throw a Warning/Error on 404, but get_meta_tags d... | [
"php",
"exception",
"get-headers"
] | 3 | 6 | 1,996 | 3 | 0 | 2011-05-31T06:47:20.113000 | 2011-05-31T07:11:03.873000 |
6,183,932 | 6,186,120 | What are the differences between B-tree and B*-tree, except the requirement for fullness? | I know about this question, but it's about B-tree and B+-tree. Sorry, if there's similar for B*-tree, but I couldn't find such. So, what is the difference between these two trees? The wikipedia article about B*-trees is very short. The only difference, that is noted there, is "non-root nodes to be at least 2/3 full ins... | Edited No difference other than min. fill factor. Page #489 (source: mit.edu ) From the above book, B - tree * is a variant of a B-tree that requires each internal node to be at least 2/3 full, rather than at least half full. Knuth also defines the B* tree exactly like that (The art of computer programming, Vol. 3). " ... | What are the differences between B-tree and B*-tree, except the requirement for fullness? I know about this question, but it's about B-tree and B+-tree. Sorry, if there's similar for B*-tree, but I couldn't find such. So, what is the difference between these two trees? The wikipedia article about B*-trees is very short... | TITLE:
What are the differences between B-tree and B*-tree, except the requirement for fullness?
QUESTION:
I know about this question, but it's about B-tree and B+-tree. Sorry, if there's similar for B*-tree, but I couldn't find such. So, what is the difference between these two trees? The wikipedia article about B*-t... | [
"algorithm",
"data-structures",
"b-tree"
] | 11 | 14 | 9,036 | 2 | 0 | 2011-05-31T06:47:57.183000 | 2011-05-31T10:20:26.733000 |
6,183,934 | 6,185,474 | Problem changing button size when pressed in Android | I have tried changing the size of my button when I press it but nothing seem to work. The button is created in main.xml: And the code for the button logic is: button1.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { if(event.getAction() == MotionEvent.ACTION_... | You can set button width and height using the following code to set button width and height button1.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { RelativeLayout.LayoutParams lp = (LayoutParams) b.getLayoutParams(); if(event.getAction() == MotionEvent.ACTIO... | Problem changing button size when pressed in Android I have tried changing the size of my button when I press it but nothing seem to work. The button is created in main.xml: And the code for the button logic is: button1.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent... | TITLE:
Problem changing button size when pressed in Android
QUESTION:
I have tried changing the size of my button when I press it but nothing seem to work. The button is created in main.xml: And the code for the button logic is: button1.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(V... | [
"android",
"button"
] | 3 | 3 | 4,040 | 3 | 0 | 2011-05-31T06:48:03.610000 | 2011-05-31T09:21:51.457000 |
6,183,944 | 6,183,979 | swap regex matches | How can I swap the match and replace shown below? //each line contains 5 s///g, shown below with only 2 s///g:silent! %s/ó/ó/g |:silent! %s/ú/ú/g to:silent! %s/ó/ó/g |:silent! %s/ú/ú/g | In Vim: try this (using + as a delimiter). Note that this will not handle the special meanings of characters.:s+silent! %s/\zs\(\%([^\\/]\|\\.\)*\)/\(\%([^\\/]\|\\.\)*\)\ze/g+\2/\1+g With the verymagic option ( \v )::s@\vsilent! \%s/\zs(%([^\\/]|\\.)*)/(%([^\\/]|\\.)*)\ze/g@\2/\1@g | swap regex matches How can I swap the match and replace shown below? //each line contains 5 s///g, shown below with only 2 s///g:silent! %s/ó/ó/g |:silent! %s/ú/ú/g to:silent! %s/ó/ó/g |:silent! %s/ú/ú/g | TITLE:
swap regex matches
QUESTION:
How can I swap the match and replace shown below? //each line contains 5 s///g, shown below with only 2 s///g:silent! %s/ó/ó/g |:silent! %s/ú/ú/g to:silent! %s/ó/ó/g |:silent! %s/ú/ú/g
ANSWER:
In Vim: try this (using + as a delimiter). Note that this will not handle the special mea... | [
"vim"
] | 1 | 1 | 350 | 1 | 0 | 2011-05-31T06:49:38.643000 | 2011-05-31T06:54:29.057000 |
6,183,945 | 6,184,072 | When to index, what to index in Mongoid? | I'm a bit new to indexes, but I am curious about the usecases for an index. (I assume it makes queries on the indexed fields much faster.) Is there a criteria for determining what to index and when to index? What kind of performance benefits should I expect -- specifically using Mongoid with MongoDb on a Rails app? | Check out Indexes MongoDB docs and Indexing Advice and FAQ, lots of great info here. | When to index, what to index in Mongoid? I'm a bit new to indexes, but I am curious about the usecases for an index. (I assume it makes queries on the indexed fields much faster.) Is there a criteria for determining what to index and when to index? What kind of performance benefits should I expect -- specifically using... | TITLE:
When to index, what to index in Mongoid?
QUESTION:
I'm a bit new to indexes, but I am curious about the usecases for an index. (I assume it makes queries on the indexed fields much faster.) Is there a criteria for determining what to index and when to index? What kind of performance benefits should I expect -- ... | [
"ruby-on-rails",
"mongodb",
"mongoid",
"indexing"
] | 5 | 11 | 3,521 | 1 | 0 | 2011-05-31T06:49:47.737000 | 2011-05-31T07:05:21.937000 |
6,183,954 | 6,195,560 | Writing a simple Spring example using the Play! Framework | I'm trying to set up the Spring 1.0.1 module to work with Play! 1.2.1. Firstly I added the Spring module to the dependencies.yml: - play -> spring 1.0.1 Then I added the following as per the documentation in the application.conf: play.spring.component-scan=true Then I ran the following to download the dependencies and ... | Okay I have come up with a solution that works for me. So, to write a test that injects a mock/test version of a bean, I did the following: @Test public void testSomething() { GenericApplicationContext context = SpringPlugin.applicationContext; GenericBeanDefinition definition = new GenericBeanDefinition(); definition.... | Writing a simple Spring example using the Play! Framework I'm trying to set up the Spring 1.0.1 module to work with Play! 1.2.1. Firstly I added the Spring module to the dependencies.yml: - play -> spring 1.0.1 Then I added the following as per the documentation in the application.conf: play.spring.component-scan=true ... | TITLE:
Writing a simple Spring example using the Play! Framework
QUESTION:
I'm trying to set up the Spring 1.0.1 module to work with Play! 1.2.1. Firstly I added the Spring module to the dependencies.yml: - play -> spring 1.0.1 Then I added the following as per the documentation in the application.conf: play.spring.co... | [
"java",
"spring",
"playframework"
] | 4 | 1 | 2,248 | 2 | 0 | 2011-05-31T06:51:08.297000 | 2011-06-01T02:17:02.453000 |
6,183,959 | 6,184,125 | How can we capture notifications of row deletion in xamDataGrid? | We have a Infragistics xamDataGrid with the DataSource bound to a BindingList. We have some custom text set on the group by header and need to reset it every time an item is added or deleted. Is there a when to be notified when an item is deleted in the DataSource so that we can update the group by header? The insertio... | You can use the same event that the grid you are setting the data source to uses if the data source is an IBindingList: the ListChanged event. Alternatively if your data source also implements INotifyCollectionChanged you can use the CollectionChanged event. To do this you just subscribe to the event in the same sectio... | How can we capture notifications of row deletion in xamDataGrid? We have a Infragistics xamDataGrid with the DataSource bound to a BindingList. We have some custom text set on the group by header and need to reset it every time an item is added or deleted. Is there a when to be notified when an item is deleted in the D... | TITLE:
How can we capture notifications of row deletion in xamDataGrid?
QUESTION:
We have a Infragistics xamDataGrid with the DataSource bound to a BindingList. We have some custom text set on the group by header and need to reset it every time an item is added or deleted. Is there a when to be notified when an item i... | [
"c#",
"wpf",
"infragistics",
"xamdatagrid"
] | 3 | 2 | 1,910 | 1 | 0 | 2011-05-31T06:51:49.217000 | 2011-05-31T07:10:27.557000 |
6,183,961 | 6,183,984 | How to get last values from arrays | I am checking one line of code from my project if ( (test == 0) && lenght.Matches(new Version(Convert.ToInt64(version))) ) Whenever i debugged i am getting currentVersion as a constant value of 18 digit number,but the result i wanted is last exisitng datas version i am getting ' length ' as using the following code len... | Using LINQ-expression currentVersion.Version = (long)m_spodata.DataVersion.Rows.Last()["Version"]; Using Rows.Count property currentVersion.Version = (long) m_spodata.DataVersion.Rows[m_spodata.DataVersion.Rows.Count - 1]["Version"]; | How to get last values from arrays I am checking one line of code from my project if ( (test == 0) && lenght.Matches(new Version(Convert.ToInt64(version))) ) Whenever i debugged i am getting currentVersion as a constant value of 18 digit number,but the result i wanted is last exisitng datas version i am getting ' lengt... | TITLE:
How to get last values from arrays
QUESTION:
I am checking one line of code from my project if ( (test == 0) && lenght.Matches(new Version(Convert.ToInt64(version))) ) Whenever i debugged i am getting currentVersion as a constant value of 18 digit number,but the result i wanted is last exisitng datas version i ... | [
"c#",
".net",
"arrays",
"visual-studio",
"visual-studio-2005"
] | 2 | 4 | 394 | 4 | 0 | 2011-05-31T06:52:25.710000 | 2011-05-31T06:55:09.800000 |
6,183,971 | 6,184,013 | Verifying Cookies in JSP using JSTL | I'm trying to figure out how cookies can be used to prevent a hacker from typing in a URL to an internal part of a java web application that shouldn't be accessible unless the user is logged in. For example, I'd like to prevent a hacker from typing in http://domain.com/myapp/listtable.jsp and be able to view the table ... | This should be the Job of Filter not of view Configure a Filter to check for your protected resources Check if user's session has some value that logically makes him logged in. if not redirect user to login view See Also universal-login-authorization-in-jsp why-business-logic-should-be-moved-out-of-jsp | Verifying Cookies in JSP using JSTL I'm trying to figure out how cookies can be used to prevent a hacker from typing in a URL to an internal part of a java web application that shouldn't be accessible unless the user is logged in. For example, I'd like to prevent a hacker from typing in http://domain.com/myapp/listtabl... | TITLE:
Verifying Cookies in JSP using JSTL
QUESTION:
I'm trying to figure out how cookies can be used to prevent a hacker from typing in a URL to an internal part of a java web application that shouldn't be accessible unless the user is logged in. For example, I'd like to prevent a hacker from typing in http://domain.... | [
"java",
"jsp",
"cookies",
"jstl"
] | 0 | 2 | 3,213 | 3 | 0 | 2011-05-31T06:53:20.550000 | 2011-05-31T06:59:10.473000 |
6,183,972 | 6,227,157 | Problem building ECOS for "Linux Synthetic" target | I'm trying to building Synthetic Linux target with ECOS. My software environment: Ubuntu 11.4 GCC 4.5.2 ECOS 3.0 In the Config Tool I have set up "Linux Sythetic" target with "all" packages. Pressing F7 (build) the compilation starts, but later it says: /opt/ecos/ecos-3.0/packages/hal/synth/i386linux/v3_0/src/syscall-i... | The problem seems to be related to binutils. On Debian, a downgrade to 2.20.1-16 worked for me. http://ecos.sourceware.org/ml/ecos-discuss/2011-06/msg00010.html EDIT: Follow link, there's a proper fix too. | Problem building ECOS for "Linux Synthetic" target I'm trying to building Synthetic Linux target with ECOS. My software environment: Ubuntu 11.4 GCC 4.5.2 ECOS 3.0 In the Config Tool I have set up "Linux Sythetic" target with "all" packages. Pressing F7 (build) the compilation starts, but later it says: /opt/ecos/ecos-... | TITLE:
Problem building ECOS for "Linux Synthetic" target
QUESTION:
I'm trying to building Synthetic Linux target with ECOS. My software environment: Ubuntu 11.4 GCC 4.5.2 ECOS 3.0 In the Config Tool I have set up "Linux Sythetic" target with "all" packages. Pressing F7 (build) the compilation starts, but later it say... | [
"ecos"
] | 1 | 0 | 716 | 1 | 0 | 2011-05-31T06:53:39.573000 | 2011-06-03T12:35:47.710000 |
6,183,976 | 6,185,411 | how to get a notification for every checkin in clearcase for a particular Vob | In our project so many file changes are happening, I want some notification for every checkin. so that every one in the team can know the files changed in the project. I want some basic information about the file like comments and the branch. | That means "trigger": specifically a post-op checking trigger: cleartool mktrtype -c "Trigger to notify on checking" -element -all -postop checkin -execwin "ccperl \\path\to\notification\script" -execunix "Perl /path/to/notification.pl" NOTIFY_ON_CHECKING You can get some ideas from the "ten best triggers" IBM page. Se... | how to get a notification for every checkin in clearcase for a particular Vob In our project so many file changes are happening, I want some notification for every checkin. so that every one in the team can know the files changed in the project. I want some basic information about the file like comments and the branch. | TITLE:
how to get a notification for every checkin in clearcase for a particular Vob
QUESTION:
In our project so many file changes are happening, I want some notification for every checkin. so that every one in the team can know the files changed in the project. I want some basic information about the file like commen... | [
"clearcase"
] | 1 | 2 | 2,074 | 1 | 0 | 2011-05-31T06:54:18.780000 | 2011-05-31T09:15:39.023000 |
6,183,977 | 6,185,400 | CAPTCHA control working in Azure | Can you please point me to an implementation of asp.net CAPTCHA control which work on AZURE? (It should not employ sessions) Thanks. | If you don't want to use Session data, then there are solutions out there, e.g. http://www.eggheadcafe.com/articles/20040331.asp - or you could use a human-test instead of a captcha - e.g. asking what 6 times 9 is However, it's probably best to instead use a third party solution such as http://code.google.com/apis/reca... | CAPTCHA control working in Azure Can you please point me to an implementation of asp.net CAPTCHA control which work on AZURE? (It should not employ sessions) Thanks. | TITLE:
CAPTCHA control working in Azure
QUESTION:
Can you please point me to an implementation of asp.net CAPTCHA control which work on AZURE? (It should not employ sessions) Thanks.
ANSWER:
If you don't want to use Session data, then there are solutions out there, e.g. http://www.eggheadcafe.com/articles/20040331.as... | [
"asp.net",
"azure",
"captcha"
] | 0 | 1 | 2,650 | 2 | 0 | 2011-05-31T06:54:20.020000 | 2011-05-31T09:14:25.957000 |
6,183,981 | 6,188,869 | How do I change the root password on a remote machine with Net::OpenSSH? | I want to change the root password on a remote Linux machine with a Perl script. My first try was the following code: use Net::OpenSSH; my $ssh = Net::OpenSSH->new( "linuxpc", user => "root", password => "root", master_stderr_discard => 1 ); my @changepass = $ssh->capture( { stderr_discard => 1, stdin_data => "newpw123... | Net::OpenSSH distribution includes a sample script that does exactly what you want! change_passwd.pl | How do I change the root password on a remote machine with Net::OpenSSH? I want to change the root password on a remote Linux machine with a Perl script. My first try was the following code: use Net::OpenSSH; my $ssh = Net::OpenSSH->new( "linuxpc", user => "root", password => "root", master_stderr_discard => 1 ); my @c... | TITLE:
How do I change the root password on a remote machine with Net::OpenSSH?
QUESTION:
I want to change the root password on a remote Linux machine with a Perl script. My first try was the following code: use Net::OpenSSH; my $ssh = Net::OpenSSH->new( "linuxpc", user => "root", password => "root", master_stderr_dis... | [
"perl",
"ssh",
"root",
"change-password"
] | 1 | 4 | 2,842 | 2 | 0 | 2011-05-31T06:54:31.790000 | 2011-05-31T14:11:22.153000 |
6,183,987 | 6,184,302 | How to access ItemsControl's ItemsSource element from the ItemsControl's Item's code behind? | In my main view I have an ItemsControl which is bound to a collection of objects: Where the ActivationLevelTemplate is just another view: In this view there is a text block, bound to a property of an object from the collection mentioned above. The property is displayed correctly, and now I need to access other properti... | What is important is the context in which you try to access that object. If you for example deal with an event inside the DataTemplate you can easily get the object from the DataContext of the sender (has to be a FrameworkElement), e.g. if i were to handle a button click: private void Button_Click(object sender, Routed... | How to access ItemsControl's ItemsSource element from the ItemsControl's Item's code behind? In my main view I have an ItemsControl which is bound to a collection of objects: Where the ActivationLevelTemplate is just another view: In this view there is a text block, bound to a property of an object from the collection ... | TITLE:
How to access ItemsControl's ItemsSource element from the ItemsControl's Item's code behind?
QUESTION:
In my main view I have an ItemsControl which is bound to a collection of objects: Where the ActivationLevelTemplate is just another view: In this view there is a text block, bound to a property of an object fr... | [
"wpf",
"itemscontrol",
"code-behind"
] | 3 | 5 | 7,402 | 2 | 0 | 2011-05-31T06:55:28.117000 | 2011-05-31T07:30:34.290000 |
6,183,989 | 6,184,964 | EntityFramework EntityObject current changing question | I want to track changes when current record changes in ObjectSet. Maybe something like BindingSource.CurrentChanged. Can anybody help me with this issue? | If you need to get state of any entity you can just call: context.ObjectStateManager.GetObjectStateEntry(editedEntity).State | EntityFramework EntityObject current changing question I want to track changes when current record changes in ObjectSet. Maybe something like BindingSource.CurrentChanged. Can anybody help me with this issue? | TITLE:
EntityFramework EntityObject current changing question
QUESTION:
I want to track changes when current record changes in ObjectSet. Maybe something like BindingSource.CurrentChanged. Can anybody help me with this issue?
ANSWER:
If you need to get state of any entity you can just call: context.ObjectStateManager... | [
"entity-framework"
] | 1 | 2 | 115 | 1 | 0 | 2011-05-31T06:55:40.807000 | 2011-05-31T08:38:06.360000 |
6,184,004 | 6,184,737 | Live updating a table error | I've a live insert form which is supposed to append to a table the value if it's actually inserted in the database. So, I have this javascript/jquery function: else{ var data = 'action=insert&porcab=' + porcAbandoned + '&porcan=' + porcAnswered; data = data + '&secab=' + secAbandoned + '&secan=' + secAnswered + '&name=... | You didn't close the class attribute, f.ex: row = row + ' '+porcAbandoned+' % '; ________________________________________________________________________________/\ | Live updating a table error I've a live insert form which is supposed to append to a table the value if it's actually inserted in the database. So, I have this javascript/jquery function: else{ var data = 'action=insert&porcab=' + porcAbandoned + '&porcan=' + porcAnswered; data = data + '&secab=' + secAbandoned + '&sec... | TITLE:
Live updating a table error
QUESTION:
I've a live insert form which is supposed to append to a table the value if it's actually inserted in the database. So, I have this javascript/jquery function: else{ var data = 'action=insert&porcab=' + porcAbandoned + '&porcan=' + porcAnswered; data = data + '&secab=' + se... | [
"javascript",
"jquery",
"ajax"
] | 0 | 0 | 128 | 2 | 0 | 2011-05-31T06:57:10.293000 | 2011-05-31T08:15:33.867000 |
6,184,006 | 6,184,235 | xsl attribute namespace | I have the following xml When applying the xsl it produces whereas I need How should I modify my xsl to get the result I need? I use xalan XSLT processor. | You need just to match the elements for which you want the namespace declared. The processor will apply the namespace for you. XSLT 1.0 tested under MSXSL 4.0 (and also tested as XSLT 2.0 under Saxon-HE 9.2.1.1J ) | xsl attribute namespace I have the following xml When applying the xsl it produces whereas I need How should I modify my xsl to get the result I need? I use xalan XSLT processor. | TITLE:
xsl attribute namespace
QUESTION:
I have the following xml When applying the xsl it produces whereas I need How should I modify my xsl to get the result I need? I use xalan XSLT processor.
ANSWER:
You need just to match the elements for which you want the namespace declared. The processor will apply the namesp... | [
"xslt"
] | 2 | 5 | 6,863 | 1 | 0 | 2011-05-31T06:57:28.607000 | 2011-05-31T07:22:57.803000 |
6,184,010 | 6,184,099 | Record the time spent by an user in a page and send that data to a php file...? | Can any one help me in recording time spent by the user in a particular page? I also need to send that data to a PHP file where it will need to be stored in a database. This is what I have so far: var time = 1;
function timeHere() { time = time + 1; finalTime = time / 10; } function sayTime() { finalTime = time / 10; ... | I would use jQuery, but still I'm not fond on the idea. var startTime = 0;
$(function() { startTime = Date.now(); });
$(window).bind('beforeunload', function() { $.ajax({async: false, // Necessary, because the closing code has // to be suspended until the ajax succeeds url: 'store.php', data: {time: Date.now() - star... | Record the time spent by an user in a page and send that data to a php file...? Can any one help me in recording time spent by the user in a particular page? I also need to send that data to a PHP file where it will need to be stored in a database. This is what I have so far: var time = 1;
function timeHere() { time =... | TITLE:
Record the time spent by an user in a page and send that data to a php file...?
QUESTION:
Can any one help me in recording time spent by the user in a particular page? I also need to send that data to a PHP file where it will need to be stored in a database. This is what I have so far: var time = 1;
function t... | [
"php",
"javascript",
"ajax"
] | 2 | 2 | 2,286 | 1 | 0 | 2011-05-31T06:58:14.127000 | 2011-05-31T07:08:16.760000 |
6,184,014 | 6,186,858 | Squashing complete history before a certain tag | Following scenario: I have a repo with a large history (migrated from SVN which was used since 2006) and want to push the newer history to an external server. I have a tag, say mytag and want to delete all commits that occurred before that tag but want to keep the history that occurred since this tag. I tried to do it ... | Update: note that in the below I'm assuming that mytag only has one parent commit, otherwise it's a bit more complicated. First, let's assume that you only have one root commit and that it's f414f31. (If you need to find all the root commits you can do that with the first command in this answer.) To be safe, let's crea... | Squashing complete history before a certain tag Following scenario: I have a repo with a large history (migrated from SVN which was used since 2006) and want to push the newer history to an external server. I have a tag, say mytag and want to delete all commits that occurred before that tag but want to keep the history... | TITLE:
Squashing complete history before a certain tag
QUESTION:
Following scenario: I have a repo with a large history (migrated from SVN which was used since 2006) and want to push the newer history to an external server. I have a tag, say mytag and want to delete all commits that occurred before that tag but want t... | [
"git",
"history",
"rebase"
] | 2 | 3 | 230 | 2 | 0 | 2011-05-31T06:59:13.800000 | 2011-05-31T11:26:36.080000 |
6,184,015 | 6,184,818 | Embedded systems header functions | I am new to embedded systems and want to learn more, I am currently optimizing a software with regards on the footprint for an ARM embedded system, and are wondering, the header files that you include in your source files. Where are they put? Right now I am just using a software (OVP) to simulate the ARM hardware platf... | You appear to possess a few fundamental misunderstandings about compiled executable code. The following applies to embedded and desktop systems. Header files are no more than sourcefiles like any other. The difference is that they are inserted into the compilation unit by the pre-processor rather than compiled directly... | Embedded systems header functions I am new to embedded systems and want to learn more, I am currently optimizing a software with regards on the footprint for an ARM embedded system, and are wondering, the header files that you include in your source files. Where are they put? Right now I am just using a software (OVP) ... | TITLE:
Embedded systems header functions
QUESTION:
I am new to embedded systems and want to learn more, I am currently optimizing a software with regards on the footprint for an ARM embedded system, and are wondering, the header files that you include in your source files. Where are they put? Right now I am just using... | [
"c",
"embedded"
] | 5 | 11 | 2,643 | 2 | 0 | 2011-05-31T06:59:17.500000 | 2011-05-31T08:22:23.620000 |
6,184,021 | 6,184,093 | Load a View from outside the Views folder | I'm working on a widgetmanager for asp.net mvc and to get the main part to work, I need to load in a view from outside the default views folder. I got the following folder structure:... - Views - Widgets |- Views I need the views to be loaded from inside ~/Widgets/Views I'm not sure if I should be writing a Viewengine ... | You could write a custom view engine and play around with the following base properties which allow you to customize the location of the views: base.ViewLocationFormats base.PartialViewLocationFormats base.MasterLocationFormats base.AreaViewLocationFormats base.AreaPartialViewLocationFormats base.AreaMasterLocationForm... | Load a View from outside the Views folder I'm working on a widgetmanager for asp.net mvc and to get the main part to work, I need to load in a view from outside the default views folder. I got the following folder structure:... - Views - Widgets |- Views I need the views to be loaded from inside ~/Widgets/Views I'm not... | TITLE:
Load a View from outside the Views folder
QUESTION:
I'm working on a widgetmanager for asp.net mvc and to get the main part to work, I need to load in a view from outside the default views folder. I got the following folder structure:... - Views - Widgets |- Views I need the views to be loaded from inside ~/Wid... | [
"asp.net-mvc-3"
] | 1 | 2 | 3,801 | 1 | 0 | 2011-05-31T07:00:36.280000 | 2011-05-31T07:07:14.593000 |
6,184,023 | 6,184,068 | Include XML encoding in PHP | I am a beginner in PHP and XML. Can somebody tell me how to include XML encoding when I write a new xml file. Here are the codes: writexml.php formatOutput = true;
$el_actionstars = $domdoc->createElement( "actionstars" ); $domdoc->appendChild( $el_actionstars );
$arr_size = count($ids);
for ($i=0; $i < $arr_size; $... | See bottom of http://php.net/manual/en/domdocument.savexml.php When you save whole document: DOMDocument->saveXML() produces string in encoding defined in property DOMDocument->encoding. When you save only one node: DOMDocument->saveXML(DOMNode) produces always string in UTF-8. You can set it in the constructor DOMDocu... | Include XML encoding in PHP I am a beginner in PHP and XML. Can somebody tell me how to include XML encoding when I write a new xml file. Here are the codes: writexml.php formatOutput = true;
$el_actionstars = $domdoc->createElement( "actionstars" ); $domdoc->appendChild( $el_actionstars );
$arr_size = count($ids);
... | TITLE:
Include XML encoding in PHP
QUESTION:
I am a beginner in PHP and XML. Can somebody tell me how to include XML encoding when I write a new xml file. Here are the codes: writexml.php formatOutput = true;
$el_actionstars = $domdoc->createElement( "actionstars" ); $domdoc->appendChild( $el_actionstars );
$arr_siz... | [
"php",
"xml"
] | 2 | 4 | 4,269 | 3 | 0 | 2011-05-31T07:01:22.923000 | 2011-05-31T07:04:56.587000 |
6,184,026 | 6,184,144 | How to prevent users from copying content from website | Is there any way to prevent users from copying content from website and display encrypted code in view source? I know that techies will always find a way but if it prevents normal users it's OK. | Check out ionCube HTML Obfuscator:- http://www.ioncube.com/html_encoder.php As of the text contents, Try this code:- Live Demo (IE isn't supported) | How to prevent users from copying content from website Is there any way to prevent users from copying content from website and display encrypted code in view source? I know that techies will always find a way but if it prevents normal users it's OK. | TITLE:
How to prevent users from copying content from website
QUESTION:
Is there any way to prevent users from copying content from website and display encrypted code in view source? I know that techies will always find a way but if it prevents normal users it's OK.
ANSWER:
Check out ionCube HTML Obfuscator:- http://... | [
"php",
"javascript",
"jquery",
"html"
] | 10 | 5 | 7,153 | 8 | 0 | 2011-05-31T07:01:40.693000 | 2011-05-31T07:13:34.450000 |
6,184,029 | 6,184,084 | Is it possible to position background image + have gradient background using CSS? | I'm trying to have some padding around the background image which is position to the right in the element, the element also has a gradient background. I've tried using background-origin to position the image, but that would shift the background gradient as well. Here's my example: http://jsfiddle.net/th3Q6/ Note This o... | This works... a:after { display: block; content: ''; width: 25px; height: 28px; margin: -5px -8px; float: right; background: url(http://i.min.us/jc808I.png) no-repeat; } jsFiddle. It won't work in older IEs, but you only want WebKit support, so you're in luck.:) | Is it possible to position background image + have gradient background using CSS? I'm trying to have some padding around the background image which is position to the right in the element, the element also has a gradient background. I've tried using background-origin to position the image, but that would shift the back... | TITLE:
Is it possible to position background image + have gradient background using CSS?
QUESTION:
I'm trying to have some padding around the background image which is position to the right in the element, the element also has a gradient background. I've tried using background-origin to position the image, but that wo... | [
"css",
"background",
"webkit"
] | 2 | 1 | 113 | 1 | 0 | 2011-05-31T07:01:57.480000 | 2011-05-31T07:06:12.987000 |
6,184,034 | 6,184,065 | which data structure for a list of object with fast lookup feature | I have a data structure and have to perform lookup on it, I would like to optimize things... struct Data { std::string id_; double data_; }; I use currently a std::vector and std::find algorithm but I'm wondering if another data structure would be more convenient: hash table? map? boost multi index container? other thi... | It really depends on your requirements, but two possibilities are to sort your vector and do a binary search, or to use a map. Both can be implemented within about 15 minutes, so I suggest you try both of them. Edit: Given your requirement that you want to add and remove things often, and the size of your data, I'd use... | which data structure for a list of object with fast lookup feature I have a data structure and have to perform lookup on it, I would like to optimize things... struct Data { std::string id_; double data_; }; I use currently a std::vector and std::find algorithm but I'm wondering if another data structure would be more ... | TITLE:
which data structure for a list of object with fast lookup feature
QUESTION:
I have a data structure and have to perform lookup on it, I would like to optimize things... struct Data { std::string id_; double data_; }; I use currently a std::vector and std::find algorithm but I'm wondering if another data struct... | [
"c++"
] | 2 | 4 | 2,346 | 2 | 0 | 2011-05-31T07:02:19.213000 | 2011-05-31T07:04:45.763000 |
6,184,037 | 6,184,067 | Problem with get_absolute_url based on entry type | I have one model for different types of entries: POST = 1 PAGE = 2 ARTICLE = 3 ENTRY_TYPE = ( (POST, "Blog Post"), (PAGE, "Page"), (ARTICLE, "Article"), )
entry_type = models.IntegerField(choices=ENTRY_TYPE, default=POST) And function to find out absolute url for different types of entries based on it type: def get_ab... | You should be looking at the value of self.entry_type, e.g.: if self.entry_type == self.PAGE: return '/%s/' % (self.slug) | Problem with get_absolute_url based on entry type I have one model for different types of entries: POST = 1 PAGE = 2 ARTICLE = 3 ENTRY_TYPE = ( (POST, "Blog Post"), (PAGE, "Page"), (ARTICLE, "Article"), )
entry_type = models.IntegerField(choices=ENTRY_TYPE, default=POST) And function to find out absolute url for diffe... | TITLE:
Problem with get_absolute_url based on entry type
QUESTION:
I have one model for different types of entries: POST = 1 PAGE = 2 ARTICLE = 3 ENTRY_TYPE = ( (POST, "Blog Post"), (PAGE, "Page"), (ARTICLE, "Article"), )
entry_type = models.IntegerField(choices=ENTRY_TYPE, default=POST) And function to find out abso... | [
"python",
"django",
"django-models"
] | 0 | 2 | 116 | 1 | 0 | 2011-05-31T07:02:24.890000 | 2011-05-31T07:04:51.797000 |
6,184,054 | 6,184,151 | Where should we store confirmation/error messages in application? | I am working on PHP and Zend. I have to show different type of error/confirmation messages in application. Most of these messages are placed in code. So if I have to change one message then I have to change it everywhere where this particular type of message is coded. So what is the best way to store all messages in on... | You could have some sort of static class in the library folder. Which would contain a set of constant variables like PRODUCT_SAVED_OK = "The product {{id}} was saved successfully"; The I would have two static methods which take care of displaying the error/message public static function showMessage($message, $data = ar... | Where should we store confirmation/error messages in application? I am working on PHP and Zend. I have to show different type of error/confirmation messages in application. Most of these messages are placed in code. So if I have to change one message then I have to change it everywhere where this particular type of mes... | TITLE:
Where should we store confirmation/error messages in application?
QUESTION:
I am working on PHP and Zend. I have to show different type of error/confirmation messages in application. Most of these messages are placed in code. So if I have to change one message then I have to change it everywhere where this part... | [
"php",
"zend-framework",
"messaging"
] | 10 | 7 | 4,310 | 6 | 0 | 2011-05-31T07:03:24.360000 | 2011-05-31T07:14:23.433000 |
6,184,066 | 6,184,096 | What algorithms perform better with adjacency matrix as compared to lists? | Are there any algorithms for which adjacency matrices outperform adjacency lists? What about vice versa? | In terms of Running Time, Adjacency Matrix would almost always outperform lists. The List implementation would use less memory(proportional to number of edges) to store the Graph. So if memory does matter(it surely would with sparse Graphs with large number of nodes), use lists. If run time matters, and the Graph is li... | What algorithms perform better with adjacency matrix as compared to lists? Are there any algorithms for which adjacency matrices outperform adjacency lists? What about vice versa? | TITLE:
What algorithms perform better with adjacency matrix as compared to lists?
QUESTION:
Are there any algorithms for which adjacency matrices outperform adjacency lists? What about vice versa?
ANSWER:
In terms of Running Time, Adjacency Matrix would almost always outperform lists. The List implementation would us... | [
"data-structures",
"graph-algorithm"
] | 0 | 4 | 989 | 1 | 0 | 2011-05-31T07:04:46.187000 | 2011-05-31T07:07:50.487000 |
6,184,070 | 6,184,417 | Javascript format a number asin C# | I have a number which currently is 1,657,108,700 and growing. However I wish for it to show as 1,657,108k Does javascript or html have a build in function to do this? The value is being set throu javascript to a span field in html. [edit] From the comment I got my method as far as: var start = '1,657,108,700'; start = ... | var formattedNumber = Math.round(yourNumber / 1000).toLocaleString() + "k"; Turn the above into a function or not as appropriate. I'm not aware of a single function to do this, or of a way to cater for non-English versions of "k" (assuming there are some), but at least toLocaleString() should take care of the comma ver... | Javascript format a number asin C# I have a number which currently is 1,657,108,700 and growing. However I wish for it to show as 1,657,108k Does javascript or html have a build in function to do this? The value is being set throu javascript to a span field in html. [edit] From the comment I got my method as far as: va... | TITLE:
Javascript format a number asin C#
QUESTION:
I have a number which currently is 1,657,108,700 and growing. However I wish for it to show as 1,657,108k Does javascript or html have a build in function to do this? The value is being set throu javascript to a span field in html. [edit] From the comment I got my me... | [
"javascript",
"html",
"format"
] | 0 | 1 | 348 | 1 | 0 | 2011-05-31T07:05:17.867000 | 2011-05-31T07:42:15.103000 |
6,184,075 | 6,184,345 | Error when updating MySQL Database with PHP | I am a newbie, i want to update the database and when i submit the form to update the record, i get this error Notice: Undefined index: idno in /Library/WebServer/Documents/practice/employee/edit_employee.php on line 6 Call Stack: 0.0001 633952 1. {main}() /Library/WebServer/Documents/practice/employee/edit_employee.ph... | A few bugs in your code. Never trust Users to input anything without validating and sanitising their data. Always test for and act on errors or unexpected conditions. There is no comma before the WHERE clause in an SQL command. Try the below: 1 ){ # Query Succeeded, but No Rows Returned OR More than One Row Returned }e... | Error when updating MySQL Database with PHP I am a newbie, i want to update the database and when i submit the form to update the record, i get this error Notice: Undefined index: idno in /Library/WebServer/Documents/practice/employee/edit_employee.php on line 6 Call Stack: 0.0001 633952 1. {main}() /Library/WebServer/... | TITLE:
Error when updating MySQL Database with PHP
QUESTION:
I am a newbie, i want to update the database and when i submit the form to update the record, i get this error Notice: Undefined index: idno in /Library/WebServer/Documents/practice/employee/edit_employee.php on line 6 Call Stack: 0.0001 633952 1. {main}() /... | [
"php"
] | 0 | 1 | 137 | 2 | 0 | 2011-05-31T07:05:33.063000 | 2011-05-31T07:35:33.930000 |
6,184,078 | 6,184,178 | FULL TEXT SEARCH in cakephp ? any example | I am using ordinary search functionality in my business controller. but now need to implement FULL TEXT SEARCH with paginate can any one give idea or sample? I am using MySQL with MyISAM tabes and this my table structure, fields marked bold are need to use in search CREATE TABLE IF NOT EXISTS businesses ( id bigint(20)... | After you have created your FULLTEXT indices it's not different at all from normal paginate conditions, you just need to construct your SQL a little more manually and most importantly escape the user input manually. $query = 'foobar'; // the user input to search for $escapedQuery = $this->Business->getDataSource()->val... | FULL TEXT SEARCH in cakephp ? any example I am using ordinary search functionality in my business controller. but now need to implement FULL TEXT SEARCH with paginate can any one give idea or sample? I am using MySQL with MyISAM tabes and this my table structure, fields marked bold are need to use in search CREATE TABL... | TITLE:
FULL TEXT SEARCH in cakephp ? any example
QUESTION:
I am using ordinary search functionality in my business controller. but now need to implement FULL TEXT SEARCH with paginate can any one give idea or sample? I am using MySQL with MyISAM tabes and this my table structure, fields marked bold are need to use in ... | [
"full-text-search",
"cakephp-1.3",
"cakephp-2.0"
] | 8 | 10 | 4,206 | 1 | 0 | 2011-05-31T07:05:50.490000 | 2011-05-31T07:16:09.427000 |
6,184,079 | 6,184,186 | Complete log management (python) | Similar questions have been asked, but I have not come across an easy-to-do-it way We have some application logs of various kinds which fill up the space and we face other unwanted issues. How do I write a monitoring script(zipping files of particular size, moving them, watching them, etc..) for this maintenance? I am ... | The "standard" way of doing this (atleast on most Gnu/Linux distros) is to use logrotate. I see a /etc/logrotate.conf on my Debian machine which has details on which files to rotate and at what frequency. It's triggered by a daily cron entry. This is what I'd recommend. If you want your application itself to do this (w... | Complete log management (python) Similar questions have been asked, but I have not come across an easy-to-do-it way We have some application logs of various kinds which fill up the space and we face other unwanted issues. How do I write a monitoring script(zipping files of particular size, moving them, watching them, e... | TITLE:
Complete log management (python)
QUESTION:
Similar questions have been asked, but I have not come across an easy-to-do-it way We have some application logs of various kinds which fill up the space and we face other unwanted issues. How do I write a monitoring script(zipping files of particular size, moving them... | [
"python",
"linux",
"monitoring",
"logging"
] | 0 | 7 | 1,496 | 2 | 0 | 2011-05-31T07:05:51.133000 | 2011-05-31T07:17:47.653000 |
6,184,080 | 6,184,197 | Add unique icons or scale icons for ipad version in universal app? | My dilemma - I have a universal app that holds a lot of images and icon (about 1,000). In many cases i use the @2x version as is for the iPad version, in other cases it is to big even for the iPad. I see 2 options: Add a unique images for the ipad (large the app size). Scale the images every time i use them? Would like... | I think you will here different suggestions here. It really depends on your requirements and whether it is more important (mandatory?) for you to reduce the size of your app or make it more responsive at run-time. Are you going to scale the images down one-by-one (meaning that in a view you will have only an image)? Or... | Add unique icons or scale icons for ipad version in universal app? My dilemma - I have a universal app that holds a lot of images and icon (about 1,000). In many cases i use the @2x version as is for the iPad version, in other cases it is to big even for the iPad. I see 2 options: Add a unique images for the ipad (larg... | TITLE:
Add unique icons or scale icons for ipad version in universal app?
QUESTION:
My dilemma - I have a universal app that holds a lot of images and icon (about 1,000). In many cases i use the @2x version as is for the iPad version, in other cases it is to big even for the iPad. I see 2 options: Add a unique images ... | [
"iphone",
"ipad",
"ios4",
"universal-binary"
] | 1 | 1 | 216 | 1 | 0 | 2011-05-31T07:05:52.173000 | 2011-05-31T07:18:32.123000 |
6,184,087 | 6,223,548 | nant script c# compilation error | Unfortunately my knowledge of NANT stuff is very limited but embarked today on updating our build to run some code. We use cruisecontrol. This works fine - however I need to process two folders so was trying to put common code into a traditional c# method. Rather than repeat all the code - I tried to add a static class... | In re-reading the error logs I found within the wall of red text the answer. Turns out I needed to pass my new method the Project parameter (as I was referring to Project properties). So problem solved! | nant script c# compilation error Unfortunately my knowledge of NANT stuff is very limited but embarked today on updating our build to run some code. We use cruisecontrol. This works fine - however I need to process two folders so was trying to put common code into a traditional c# method. Rather than repeat all the cod... | TITLE:
nant script c# compilation error
QUESTION:
Unfortunately my knowledge of NANT stuff is very limited but embarked today on updating our build to run some code. We use cruisecontrol. This works fine - however I need to process two folders so was trying to put common code into a traditional c# method. Rather than ... | [
"c#",
"cruisecontrol.net",
"nant"
] | 2 | 1 | 644 | 2 | 0 | 2011-05-31T07:06:23.280000 | 2011-06-03T06:04:09.323000 |
6,184,090 | 6,184,108 | why does .next() give me 'undefined' | why does.next() returns 'undefined'? http://jsfiddle.net/radek/sD6JB/2/ html run run run javascript + jQuery $(document).ready(function(){ $('button[type=button]').click(function(){ var params = $(this).val(); document.getElementById("results").innerHTML+= " "+params.split('|')[0]+" - " + params.split('|')[1]+" - " + $... | A jQuery object has no checked property. You can either... (a) Subscript the native DOM element with [0] or get(0). (b) Access prop('checked') (>= jQuery 1.6 only.) (c) Use is(':checked'). | why does .next() give me 'undefined' why does.next() returns 'undefined'? http://jsfiddle.net/radek/sD6JB/2/ html run run run javascript + jQuery $(document).ready(function(){ $('button[type=button]').click(function(){ var params = $(this).val(); document.getElementById("results").innerHTML+= " "+params.split('|')[0]+"... | TITLE:
why does .next() give me 'undefined'
QUESTION:
why does.next() returns 'undefined'? http://jsfiddle.net/radek/sD6JB/2/ html run run run javascript + jQuery $(document).ready(function(){ $('button[type=button]').click(function(){ var params = $(this).val(); document.getElementById("results").innerHTML+= " "+para... | [
"javascript",
"jquery",
"jquery-selectors"
] | 2 | 5 | 1,789 | 3 | 0 | 2011-05-31T07:06:30.143000 | 2011-05-31T07:08:58.333000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.