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,200,151 | 6,200,358 | Javascript - Onmiddleclick on a div | i need a non Jquery middleclick solution for all new browser. My idea was to use the onmiddleclick... but this code does not work. Hope someone can help. HTML / JS Code CLICK HERE Example http://jsfiddle.net/392BK/ Thanks in advance! Peter | Javascript: HTML: Click Me Have a read of this QuirksMode page for more information on event properties. If possible, it's definitely worth using jQuery for things like this. Cross-browser compatibility for mouse-clicks is poor, and you'll need something more like this demo to provide support in all browers. | Javascript - Onmiddleclick on a div i need a non Jquery middleclick solution for all new browser. My idea was to use the onmiddleclick... but this code does not work. Hope someone can help. HTML / JS Code CLICK HERE Example http://jsfiddle.net/392BK/ Thanks in advance! Peter | TITLE:
Javascript - Onmiddleclick on a div
QUESTION:
i need a non Jquery middleclick solution for all new browser. My idea was to use the onmiddleclick... but this code does not work. Hope someone can help. HTML / JS Code CLICK HERE Example http://jsfiddle.net/392BK/ Thanks in advance! Peter
ANSWER:
Javascript: HTML:... | [
"javascript",
"onclick"
] | 2 | 4 | 1,127 | 5 | 0 | 2011-06-01T11:06:14.707000 | 2011-06-01T11:24:18.007000 |
6,200,158 | 6,200,232 | Is it possible to use STL copy function with map | I wonder if there is any trick to use copy with maps to copy the contents of map into an array. Because STL maps are by the combination of a key value and a mapped value an element of a map forms a key value pair. That prevents us to use standard algorithms like std::copy. For example following code gives error: #inclu... | You could use std::transform instead: template const U &extract_second(const std::pair &p) { return p.second; }
std::transform(test.begin(), test.end(), test_arr, extract_second ); And as @Andre points out in a comment below, if you want a slightly more verbose overhead, you can avoid having to explicitly state the te... | Is it possible to use STL copy function with map I wonder if there is any trick to use copy with maps to copy the contents of map into an array. Because STL maps are by the combination of a key value and a mapped value an element of a map forms a key value pair. That prevents us to use standard algorithms like std::cop... | TITLE:
Is it possible to use STL copy function with map
QUESTION:
I wonder if there is any trick to use copy with maps to copy the contents of map into an array. Because STL maps are by the combination of a key value and a mapped value an element of a map forms a key value pair. That prevents us to use standard algori... | [
"c++",
"stl",
"dictionary",
"copy"
] | 5 | 6 | 2,736 | 5 | 0 | 2011-06-01T11:06:55.260000 | 2011-06-01T11:12:52.470000 |
6,200,159 | 6,200,187 | SQL query does not want to work | I know this SQL query is wrong, or I am missing something, but I have a table full of messages. I want get all the messages where the user id is ether 1 or 2, and the reply_to is 0. But with my SQL query, it shows the replies, and does not now the posts from user 2. Here is my SQL SELECT * FROM `msg` WHERE `userid` LIK... | how about this?: SELECT * FROM `msg` WHERE `userid` in ('1','2') AND `reply_to`='0' ORDER BY `timestamp` DESC LIMIT 0,10; | SQL query does not want to work I know this SQL query is wrong, or I am missing something, but I have a table full of messages. I want get all the messages where the user id is ether 1 or 2, and the reply_to is 0. But with my SQL query, it shows the replies, and does not now the posts from user 2. Here is my SQL SELECT... | TITLE:
SQL query does not want to work
QUESTION:
I know this SQL query is wrong, or I am missing something, but I have a table full of messages. I want get all the messages where the user id is ether 1 or 2, and the reply_to is 0. But with my SQL query, it shows the replies, and does not now the posts from user 2. Her... | [
"mysql",
"sql"
] | 1 | 4 | 85 | 7 | 0 | 2011-06-01T11:07:02.367000 | 2011-06-01T11:09:24.340000 |
6,200,162 | 6,202,212 | How to troubleshoot TFS error TF237086 "The work item cannot be saved..." | I am getting the following error in a TFS 2010 build: The work item '59' could not be updated: 'TF237086: The work item cannot be saved because at least one field contains a value that is not allowed.' Work item 59 is a basic task I created to associate with my changeset on check-in. I have done no customization to the... | Something I would do in this case: Check the build service account, there's a high chance that when the work item is associated, its ChangedBy field is updated with this account and the value is not valid. Somebody in MSDN forum suggested checking the list of valid TFS users for a work item (you can open a bug and try ... | How to troubleshoot TFS error TF237086 "The work item cannot be saved..." I am getting the following error in a TFS 2010 build: The work item '59' could not be updated: 'TF237086: The work item cannot be saved because at least one field contains a value that is not allowed.' Work item 59 is a basic task I created to as... | TITLE:
How to troubleshoot TFS error TF237086 "The work item cannot be saved..."
QUESTION:
I am getting the following error in a TFS 2010 build: The work item '59' could not be updated: 'TF237086: The work item cannot be saved because at least one field contains a value that is not allowed.' Work item 59 is a basic ta... | [
"msbuild",
"tfs-workitem"
] | 2 | 4 | 6,285 | 5 | 0 | 2011-06-01T11:07:06.033000 | 2011-06-01T13:47:10.200000 |
6,200,164 | 6,205,890 | how to get attachCamera() when load page,so when people load or refresh page they will ask for for their camera access first? | i have used this code to get camera access how i can load it on page load private function startVideo():void { if (true) // TODO: Recognize no video settings { var camera:Camera = Camera.getCamera(cameraIndex.toString());
if (camera) { vidMe.attachCamera(camera); if (outgoingStream) { outgoingStream.attachCamera(camer... | Flash shows the camera request dialog the first time you call attachCamera(). To have a user be asked upfront, before your flash application reaches any functionality, I would suggest adding it upfront in our constructor. This dummy function puts together a fake NetConnection, and connects it to no server. Going throug... | how to get attachCamera() when load page,so when people load or refresh page they will ask for for their camera access first? i have used this code to get camera access how i can load it on page load private function startVideo():void { if (true) // TODO: Recognize no video settings { var camera:Camera = Camera.getCame... | TITLE:
how to get attachCamera() when load page,so when people load or refresh page they will ask for for their camera access first?
QUESTION:
i have used this code to get camera access how i can load it on page load private function startVideo():void { if (true) // TODO: Recognize no video settings { var camera:Camer... | [
"actionscript-3"
] | 0 | 0 | 397 | 1 | 0 | 2011-06-01T11:07:09.713000 | 2011-06-01T18:23:10.023000 |
6,200,165 | 6,200,471 | how can set radio buttons horizontally in zend form | hi i am using zend form, i created a Zend_Form_Element_Radio element that have two options yes, no in my form it shows vartically,one button below the other. i want to add them horizontally. this is my radio button code $radio = new Zend_Form_Element_Radio('yes'); $radio-> setLabel('Are you booking for someone else?');... | Did a quick search, maybe this post will help? Display Zend_Form_Element_Radio on one line From the old answer: You need to call the setSeparator method on the Zend_Form_Element_Radio object, passing it ''. Good luck! | how can set radio buttons horizontally in zend form hi i am using zend form, i created a Zend_Form_Element_Radio element that have two options yes, no in my form it shows vartically,one button below the other. i want to add them horizontally. this is my radio button code $radio = new Zend_Form_Element_Radio('yes'); $ra... | TITLE:
how can set radio buttons horizontally in zend form
QUESTION:
hi i am using zend form, i created a Zend_Form_Element_Radio element that have two options yes, no in my form it shows vartically,one button below the other. i want to add them horizontally. this is my radio button code $radio = new Zend_Form_Element... | [
"zend-framework",
"zend-form",
"php"
] | 0 | 2 | 3,412 | 1 | 0 | 2011-06-01T11:07:18.217000 | 2011-06-01T11:35:14.863000 |
6,200,171 | 6,200,289 | Draw circle in android | How can I draw circle between two points using the Android SDK? | Create A bitmap then draw on its canvas and then add this bitmap to an imageview or button or whatever you want. Create A bitmap: Bitmap bmp = Bitmap.createBitmap(width, height, config); Draw on the bitmap canvas Canvas c = new Canvas(bmp); c.drawCircle(cx, cy, radius, paint) setting to imageview img.setBackgroundDrawa... | Draw circle in android How can I draw circle between two points using the Android SDK? | TITLE:
Draw circle in android
QUESTION:
How can I draw circle between two points using the Android SDK?
ANSWER:
Create A bitmap then draw on its canvas and then add this bitmap to an imageview or button or whatever you want. Create A bitmap: Bitmap bmp = Bitmap.createBitmap(width, height, config); Draw on the bitmap ... | [
"android"
] | 9 | 40 | 31,399 | 2 | 0 | 2011-06-01T11:08:03.663000 | 2011-06-01T11:18:21.477000 |
6,200,172 | 6,200,467 | Sessions mixed up on asp.net site | I am analyzing a problem from an old asp.net site made by one of my colleagues who left the company some months ago. The problem is that we a few times have expierenced that two users sessions are mixed up, so that if for example two users are logged in, one user sees the other users data. As it happens very rarely (on... | It's hard to tell here. Have you configured Form Authentication? This is the process you have to follow for Form Authentication: In your web.config you setup the authentication system: Your login page (post-back) checks the credentials (not your master page). If the user is valid then you set the cookie: FormsAuthentic... | Sessions mixed up on asp.net site I am analyzing a problem from an old asp.net site made by one of my colleagues who left the company some months ago. The problem is that we a few times have expierenced that two users sessions are mixed up, so that if for example two users are logged in, one user sees the other users d... | TITLE:
Sessions mixed up on asp.net site
QUESTION:
I am analyzing a problem from an old asp.net site made by one of my colleagues who left the company some months ago. The problem is that we a few times have expierenced that two users sessions are mixed up, so that if for example two users are logged in, one user sees... | [
"asp.net",
"session",
"authentication",
"forms-authentication"
] | 10 | 6 | 2,801 | 2 | 0 | 2011-06-01T11:08:13.757000 | 2011-06-01T11:34:39.870000 |
6,200,180 | 6,200,296 | New connection for each query or one connection for all queries? (CommandBehavior.CloseConnection vs CommandBehavior.Default) | I'm developing a text analysis desktop application, that intensively queries local database (MSSQLCE 3.5). As the user throws text in, it should react in real-time, so I'm using ADO.NET with pure SQL and trying to get the best performance results. The question is: based on my task, should I keep ONE cached connection (... | Personally, when I need many queries in a rapid succession from a non-web application, I prefer to use one shared connection. The only problem is that you have to keep an eye on it because it may go down unexpectedly due to a network problem or because SQL server thought it better be closed. That is, you must handle St... | New connection for each query or one connection for all queries? (CommandBehavior.CloseConnection vs CommandBehavior.Default) I'm developing a text analysis desktop application, that intensively queries local database (MSSQLCE 3.5). As the user throws text in, it should react in real-time, so I'm using ADO.NET with pur... | TITLE:
New connection for each query or one connection for all queries? (CommandBehavior.CloseConnection vs CommandBehavior.Default)
QUESTION:
I'm developing a text analysis desktop application, that intensively queries local database (MSSQLCE 3.5). As the user throws text in, it should react in real-time, so I'm usin... | [
"c#",
".net",
"sql",
"ado.net",
"sql-server-ce"
] | 0 | 0 | 464 | 1 | 0 | 2011-06-01T11:08:56.237000 | 2011-06-01T11:18:47.740000 |
6,200,191 | 6,201,703 | IOS: two button control in a UIAlert | I have this code in a IBAction: UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"NO!" message:@"danger" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:@"Annul", nil];
[alertView show]; [alertView release]; Now if I push "OK" it must do a thing and if I push "Annul" it must do another thing. But i... | Jhaliya's answer is great, except it doesn't address blackguardian's request to run this inside a IBAction method. Having an IBAction method block and wait for a response from the UIAlertView is the wrong way to work in CocoaTouch. The IBAction should just present the UIAlertView. Then the delegate function in Jhaliya'... | IOS: two button control in a UIAlert I have this code in a IBAction: UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"NO!" message:@"danger" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:@"Annul", nil];
[alertView show]; [alertView release]; Now if I push "OK" it must do a thing and if I push "A... | TITLE:
IOS: two button control in a UIAlert
QUESTION:
I have this code in a IBAction: UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"NO!" message:@"danger" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:@"Annul", nil];
[alertView show]; [alertView release]; Now if I push "OK" it must do a thin... | [
"objective-c",
"xcode",
"ios",
"uialertview"
] | 0 | 1 | 5,495 | 2 | 0 | 2011-06-01T11:09:33.973000 | 2011-06-01T13:12:57.097000 |
6,200,196 | 6,200,241 | Change git origin to a branch of my own | I cloned someone else's repo to my computer from github to try it out. I eventually made some changes to it (locally) that I do not want to commit to the original repo. Instead, I want to create my own fork of the project, apply the changes I made, then push it to my own repo. How do I do this? | You can add your own repo as a remote and simply push there: git remote add myFork git://myforkUrl/project.git git push myFork master But if you want to work with github you should consider to fork from the github interface. Resources: GitHub - Fork a repo git remote git push | Change git origin to a branch of my own I cloned someone else's repo to my computer from github to try it out. I eventually made some changes to it (locally) that I do not want to commit to the original repo. Instead, I want to create my own fork of the project, apply the changes I made, then push it to my own repo. Ho... | TITLE:
Change git origin to a branch of my own
QUESTION:
I cloned someone else's repo to my computer from github to try it out. I eventually made some changes to it (locally) that I do not want to commit to the original repo. Instead, I want to create my own fork of the project, apply the changes I made, then push it ... | [
"git",
"github"
] | 5 | 6 | 2,999 | 2 | 0 | 2011-06-01T11:09:49.643000 | 2011-06-01T11:13:45.437000 |
6,200,206 | 6,203,551 | Blank popup when using onload() function in javascript with Google Chrome Extension development | Below is the code for popup.html page I am using the hello world example given at http://code.google.com/chrome/extensions/getstarted.html Update Time But all I am getting s a blank popup... what am I doing wrong? What needs to be done in order to show my javascript? | Instead of: if (document.layers) { document.layers.time.document.write(TotalTime); document.layers.time.document.close(); }else if (document.all) { time.innerHTML = TotalTime; } Do: document.getElementById("time").innerHTML = TotalTime; | Blank popup when using onload() function in javascript with Google Chrome Extension development Below is the code for popup.html page I am using the hello world example given at http://code.google.com/chrome/extensions/getstarted.html Update Time But all I am getting s a blank popup... what am I doing wrong? What needs... | TITLE:
Blank popup when using onload() function in javascript with Google Chrome Extension development
QUESTION:
Below is the code for popup.html page I am using the hello world example given at http://code.google.com/chrome/extensions/getstarted.html Update Time But all I am getting s a blank popup... what am I doing... | [
"javascript",
"google-chrome-extension"
] | 0 | 0 | 978 | 1 | 0 | 2011-06-01T11:10:14.537000 | 2011-06-01T15:18:48.477000 |
6,200,212 | 6,200,330 | Zend form: image as submit button | Zend talk.I need two submit buttons in my Zend_form so that after populating or validating the form, I can check wich button was clicked using the isChecked() method. Since now I used the Zend_Form_Element_Submit but what if I want to use an Image as submit button? Using the Zend_Form_Element_Image is the right solutio... | The Zend_Form_Element_Image is the correct element to use, the type will set to image automatically. If you want to check if the button was clicked in your controller then simply use if (isset($this->_request->buttonname_x)) or if (isset($this->_request->buttonname_y)) as the browser will return the XY coordinates of t... | Zend form: image as submit button Zend talk.I need two submit buttons in my Zend_form so that after populating or validating the form, I can check wich button was clicked using the isChecked() method. Since now I used the Zend_Form_Element_Submit but what if I want to use an Image as submit button? Using the Zend_Form_... | TITLE:
Zend form: image as submit button
QUESTION:
Zend talk.I need two submit buttons in my Zend_form so that after populating or validating the form, I can check wich button was clicked using the isChecked() method. Since now I used the Zend_Form_Element_Submit but what if I want to use an Image as submit button? Us... | [
"php",
"zend-framework",
"form-submit"
] | 0 | 0 | 1,045 | 1 | 0 | 2011-06-01T11:10:33.270000 | 2011-06-01T11:22:06.697000 |
6,200,215 | 6,200,257 | How to log in to MySQL and query the database from Linux terminal? | I am using Debian Linux on which MySQL is installed. I can log in to my Linux machine using root user as well as other user. I can connect to MySQL database on Linux machine from Windows machine using SQLyog. Now I want to execute queries on Linux machine only using Linux terminal command line. I tried some following t... | 1.- How do I get mysql prompt in linux terminal? mysql -u root -p At the Enter password: prompt, well, enter root's password:) You can find further reference by typing mysql --help or at the online manual. 2. How I stop the mysql server from linux terminal? It depends. Red Hat based distros have the service command: se... | How to log in to MySQL and query the database from Linux terminal? I am using Debian Linux on which MySQL is installed. I can log in to my Linux machine using root user as well as other user. I can connect to MySQL database on Linux machine from Windows machine using SQLyog. Now I want to execute queries on Linux machi... | TITLE:
How to log in to MySQL and query the database from Linux terminal?
QUESTION:
I am using Debian Linux on which MySQL is installed. I can log in to my Linux machine using root user as well as other user. I can connect to MySQL database on Linux machine from Windows machine using SQLyog. Now I want to execute quer... | [
"mysql",
"linux",
"authentication"
] | 123 | 205 | 641,051 | 15 | 0 | 2011-06-01T11:11:28.310000 | 2011-06-01T11:15:07.443000 |
6,200,221 | 6,200,335 | import XML to SQL Server database | I have a very complex task - create a software that imports XMl files to MSSQL database. There is one serious problem - each file has different structure than datatable. Example: DATABASE: It has columns like: ImageURL, Title, Content XML: Each XML file is different, I'll give you two examples: www.123.com/image.png So... | You need to figure out the different version you have and write some code to handle each xml-structure. You can do like this in SQL Server 1: declare @XML xml
set @XML = ' www.123.com/image.png Some text Content of item www.123.com/image.png Some text Content of item '
select N.value('ImageURL[1]', 'varchar(max)') as... | import XML to SQL Server database I have a very complex task - create a software that imports XMl files to MSSQL database. There is one serious problem - each file has different structure than datatable. Example: DATABASE: It has columns like: ImageURL, Title, Content XML: Each XML file is different, I'll give you two ... | TITLE:
import XML to SQL Server database
QUESTION:
I have a very complex task - create a software that imports XMl files to MSSQL database. There is one serious problem - each file has different structure than datatable. Example: DATABASE: It has columns like: ImageURL, Title, Content XML: Each XML file is different, ... | [
"c#",
"asp.net",
"sql-server",
"xml",
"import"
] | 3 | 3 | 3,005 | 3 | 0 | 2011-06-01T11:11:48.473000 | 2011-06-01T11:22:35.877000 |
6,200,222 | 6,216,827 | How do I create a reverse proxy that runs in Azure? | We have a static WordPress website that we would like to be able to scale ad-hoc. In the long term we will move the site to eg. Umbraco CMS, but right now we would like to put in an Reverse Proxy frontend that takes the load of the current site. We have tried writing out own HttpHandler (like this http://www.codeprojec... | You can use Application Request Routing (ARR). Take a look here: http://things.smarx.com/#Install Application Request Routing Also watch how Steve configured it as a reverse proxy in his talk from MIX: http://channel9.msdn.com/events/MIX/MIX11/SVC04 | How do I create a reverse proxy that runs in Azure? We have a static WordPress website that we would like to be able to scale ad-hoc. In the long term we will move the site to eg. Umbraco CMS, but right now we would like to put in an Reverse Proxy frontend that takes the load of the current site. We have tried writing ... | TITLE:
How do I create a reverse proxy that runs in Azure?
QUESTION:
We have a static WordPress website that we would like to be able to scale ad-hoc. In the long term we will move the site to eg. Umbraco CMS, but right now we would like to put in an Reverse Proxy frontend that takes the load of the current site. We h... | [
"azure",
"reverse-proxy"
] | 1 | 3 | 4,233 | 2 | 0 | 2011-06-01T11:11:58.700000 | 2011-06-02T15:41:27.783000 |
6,200,228 | 6,200,331 | Android facebook key hash | after spending hours of figuring out how to sign an app (at last i used eclipse, and not the command line), i want to create a key hash to my app described here. For this i have in the C:\Users\Family\workspace\MyKeys folder the created sample.keystore and the samplesigned.apk, as well as the keytool.exe and the jli.dl... | You need to quote the paths in your command else it'll break on first space (i.e. C:\Users\Family\workspace\MyKeys>keytool -exportcert -alias samplekey -keystore sample.keystore | "c:\program files\gnuwin32\bin\openssl" sha1 -binary | "c:\program f iles\gnuwin32\bin\openssl" base64 ). Unsure if that is the real problem... | Android facebook key hash after spending hours of figuring out how to sign an app (at last i used eclipse, and not the command line), i want to create a key hash to my app described here. For this i have in the C:\Users\Family\workspace\MyKeys folder the created sample.keystore and the samplesigned.apk, as well as the ... | TITLE:
Android facebook key hash
QUESTION:
after spending hours of figuring out how to sign an app (at last i used eclipse, and not the command line), i want to create a key hash to my app described here. For this i have in the C:\Users\Family\workspace\MyKeys folder the created sample.keystore and the samplesigned.ap... | [
"android",
"sign"
] | 2 | 5 | 2,025 | 1 | 0 | 2011-06-01T11:12:37.837000 | 2011-06-01T11:22:09.527000 |
6,200,233 | 6,200,451 | ManyToMany field not saved when using Django admin | I'm experiencing a weird problem which I hope someone in here may be able to shed some light on. I'm overriding the save() method of a model to add some values to a ManyToMany-field after running super(). My problem is that when I'm saving in Django admin the values seems to get added to the relationship but is then em... | So it turns out the above was not the correct way to implement it. The code belonged in StoreAdmin, by overriding model_save(). This is how I solved it: class StoreAdmin(admin.ModelAdmin): def save_model(self, request, obj, form, change): if obj.copy_holidays_from: form.cleaned_data['holidays'] = obj.copy_holidays_from... | ManyToMany field not saved when using Django admin I'm experiencing a weird problem which I hope someone in here may be able to shed some light on. I'm overriding the save() method of a model to add some values to a ManyToMany-field after running super(). My problem is that when I'm saving in Django admin the values se... | TITLE:
ManyToMany field not saved when using Django admin
QUESTION:
I'm experiencing a weird problem which I hope someone in here may be able to shed some light on. I'm overriding the save() method of a model to add some values to a ManyToMany-field after running super(). My problem is that when I'm saving in Django a... | [
"python",
"django",
"m2m",
"django-orm"
] | 14 | 17 | 8,997 | 6 | 0 | 2011-06-01T11:12:57.933000 | 2011-06-01T11:33:14.583000 |
6,200,238 | 6,200,751 | jqGrid: Form view on double clicking a treeview grid | I am new to JqGrid. I would like to get a form view of the row(part of the treeview grid) that I have double clicked on. And I am not using a navigation bar. I tried the following and it did not work. ondblClickRow: function(rowid) { $("#list2").GridToForm(rowid, "#container"); } Where am I go wrong? | Probably the code ondblClickRow: function(rowid) { $("#list2").jqGrid('viewGridRow', rowid, {closeOnEscape:true} ); } will do what you want. | jqGrid: Form view on double clicking a treeview grid I am new to JqGrid. I would like to get a form view of the row(part of the treeview grid) that I have double clicked on. And I am not using a navigation bar. I tried the following and it did not work. ondblClickRow: function(rowid) { $("#list2").GridToForm(rowid, "#c... | TITLE:
jqGrid: Form view on double clicking a treeview grid
QUESTION:
I am new to JqGrid. I would like to get a form view of the row(part of the treeview grid) that I have double clicked on. And I am not using a navigation bar. I tried the following and it did not work. ondblClickRow: function(rowid) { $("#list2").Gri... | [
"javascript",
"jqgrid"
] | 0 | 0 | 679 | 1 | 0 | 2011-06-01T11:13:38.873000 | 2011-06-01T11:58:39.633000 |
6,200,240 | 6,200,914 | python twisted INotify without blocking reactor | I am using twsited's INotify to monitor the /dev directory to monitor for new serial devices being added. The code I am currently using is similar to below. notifier = INotify() notifier.watch(FilePath("/dev"), IN_CREATE, callbacks=[self.created]) notifier.startReading()
def created(self, ignored, path, mask):... bloc... | All event handlers in Twisted run in the "reactor thread" - UDP, TCP, and indeed inotify. They all are expected to cooperate with the system by not blocking. So, in this sense, this is just a question about how to write good event handlers in Twisted, not about inotify in particular. There are lots of options for avoid... | python twisted INotify without blocking reactor I am using twsited's INotify to monitor the /dev directory to monitor for new serial devices being added. The code I am currently using is similar to below. notifier = INotify() notifier.watch(FilePath("/dev"), IN_CREATE, callbacks=[self.created]) notifier.startReading()
... | TITLE:
python twisted INotify without blocking reactor
QUESTION:
I am using twsited's INotify to monitor the /dev directory to monitor for new serial devices being added. The code I am currently using is similar to below. notifier = INotify() notifier.watch(FilePath("/dev"), IN_CREATE, callbacks=[self.created]) notifi... | [
"python",
"twisted",
"blocking",
"inotify"
] | 1 | 7 | 1,805 | 2 | 0 | 2011-06-01T11:13:42.913000 | 2011-06-01T12:11:40.223000 |
6,200,247 | 6,200,518 | assign to variable of struct through property | I have the following Public Structure Foo dim i as integer End Structure
Public Class Bar
Public Property MyFoo as Foo Get return Foo End Get Set(ByVal value as Foo) foo = value End Set
dim foo as Foo End Class
Public Class Other
Public Sub SomeFunc() dim B as New Bar() B.MyFoo = new Foo() B.MyFoo.i = 14 'Expressi... | The answer is found here, it says the following: ' Assume this code runs inside Form1. Dim exitButton As New System.Windows.Forms.Button() exitButton.Text = "Exit this form" exitButton.Location.X = 140 ' The preceding line is an ERROR because of no storage for Location. The last statement of the preceding example fails... | assign to variable of struct through property I have the following Public Structure Foo dim i as integer End Structure
Public Class Bar
Public Property MyFoo as Foo Get return Foo End Get Set(ByVal value as Foo) foo = value End Set
dim foo as Foo End Class
Public Class Other
Public Sub SomeFunc() dim B as New Bar(... | TITLE:
assign to variable of struct through property
QUESTION:
I have the following Public Structure Foo dim i as integer End Structure
Public Class Bar
Public Property MyFoo as Foo Get return Foo End Get Set(ByVal value as Foo) foo = value End Set
dim foo as Foo End Class
Public Class Other
Public Sub SomeFunc()... | [
"vb.net",
"properties",
"variable-assignment"
] | 3 | 3 | 3,783 | 2 | 0 | 2011-06-01T11:14:08.587000 | 2011-06-01T11:39:55.423000 |
6,200,253 | 6,200,301 | Scala classOf for type parameter | I am trying to create a generic method for object updates using scala / java but I can't get the class for a type parameter. Here is my code: object WorkUnitController extends Controller { def updateObject[T](toUpdate: T, body: JsonObject){ val source = gson.fromJson(body, classOf[T]);... } } The error i get is class t... | Due Manifest is deprecated (Since Scala 2.10.0) this is the updated answer - import scala.reflect.ClassTag import scala.reflect._
object WorkUnitController extends Controller { def updateObject[T: ClassTag](toUpdate: T, body: JsonObject){ val source = gson.fromJson(body, classTag[T].runtimeClass)??? } } You should use... | Scala classOf for type parameter I am trying to create a generic method for object updates using scala / java but I can't get the class for a type parameter. Here is my code: object WorkUnitController extends Controller { def updateObject[T](toUpdate: T, body: JsonObject){ val source = gson.fromJson(body, classOf[T]);.... | TITLE:
Scala classOf for type parameter
QUESTION:
I am trying to create a generic method for object updates using scala / java but I can't get the class for a type parameter. Here is my code: object WorkUnitController extends Controller { def updateObject[T](toUpdate: T, body: JsonObject){ val source = gson.fromJson(b... | [
"scala"
] | 84 | 99 | 27,443 | 2 | 0 | 2011-06-01T11:14:35.027000 | 2011-06-01T11:19:15.003000 |
6,200,254 | 6,200,319 | clarification on vim pattern matching | I want to convert the 5 space indentation in a python file to 4 space indentation. I want the command to do the following remove a single space in all the lines which starts with a space followed by characters. I issued the command %s/^\ [a-zA-Z]*// which seems to work. Later i figured out that the command should actua... | It's working because * means "match zero or more of the previous atom". In your case, it's matching zero. You probably wanted to use \+ instead which means "match one or more of the previous atom". In actuality, you could have just dropped the * entirely because just a space followed by a single character would have ma... | clarification on vim pattern matching I want to convert the 5 space indentation in a python file to 4 space indentation. I want the command to do the following remove a single space in all the lines which starts with a space followed by characters. I issued the command %s/^\ [a-zA-Z]*// which seems to work. Later i fig... | TITLE:
clarification on vim pattern matching
QUESTION:
I want to convert the 5 space indentation in a python file to 4 space indentation. I want the command to do the following remove a single space in all the lines which starts with a space followed by characters. I issued the command %s/^\ [a-zA-Z]*// which seems to... | [
"regex",
"vim"
] | 0 | 2 | 283 | 1 | 0 | 2011-06-01T11:14:49.930000 | 2011-06-01T11:20:51.457000 |
6,200,262 | 6,200,379 | How to import 100 million rows table into database? | Can any one guide me about my query?, i m making application for banking sector with fuzzy logic. i have to import table with 100 million rows daily. and i am using MySql for this application which is processing slowly. so is there any another server for handling my database which can access fast? | 100 million rows daily? You have to be realistic. I doubt any single instance of any database out there can handle this type of thouroughput efficiently. You should probably look at clustering options and other optimising techniques such as splitting data in two diffent DB's (sharding). MySQL Enterprise has a bunch of ... | How to import 100 million rows table into database? Can any one guide me about my query?, i m making application for banking sector with fuzzy logic. i have to import table with 100 million rows daily. and i am using MySql for this application which is processing slowly. so is there any another server for handling my d... | TITLE:
How to import 100 million rows table into database?
QUESTION:
Can any one guide me about my query?, i m making application for banking sector with fuzzy logic. i have to import table with 100 million rows daily. and i am using MySql for this application which is processing slowly. so is there any another server... | [
"mysql",
"database"
] | 5 | 3 | 3,667 | 4 | 0 | 2011-06-01T11:15:25.710000 | 2011-06-01T11:26:26.227000 |
6,200,264 | 6,200,626 | the mysql function sum() is showing unexpected result! | I use the sum() function for provision in my mysql database, in this case query fetches only 1 result, it is 29.9 So sum(provision) is 29.8 I dont understand why is this happening! it is supposed to stay 29.8! in another query I use sum() two results with 29.9 and it returns 59.7, but when I calculate it with windows c... | Use a MySQL DECIMAL specified something like: DECIMAL(20,2) See the man page for more information. | the mysql function sum() is showing unexpected result! I use the sum() function for provision in my mysql database, in this case query fetches only 1 result, it is 29.9 So sum(provision) is 29.8 I dont understand why is this happening! it is supposed to stay 29.8! in another query I use sum() two results with 29.9 and ... | TITLE:
the mysql function sum() is showing unexpected result!
QUESTION:
I use the sum() function for provision in my mysql database, in this case query fetches only 1 result, it is 29.9 So sum(provision) is 29.8 I dont understand why is this happening! it is supposed to stay 29.8! in another query I use sum() two resu... | [
"php",
"mysql",
"sum"
] | 0 | 3 | 221 | 1 | 0 | 2011-06-01T11:15:37.087000 | 2011-06-01T11:49:15.513000 |
6,200,269 | 6,201,612 | Call managed C++ functions from C# | I have an managed C++ Wrapper for unmanaged C++ code and it's necessary to use some pointer parameters into the methods! What's the best way in C# to call this wrapper functions (I tryed it with reference parameter in the managed code and create the pointer and call then the unmanaged code)? Example: // c++/managed Uin... | What you are looking for is int%, which is the correct syntax for C++CLI references and called a tracking reference: Uint32 Wrapper::someMethod(int %value) | Call managed C++ functions from C# I have an managed C++ Wrapper for unmanaged C++ code and it's necessary to use some pointer parameters into the methods! What's the best way in C# to call this wrapper functions (I tryed it with reference parameter in the managed code and create the pointer and call then the unmanaged... | TITLE:
Call managed C++ functions from C#
QUESTION:
I have an managed C++ Wrapper for unmanaged C++ code and it's necessary to use some pointer parameters into the methods! What's the best way in C# to call this wrapper functions (I tryed it with reference parameter in the managed code and create the pointer and call ... | [
"c#",
"pointers",
"c++-cli",
"unmanaged",
"managed"
] | 2 | 3 | 2,309 | 1 | 0 | 2011-06-01T11:16:15.247000 | 2011-06-01T13:05:59.267000 |
6,200,270 | 6,200,396 | Decorator that prints function call details (argument names and values)? | I want to make a function that being a decorator to another function will print that function call details - parameters names and effective values. My current implementation is this. def describeFuncCall(func): """ Decorator to print function call details.
parameters names and effective values. """
def wrapper(*func_... | Sorry its a bit messy. I modified some code from Easy Dump of Function Arguments in the PythonDecoratorLibrary. def dump_args(func): "This decorator dumps out the arguments passed to a function before calling it" argnames = func.func_code.co_varnames[:func.func_code.co_argcount] fname = func.func_name def echo_func(*ar... | Decorator that prints function call details (argument names and values)? I want to make a function that being a decorator to another function will print that function call details - parameters names and effective values. My current implementation is this. def describeFuncCall(func): """ Decorator to print function call... | TITLE:
Decorator that prints function call details (argument names and values)?
QUESTION:
I want to make a function that being a decorator to another function will print that function call details - parameters names and effective values. My current implementation is this. def describeFuncCall(func): """ Decorator to p... | [
"python"
] | 31 | 14 | 26,983 | 6 | 0 | 2011-06-01T11:16:15.420000 | 2011-06-01T11:28:36.950000 |
6,200,271 | 6,203,259 | Conversion from Delphi to .NET 4 (Without any tool) | One of our clients wants their Delphi application to be converted to.NET 4.0. After reading responses to various similar questions on this site, I've decided to take a step-by-step approach of converting the Delphi code to.NET. Since I am a.NET developer, I need to first get familiar with Delphi. It is quite difficult ... | Really, the fastest way to do this is to start from scratch. Trying to convert the legacy code from Deplhi to C# is just fraught with issues, and at the end of it, you will have a Delphi-like C# application. The underlying frameworks, VCL in Delphi, and FCL in.NET, have significant architectural differences, so given t... | Conversion from Delphi to .NET 4 (Without any tool) One of our clients wants their Delphi application to be converted to.NET 4.0. After reading responses to various similar questions on this site, I've decided to take a step-by-step approach of converting the Delphi code to.NET. Since I am a.NET developer, I need to fi... | TITLE:
Conversion from Delphi to .NET 4 (Without any tool)
QUESTION:
One of our clients wants their Delphi application to be converted to.NET 4.0. After reading responses to various similar questions on this site, I've decided to take a step-by-step approach of converting the Delphi code to.NET. Since I am a.NET devel... | [
".net",
"wpf",
"delphi",
"c#-4.0",
"delphi-2009"
] | 6 | 3 | 4,299 | 3 | 0 | 2011-06-01T11:16:16.357000 | 2011-06-01T14:58:40.630000 |
6,200,273 | 6,200,410 | Comparing files (the hard way) | I'm about to lose my mind on this one right here. I'd like to compare 4 files with each other. They're split in 2 folders. So there is folder "A" with file 1-4 and there is folder "B" which is a copy of folder "A". package Aufgabe2;
import java.io.*; import java.util.ArrayList; import java.util.Collections; import jav... | You have several problems in that code. A naive solution is to replace the List with a Set and then add to it combination of file name and size. Other solution is to create a object that will contain the file name and the size of it. That will override the implementation of equals() and hashode(), and then use the Hash... | Comparing files (the hard way) I'm about to lose my mind on this one right here. I'd like to compare 4 files with each other. They're split in 2 folders. So there is folder "A" with file 1-4 and there is folder "B" which is a copy of folder "A". package Aufgabe2;
import java.io.*; import java.util.ArrayList; import ja... | TITLE:
Comparing files (the hard way)
QUESTION:
I'm about to lose my mind on this one right here. I'd like to compare 4 files with each other. They're split in 2 folders. So there is folder "A" with file 1-4 and there is folder "B" which is a copy of folder "A". package Aufgabe2;
import java.io.*; import java.util.Ar... | [
"java",
"file",
"comparator"
] | 0 | 1 | 3,020 | 4 | 0 | 2011-06-01T11:16:20.833000 | 2011-06-01T11:29:32.590000 |
6,200,277 | 6,201,536 | Why is my Google Analytics event tracking code not working from a PHP script called from my Flash movie? | I have a flash movie that calls a PHP script, passing a variable for this PHP script to process. I want to track this in google analytics. So my PHP script looks like this - Heres my analyticstracking.js script When I use Firebug to try and detect the call to google analytics I dont see the usual _utm.gif image that I ... | Flash will interpret the value returned from the PHP file as a string. It will not evaluate the javascript. You have two options really: Open a popup with the PHP code in it Trigger Google Analytics events from within Flash using something like gaforflash | Why is my Google Analytics event tracking code not working from a PHP script called from my Flash movie? I have a flash movie that calls a PHP script, passing a variable for this PHP script to process. I want to track this in google analytics. So my PHP script looks like this - Heres my analyticstracking.js script When... | TITLE:
Why is my Google Analytics event tracking code not working from a PHP script called from my Flash movie?
QUESTION:
I have a flash movie that calls a PHP script, passing a variable for this PHP script to process. I want to track this in google analytics. So my PHP script looks like this - Heres my analyticstrack... | [
"php",
"javascript",
"flash",
"google-analytics"
] | 2 | 2 | 698 | 1 | 0 | 2011-06-01T11:16:44.550000 | 2011-06-01T12:59:37.707000 |
6,200,281 | 6,200,568 | Adding redundant information to database to simplify query model | Lets imagine I have something resembling the following contrived example ParkingSpace Car ParkingSpaceCar ------------- ------------- --------------- Id Id ParkingSpaceId Date CarId So I have a history of all cars which have ever been allocated to any specific parking space, which is great. But in order to find the cur... | Having a heavily normalized model is great, as usually that gives the designer a lot of knowledge about the domain data model. However, once you start writing queries the cracks start showing. It's true that a normalized database will be able to answer every query, and use less space to store the data, but at the price... | Adding redundant information to database to simplify query model Lets imagine I have something resembling the following contrived example ParkingSpace Car ParkingSpaceCar ------------- ------------- --------------- Id Id ParkingSpaceId Date CarId So I have a history of all cars which have ever been allocated to any spe... | TITLE:
Adding redundant information to database to simplify query model
QUESTION:
Lets imagine I have something resembling the following contrived example ParkingSpace Car ParkingSpaceCar ------------- ------------- --------------- Id Id ParkingSpaceId Date CarId So I have a history of all cars which have ever been al... | [
"database-design",
"language-agnostic",
"query-optimization"
] | 1 | 1 | 166 | 5 | 0 | 2011-06-01T11:17:05.200000 | 2011-06-01T11:44:46.840000 |
6,200,284 | 6,202,339 | Bind a DependencyProperty in DataGrid.ElementStyle for each Column | My problem seems quite simple but i can't solve it, i've spent one day on it... I have a DataGrid and I want to be able to enabled/disable the TextWrapping on each column. The Wrapping is enable using a DependencyProperty from the controller. It seems my binding path isn't good due to "datacontext". What will be the go... | The "ControlerDataConsult" is used as DataContext for the XAML Page. If that is the case you could try a relative source binding like this: {Binding RelativeSource={RelativeSource AncestorType=Page}, Path=DataContext.SelectDataList_Column0IsWrapping} | Bind a DependencyProperty in DataGrid.ElementStyle for each Column My problem seems quite simple but i can't solve it, i've spent one day on it... I have a DataGrid and I want to be able to enabled/disable the TextWrapping on each column. The Wrapping is enable using a DependencyProperty from the controller. It seems m... | TITLE:
Bind a DependencyProperty in DataGrid.ElementStyle for each Column
QUESTION:
My problem seems quite simple but i can't solve it, i've spent one day on it... I have a DataGrid and I want to be able to enabled/disable the TextWrapping on each column. The Wrapping is enable using a DependencyProperty from the cont... | [
"c#",
".net",
"wpf",
"data-binding",
"datagrid"
] | 0 | 1 | 1,065 | 1 | 0 | 2011-06-01T11:17:56.070000 | 2011-06-01T13:55:44.880000 |
6,200,286 | 6,200,346 | Help needed using Predicate in Generics | Presently i use a method which returns me the ICommand object based on the string comparisons got from the supplied key. public ICommand getCommand(string mCommand) { foreach (object obj in objCommandList) { ICommand command = (ICommand)obj; if (command.m_strCommandName == mCommand) { return command; } } return null;
... | You might try something like this: objCommandList.Find(delegate(Icommand command) { return command.m_strCommandName == mCommand; }); or objCommandList.Find(c => c.m_strCommandName == mCommand); | Help needed using Predicate in Generics Presently i use a method which returns me the ICommand object based on the string comparisons got from the supplied key. public ICommand getCommand(string mCommand) { foreach (object obj in objCommandList) { ICommand command = (ICommand)obj; if (command.m_strCommandName == mComma... | TITLE:
Help needed using Predicate in Generics
QUESTION:
Presently i use a method which returns me the ICommand object based on the string comparisons got from the supplied key. public ICommand getCommand(string mCommand) { foreach (object obj in objCommandList) { ICommand command = (ICommand)obj; if (command.m_strCom... | [
"c#-2.0"
] | 0 | 0 | 25 | 1 | 0 | 2011-06-01T11:18:16.030000 | 2011-06-01T11:23:18.240000 |
6,200,288 | 6,209,259 | Pretty printing a list in a tabular format | Using Python 2.4, how do I print a list in a nice tabular format? My list is in the below format. mylist=[(('VAL1', 'VAL2', 'VAL3', 'VAL4', 'VAL5', 'VAL6'), AGGREGATE_VALUE)] I have tried pprint, but it does not print the result in a tabular format. EDIT: I would like to see the output in the below format: VAL1 VAL2 VA... | mylist = [ ( ('12', '47', '4', '574862', '58', '7856'), 'AGGREGATE_VALUE1'), ( ('2', '75', '757', '8233', '838', '47775272785'), 'AGGREG2'), ( ('4144', '78', '78965', '778', '78578', '2'), 'AGGREGATE_VALUE3')]
longg = dict.fromkeys((0,1,2,3,4,5,6),0)
for tu,x in mylist: for i,el in enumerate(tu): longg[i] = max(longg... | Pretty printing a list in a tabular format Using Python 2.4, how do I print a list in a nice tabular format? My list is in the below format. mylist=[(('VAL1', 'VAL2', 'VAL3', 'VAL4', 'VAL5', 'VAL6'), AGGREGATE_VALUE)] I have tried pprint, but it does not print the result in a tabular format. EDIT: I would like to see t... | TITLE:
Pretty printing a list in a tabular format
QUESTION:
Using Python 2.4, how do I print a list in a nice tabular format? My list is in the below format. mylist=[(('VAL1', 'VAL2', 'VAL3', 'VAL4', 'VAL5', 'VAL6'), AGGREGATE_VALUE)] I have tried pprint, but it does not print the result in a tabular format. EDIT: I w... | [
"python",
"string",
"list",
"printing",
"tuples"
] | 1 | 8 | 12,195 | 5 | 0 | 2011-06-01T11:18:17.040000 | 2011-06-02T00:37:20.037000 |
6,200,293 | 6,200,765 | How to set line spacing of an ordered list consistently across browsers? | I have an ordered list which uses large Georgia for the numbering and smaller Arial font for the text (as recommended at How to align two columns of text in CSS ). I am using p tags within the li's so i can set the font size which also sets the associated line height (ensuring that there is normal line spacing if the l... | You mention non-webkit, non-Firefox browsers appear to do the same thing. Have you looked using their developer tools? Both IE (except for 7; 6 has it as an addon; 8 and 9 have it included, just hit F12) and Opera have developer tools. Check them out and see what's causing it in them. Opera puts a 1em top and bottom ma... | How to set line spacing of an ordered list consistently across browsers? I have an ordered list which uses large Georgia for the numbering and smaller Arial font for the text (as recommended at How to align two columns of text in CSS ). I am using p tags within the li's so i can set the font size which also sets the as... | TITLE:
How to set line spacing of an ordered list consistently across browsers?
QUESTION:
I have an ordered list which uses large Georgia for the numbering and smaller Arial font for the text (as recommended at How to align two columns of text in CSS ). I am using p tags within the li's so i can set the font size whic... | [
"html",
"css"
] | 4 | 3 | 17,594 | 3 | 0 | 2011-06-01T11:18:42.987000 | 2011-06-01T11:59:34.743000 |
6,200,316 | 6,200,480 | CakePHP complex find from three tables dependent | I have three tables: Stories (id, category_id, sub_category_id, name, story),
Categories (id, parent_id, lft. rght, name),
SubCategories (id, name) They are properly related and all is working fine. But now I need to find stories which belongs to specified category and/or sub_category, by name autocompleate dialog. E... | there are a few options for doing this, some of them below a) linkable behavior - https://github.com/Terr/linkable/wiki b) bindModel - http://mark-story.com/posts/view/using-bindmodel-to-get-to-deep-relations c) adhoc-joins http://bakery.cakephp.org/articles/view/quick-tip-doing-ad-hoc-joins-in-model-find read up on th... | CakePHP complex find from three tables dependent I have three tables: Stories (id, category_id, sub_category_id, name, story),
Categories (id, parent_id, lft. rght, name),
SubCategories (id, name) They are properly related and all is working fine. But now I need to find stories which belongs to specified category and... | TITLE:
CakePHP complex find from three tables dependent
QUESTION:
I have three tables: Stories (id, category_id, sub_category_id, name, story),
Categories (id, parent_id, lft. rght, name),
SubCategories (id, name) They are properly related and all is working fine. But now I need to find stories which belongs to spec... | [
"sql",
"cakephp",
"find"
] | 0 | 0 | 904 | 2 | 0 | 2011-06-01T11:20:37.023000 | 2011-06-01T11:36:12.293000 |
6,200,322 | 6,200,381 | Hashmap error,i can't load data from string | I m using hashmap for a listview. map = new HashMap (); map.put("name", R.string.information); map.put("address", R.drawable.info3);
mylist.add(map); //... my problem is that i cant load string in my hashmap (R.string.information)..when i run it,i can only see some numbers instead of my text..am i doing something wron... | R.string.information is just an int. If you want the actual String, use map.put("name", getString(R.string.information)); | Hashmap error,i can't load data from string I m using hashmap for a listview. map = new HashMap (); map.put("name", R.string.information); map.put("address", R.drawable.info3);
mylist.add(map); //... my problem is that i cant load string in my hashmap (R.string.information)..when i run it,i can only see some numbers i... | TITLE:
Hashmap error,i can't load data from string
QUESTION:
I m using hashmap for a listview. map = new HashMap (); map.put("name", R.string.information); map.put("address", R.drawable.info3);
mylist.add(map); //... my problem is that i cant load string in my hashmap (R.string.information)..when i run it,i can only ... | [
"android"
] | 0 | 1 | 403 | 4 | 0 | 2011-06-01T11:21:14.993000 | 2011-06-01T11:26:33.967000 |
6,200,329 | 6,200,462 | how to load a file from folder to memory stream buffer | I am working on vb.net win form. My task is display the file names from a folder onto gridview control. when user clicks process button in my UI, all the file names present in gridview, the corresponding file has to be loaded onto memory stream buffer one after another and append the titles to the content of the file a... | to read a file into a memorystream is quite easy, just have a look at the following example and you should be able to convert it to suite your needs: Dim bData As Byte() Dim br As BinaryReader = New BinaryReader(System.IO.File.OpenRead(Path)) bData = br.ReadBytes(br.BaseStream.Length) Dim ms As MemoryStream = New Memor... | how to load a file from folder to memory stream buffer I am working on vb.net win form. My task is display the file names from a folder onto gridview control. when user clicks process button in my UI, all the file names present in gridview, the corresponding file has to be loaded onto memory stream buffer one after ano... | TITLE:
how to load a file from folder to memory stream buffer
QUESTION:
I am working on vb.net win form. My task is display the file names from a folder onto gridview control. when user clicks process button in my UI, all the file names present in gridview, the corresponding file has to be loaded onto memory stream bu... | [
"vb.net"
] | 3 | 6 | 30,477 | 1 | 0 | 2011-06-01T11:22:00.237000 | 2011-06-01T11:34:09.670000 |
6,200,336 | 6,200,418 | How to translate PHP JSON web service to C#? | I've been writing an iPhone app that could send JSON to a PHP file and been fairly successful doing this. However, now that I want to move on to ASP C# and create an equivalent.NET web service akin to the PHP I wrote earlier to decode and encode the JSON, I'm completely clueless. In PHP I do this: $handle = fopen('php:... | It very simple to use WCF REST. follow steps as this link below: http://blogs.msdn.com/b/kaevans/archive/2008/04/03/creating-restful-services-using-wcf.aspx [ServiceContract] public interface IService { [OperationContract] [WebGet(UriTemplate="customers/{id}", ResponseFormat=WebMessageFormat.Json)] Customer GetCustomer... | How to translate PHP JSON web service to C#? I've been writing an iPhone app that could send JSON to a PHP file and been fairly successful doing this. However, now that I want to move on to ASP C# and create an equivalent.NET web service akin to the PHP I wrote earlier to decode and encode the JSON, I'm completely clue... | TITLE:
How to translate PHP JSON web service to C#?
QUESTION:
I've been writing an iPhone app that could send JSON to a PHP file and been fairly successful doing this. However, now that I want to move on to ASP C# and create an equivalent.NET web service akin to the PHP I wrote earlier to decode and encode the JSON, I... | [
"c#",
"php",
"web-services",
"json"
] | 1 | 1 | 1,350 | 1 | 0 | 2011-06-01T11:22:37.760000 | 2011-06-01T11:29:58.067000 |
6,200,339 | 6,200,377 | Adding check for count of characters to regex expression | I have a regular expression: "^([a-zA-Z])[a-zA-Z_-]*[\\w_-]*[\\S]$|^([a-zA-Z])[0-9_-]*[\\S]$|^[a-zA-Z]*[\\S]$ (from Java). And I want to add a check for count of characters entered and I am doing it by adding {5,15} before the ending $: "^([a-zA-Z])[a-zA-Z_-]*[\\w_-]*[\\S]$|^([a-zA-Z])[0-9_-]*[\\S]$|^[a-zA-Z]*[\\S]{5,1... | Well, your change just checks whether there are 5 to 15 non-space characters in that specific option. I think the usual way would be to prepend (?=^.{5,15}$) and put the rest in another group after that. | Adding check for count of characters to regex expression I have a regular expression: "^([a-zA-Z])[a-zA-Z_-]*[\\w_-]*[\\S]$|^([a-zA-Z])[0-9_-]*[\\S]$|^[a-zA-Z]*[\\S]$ (from Java). And I want to add a check for count of characters entered and I am doing it by adding {5,15} before the ending $: "^([a-zA-Z])[a-zA-Z_-]*[\\... | TITLE:
Adding check for count of characters to regex expression
QUESTION:
I have a regular expression: "^([a-zA-Z])[a-zA-Z_-]*[\\w_-]*[\\S]$|^([a-zA-Z])[0-9_-]*[\\S]$|^[a-zA-Z]*[\\S]$ (from Java). And I want to add a check for count of characters entered and I am doing it by adding {5,15} before the ending $: "^([a-zA... | [
"regex"
] | 1 | 4 | 851 | 1 | 0 | 2011-06-01T11:22:50.807000 | 2011-06-01T11:26:24.887000 |
6,200,340 | 6,200,796 | Wild execution of instructions happen when optimization set to high in IAR MSP430 compiler | Please refer to my code below. When optimization in IAR MSP430 compiler is set high, I am having the following issue. Code works fine when optimization is low. Issue: If the condition statement at (B) returns false, statement (A) is executed instead of statement (C). int16_t cpu_flash_read_setting (void * setting, cons... | That looks entirely reasonable to me. When you have optimisation turned up high, the compiler can and usually will re-order statements wildly. Your two main clauses are identical apart from their typing - so it's entirely plausible for the compiler to merge the execution paths and have them differ only where it actuall... | Wild execution of instructions happen when optimization set to high in IAR MSP430 compiler Please refer to my code below. When optimization in IAR MSP430 compiler is set high, I am having the following issue. Code works fine when optimization is low. Issue: If the condition statement at (B) returns false, statement (A)... | TITLE:
Wild execution of instructions happen when optimization set to high in IAR MSP430 compiler
QUESTION:
Please refer to my code below. When optimization in IAR MSP430 compiler is set high, I am having the following issue. Code works fine when optimization is low. Issue: If the condition statement at (B) returns fa... | [
"c",
"compiler-optimization"
] | 1 | 1 | 350 | 2 | 0 | 2011-06-01T11:22:59.110000 | 2011-06-01T12:01:29.827000 |
6,200,355 | 6,200,373 | Increase the size of tableView Cell..? | Is it possible to increase the size of particular cell in the TableView. -(CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath: (NSIndexPath *)indexPath { return 100; } By using this we can increase the size of the table cell for a tableView but it will increase all the tableCell size. But I want to inc... | Make height value dependent on cell's position (indexPath), e.g. to make 1st cell higher then others do the following: -(CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath: (NSIndexPath *)indexPath{ if (indexPath.row == 0) return 130.0f;
return 100.0f; } *Note that with that code if you have several s... | Increase the size of tableView Cell..? Is it possible to increase the size of particular cell in the TableView. -(CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath: (NSIndexPath *)indexPath { return 100; } By using this we can increase the size of the table cell for a tableView but it will increase al... | TITLE:
Increase the size of tableView Cell..?
QUESTION:
Is it possible to increase the size of particular cell in the TableView. -(CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath: (NSIndexPath *)indexPath { return 100; } By using this we can increase the size of the table cell for a tableView but i... | [
"iphone",
"objective-c",
"xcode4"
] | 0 | 4 | 1,145 | 1 | 0 | 2011-06-01T11:24:10.867000 | 2011-06-01T11:26:07.793000 |
6,200,362 | 6,200,500 | draw a chart on android | I have stored in two near column in a DB in android these: 1-st column I have stored speed of a car 2-th column I have stored the moment of time when that car had tha speed What I wanna do is to plot a graph which has on the x-axis the period of time and on the y-axis the speed of the car at that moment. Has anyone any... | hi you can use android chart library as well u can paint a chart using canvas class. these are library. http://www.achartengine.org/ http://code.google.com/p/chartdroid/ http://www.artfulbits.com/products/android/aiCharts.aspx http://code.google.com/apis/chart/ | draw a chart on android I have stored in two near column in a DB in android these: 1-st column I have stored speed of a car 2-th column I have stored the moment of time when that car had tha speed What I wanna do is to plot a graph which has on the x-axis the period of time and on the y-axis the speed of the car at tha... | TITLE:
draw a chart on android
QUESTION:
I have stored in two near column in a DB in android these: 1-st column I have stored speed of a car 2-th column I have stored the moment of time when that car had tha speed What I wanna do is to plot a graph which has on the x-axis the period of time and on the y-axis the speed... | [
"android",
"database",
"charts"
] | 0 | 1 | 1,099 | 1 | 0 | 2011-06-01T11:24:30.993000 | 2011-06-01T11:38:38.670000 |
6,200,367 | 6,200,440 | Tweenlite - a sequence chain of TweenLite.to not triggering | Its pretty simple what im trying to achieve. I have a MC on Stage, which im trying to tween to different X coordinates. I've set up four TweenLite.to sequences, however for some weird reason only one is being triggered - what am I doing wrong? TweenLite.to(slider.mc_slider,1,{x:_returnXPos(95), ease:menuEasing}); Tween... | The problem might be that you have to make sure that you're using the OverwriteManager with the right settings, otherwise it might just overwrite your tweens, regardless of the delays, see: http://www.greensock.com/overwritemanager/ | Tweenlite - a sequence chain of TweenLite.to not triggering Its pretty simple what im trying to achieve. I have a MC on Stage, which im trying to tween to different X coordinates. I've set up four TweenLite.to sequences, however for some weird reason only one is being triggered - what am I doing wrong? TweenLite.to(sli... | TITLE:
Tweenlite - a sequence chain of TweenLite.to not triggering
QUESTION:
Its pretty simple what im trying to achieve. I have a MC on Stage, which im trying to tween to different X coordinates. I've set up four TweenLite.to sequences, however for some weird reason only one is being triggered - what am I doing wrong... | [
"flash",
"actionscript-3",
"flash-cs5",
"tween",
"gsap"
] | 0 | 4 | 2,743 | 3 | 0 | 2011-06-01T11:25:20.707000 | 2011-06-01T11:32:02.793000 |
6,200,369 | 6,262,945 | PictureCallback.onPictureTaken never called | I am writing an application that needs pictures taken with the camera. The problem occurs when I try to take an actual picture. Here's the code that is troubling me: final ShutterCallback shutterCallback = new ShutterCallback() { @Override public void onShutter() { Log.d(TAG, "onShutter"); } };
final PictureCallback c... | I finally went and debugged the problem. All of a sudden it worked, because debugging is much slower: It's a timing problem. The callback takes some time to be called. While debugging the phone had enough time to finish taking the picture... Also don't go calling Camera.stopPreview() and Camera.release() too early. | PictureCallback.onPictureTaken never called I am writing an application that needs pictures taken with the camera. The problem occurs when I try to take an actual picture. Here's the code that is troubling me: final ShutterCallback shutterCallback = new ShutterCallback() { @Override public void onShutter() { Log.d(TAG,... | TITLE:
PictureCallback.onPictureTaken never called
QUESTION:
I am writing an application that needs pictures taken with the camera. The problem occurs when I try to take an actual picture. Here's the code that is troubling me: final ShutterCallback shutterCallback = new ShutterCallback() { @Override public void onShut... | [
"android",
"camera"
] | 13 | 18 | 12,844 | 3 | 0 | 2011-06-01T11:25:39.363000 | 2011-06-07T09:03:36.213000 |
6,200,372 | 6,200,402 | LINQ to SQL Expression "Orderby" help | I current have a LINQ expression, although I would like to know it its possible to use the "orderby" directive in conjunction with a specific field in this case "CDGenre" e.g. DataClassesDataContext db = new DataClassesDataContext (); { from p in db.ArtistName **orderby p.CDGenre** accending; select p.CDTitle; } Will t... | The syntax looks right to me, there's also the option of: (from p in db.ArtistName select p.CDTitle).OrderBy(p => p.CDGenre); edit: you could select into an object if you want multiple things in the select statement: (from p in db.ArtistName select new CDObject(p.CDTitle,p.CDGenre,p.CDArtist)).OrderBy(p => p.CDGenre); | LINQ to SQL Expression "Orderby" help I current have a LINQ expression, although I would like to know it its possible to use the "orderby" directive in conjunction with a specific field in this case "CDGenre" e.g. DataClassesDataContext db = new DataClassesDataContext (); { from p in db.ArtistName **orderby p.CDGenre**... | TITLE:
LINQ to SQL Expression "Orderby" help
QUESTION:
I current have a LINQ expression, although I would like to know it its possible to use the "orderby" directive in conjunction with a specific field in this case "CDGenre" e.g. DataClassesDataContext db = new DataClassesDataContext (); { from p in db.ArtistName **o... | [
"c#",
".net",
"sql",
"linq"
] | 1 | 1 | 514 | 5 | 0 | 2011-06-01T11:26:04.840000 | 2011-06-01T11:28:54.773000 |
6,200,375 | 6,200,644 | Calculating the mean for a set of numbers while neglecting outliers | First of all this is more of a math question than it is a coding one, so please be patient. I am trying to figure out an algorithm to calculate the mean for a set of numbers. However I need to neglect any numbers that are not close to the majority of the results. Here is an example of what I am trying to do: Lets say I... | What you could do is: estimate the percentage of outliers in your data: about 25% (4/15) of the provided dataset, compute the adequate quantiles: 8-quantiles for your dataset, so as to exclude the outliers, estimate the mean between the first and the last quantile. PS: Outliers constituting 25% of your dataset is a lot... | Calculating the mean for a set of numbers while neglecting outliers First of all this is more of a math question than it is a coding one, so please be patient. I am trying to figure out an algorithm to calculate the mean for a set of numbers. However I need to neglect any numbers that are not close to the majority of t... | TITLE:
Calculating the mean for a set of numbers while neglecting outliers
QUESTION:
First of all this is more of a math question than it is a coding one, so please be patient. I am trying to figure out an algorithm to calculate the mean for a set of numbers. However I need to neglect any numbers that are not close to... | [
"c++",
"math"
] | 6 | 6 | 6,121 | 4 | 0 | 2011-06-01T11:26:19.550000 | 2011-06-01T11:50:53.907000 |
6,200,387 | 6,224,938 | Grand Central Dispatch problems with dispatch_release | I have a problem with a GCD solution I've made. I have a thread that runs in the background, it updates the application in a given interval. For this I use a timer. However if the user wants to change this interval, I call dispatch_source_cancel(timer); Which is defined as dispatch_source_set_cancel_handler(timer, ^{ d... | I don't think this is the answer. dispatch_source_cancel doesn't cancel immediately, synchronously. man dispatch_source_cancel The dispatch_source_cancel() function asynchronously cancels the dispatch source, preventing any further invocation of its event handler block. Cancellation does not interrupt a currently execu... | Grand Central Dispatch problems with dispatch_release I have a problem with a GCD solution I've made. I have a thread that runs in the background, it updates the application in a given interval. For this I use a timer. However if the user wants to change this interval, I call dispatch_source_cancel(timer); Which is def... | TITLE:
Grand Central Dispatch problems with dispatch_release
QUESTION:
I have a problem with a GCD solution I've made. I have a thread that runs in the background, it updates the application in a given interval. For this I use a timer. However if the user wants to change this interval, I call dispatch_source_cancel(ti... | [
"iphone",
"ios",
"grand-central-dispatch"
] | 0 | 1 | 2,165 | 1 | 0 | 2011-06-01T11:26:47.857000 | 2011-06-03T08:51:56.027000 |
6,200,392 | 6,212,534 | Wordpress: Selecting only one post type for WP_list_categories | Similar to this. I've created two custom post types, and now they are happily sharing two taxonomies, but unfortunately wp_list_categories doesn't allow me to list a taxonomy by only one post type. The code of wp_list_categories relies on get_categories, resulting in an array of categories. So I produced a wp_query thu... | I did this by cloning the wp_list_categories function, giving it a different name and putting in this code after the line: $categories=get_categories($r): foreach ($categories as $key => $category){ $temp = array ( 'post_type'=>$r['type'], 'tax_query' => array( array ( 'taxonomy' => $category->taxonomy, 'field' => 'slu... | Wordpress: Selecting only one post type for WP_list_categories Similar to this. I've created two custom post types, and now they are happily sharing two taxonomies, but unfortunately wp_list_categories doesn't allow me to list a taxonomy by only one post type. The code of wp_list_categories relies on get_categories, re... | TITLE:
Wordpress: Selecting only one post type for WP_list_categories
QUESTION:
Similar to this. I've created two custom post types, and now they are happily sharing two taxonomies, but unfortunately wp_list_categories doesn't allow me to list a taxonomy by only one post type. The code of wp_list_categories relies on ... | [
"php",
"wordpress"
] | 0 | 0 | 905 | 1 | 0 | 2011-06-01T11:27:55.050000 | 2011-06-02T09:13:04.107000 |
6,200,393 | 6,204,504 | Newbie OpenGL ES 2.0 Math question | After resisting the mighty power of ES 2.0 for a while, I finally give up myself and try to swallow as much as my mouth can bite. Here are my questions. According to few good books and examples, my vertex shader cannot see the connection between vertices but the fragment shader does. Then 1) is it safe to say I can per... | The golden rule is don't do operations that are unneccessary! That's why you compute your transformation matrix on the CPU (as it doesn't change per fragment or even per vertex). So you only need to multiply every vertex by a single matrix (one matrix operation on the CPU is often still better than thousands on the GPU... | Newbie OpenGL ES 2.0 Math question After resisting the mighty power of ES 2.0 for a while, I finally give up myself and try to swallow as much as my mouth can bite. Here are my questions. According to few good books and examples, my vertex shader cannot see the connection between vertices but the fragment shader does. ... | TITLE:
Newbie OpenGL ES 2.0 Math question
QUESTION:
After resisting the mighty power of ES 2.0 for a while, I finally give up myself and try to swallow as much as my mouth can bite. Here are my questions. According to few good books and examples, my vertex shader cannot see the connection between vertices but the frag... | [
"math",
"shader",
"opengl-es-2.0"
] | 1 | 1 | 940 | 2 | 0 | 2011-06-01T11:28:19.813000 | 2011-06-01T16:24:59.390000 |
6,200,395 | 6,201,387 | Cannot decompress ZLIB/DEFLATE data | I'm trying to extract data from compressed bytes from network capture file (PCAP.) Data from some of these packets don't have ZLIB header (the first 2 bytes, where lower 4 bits of first byte is always 8) and hence gave exception when I tried to decompress it using ZlibStream. Data with headers seem to work fine. As I u... | Yes, you need the entire "file", you can't deflate individual packets in isolation. From the zlib documentation, it is possible to start deflate from various points within the file. However, you need to have full control over the compression half of the puzzle, since you have to know exactly where those points are in o... | Cannot decompress ZLIB/DEFLATE data I'm trying to extract data from compressed bytes from network capture file (PCAP.) Data from some of these packets don't have ZLIB header (the first 2 bytes, where lower 4 bits of first byte is always 8) and hence gave exception when I tried to decompress it using ZlibStream. Data wi... | TITLE:
Cannot decompress ZLIB/DEFLATE data
QUESTION:
I'm trying to extract data from compressed bytes from network capture file (PCAP.) Data from some of these packets don't have ZLIB header (the first 2 bytes, where lower 4 bits of first byte is always 8) and hence gave exception when I tried to decompress it using Z... | [
"c#",
"compression",
"zlib",
"deflate",
"dotnetzip"
] | 3 | 2 | 4,022 | 1 | 0 | 2011-06-01T11:28:33.003000 | 2011-06-01T12:48:32.203000 |
6,200,422 | 6,201,089 | How do I set up databinder dispatch to use in Eclipse? | I want to write some simple HTTP requests in Scala, but the Databinder Dispatch library only has instructions for sbt. As I'm a relative Eclipse newbie, can someone provide instructions on how I use it in my Scala project in Eclipse? I'm using Scala 2.9.0final. If it's incompatible with Dispatch, is there an alternativ... | The page you have linked to has instructions for trying out Dispatch using the sbt console. It is much easier to just do that on the command line, although if you are convinced to do this with Eclipse you can read your integration options. If you want to set up a project and write some code that can be compiled that us... | How do I set up databinder dispatch to use in Eclipse? I want to write some simple HTTP requests in Scala, but the Databinder Dispatch library only has instructions for sbt. As I'm a relative Eclipse newbie, can someone provide instructions on how I use it in my Scala project in Eclipse? I'm using Scala 2.9.0final. If ... | TITLE:
How do I set up databinder dispatch to use in Eclipse?
QUESTION:
I want to write some simple HTTP requests in Scala, but the Databinder Dispatch library only has instructions for sbt. As I'm a relative Eclipse newbie, can someone provide instructions on how I use it in my Scala project in Eclipse? I'm using Sca... | [
"eclipse",
"scala",
"databinder"
] | 2 | 1 | 1,027 | 2 | 0 | 2011-06-01T11:30:13.183000 | 2011-06-01T12:25:02.743000 |
6,200,423 | 6,200,466 | Drupal pop-up window for printing | I have a Drupal website and I need to create a link to a different version of the same page that opens up in a new window but hides all the side bars, blocks and header and just shows the main content. This is so people can print the main content of the page without all the extra bits. I know I can add in a link to a p... | Try the Drupal Print module, it provides customization for printing pages in Drupal. | Drupal pop-up window for printing I have a Drupal website and I need to create a link to a different version of the same page that opens up in a new window but hides all the side bars, blocks and header and just shows the main content. This is so people can print the main content of the page without all the extra bits.... | TITLE:
Drupal pop-up window for printing
QUESTION:
I have a Drupal website and I need to create a link to a different version of the same page that opens up in a new window but hides all the side bars, blocks and header and just shows the main content. This is so people can print the main content of the page without a... | [
"javascript",
"css",
"drupal",
"printing"
] | 1 | 4 | 1,422 | 3 | 0 | 2011-06-01T11:30:29.013000 | 2011-06-01T11:34:37.223000 |
6,200,424 | 6,200,458 | Event fires more and more times | I have a silverlight mvvm application that loads main view with 2 user controls loaded into 2 ContentControls, one with listbox showing items and other with edit button. When i click edit button, 2 new user controls load into the ContentControls, one showing data to edit (EditData) and other having Save and Cancel butt... | You can't use lambdas when you want to unregister from events. this.globalEvents.OnSaveButtonClicked += (s, e) => SaveData(); This will create one instance - let's call it instance A - of type EventHandler and add it as a handler. this.globalEvents.OnSaveButtonClicked -= (s, e) => SaveData(); This will not remove insta... | Event fires more and more times I have a silverlight mvvm application that loads main view with 2 user controls loaded into 2 ContentControls, one with listbox showing items and other with edit button. When i click edit button, 2 new user controls load into the ContentControls, one showing data to edit (EditData) and o... | TITLE:
Event fires more and more times
QUESTION:
I have a silverlight mvvm application that loads main view with 2 user controls loaded into 2 ContentControls, one with listbox showing items and other with edit button. When i click edit button, 2 new user controls load into the ContentControls, one showing data to edi... | [
"c#",
"silverlight",
"events",
"mvvm",
"event-handling"
] | 7 | 8 | 6,100 | 4 | 0 | 2011-06-01T11:30:29.860000 | 2011-06-01T11:33:56.753000 |
6,200,433 | 6,207,368 | Is there any way to configure Struts to bind null instead of empty String? | When user decides to leave the field in the form empty the Apache Struts binds empty String as value for properties in the ActionForm. Is there any way to modify the behavior globally and opt for null instead of empty String? I know that Spring MVC does exactly the same, but there is also StringTrimmerEditor that can b... | A possible solution - one that will allow a single conversion entry point for all your String fields - would be to register a custom convertor, but not with Struts but with BeanUtils. For mapping request parameters to form properties, Struts makes use of the populate method of its RequestUtils class. This class in turn... | Is there any way to configure Struts to bind null instead of empty String? When user decides to leave the field in the form empty the Apache Struts binds empty String as value for properties in the ActionForm. Is there any way to modify the behavior globally and opt for null instead of empty String? I know that Spring ... | TITLE:
Is there any way to configure Struts to bind null instead of empty String?
QUESTION:
When user decides to leave the field in the form empty the Apache Struts binds empty String as value for properties in the ActionForm. Is there any way to modify the behavior globally and opt for null instead of empty String? I... | [
"java",
"web-applications",
"struts-1"
] | 5 | 4 | 5,263 | 8 | 0 | 2011-06-01T11:31:19.167000 | 2011-06-01T20:39:49.043000 |
6,200,437 | 6,201,158 | numpy and Global Interpreter Lock | I am about to write some computationally-intensive Python code that'll almost certainly spend most of its time inside numpy 's linear algebra functions. The problem at hand is embarrassingly parallel. Long story short, the easiest way for me to take advantage of that would be by using multiple threads. The main barrier... | You will probably find answers to all your questions regarding NumPy and parallel programming on the official wiki. Also, have a look at this recipe page -- it contains example code on how to use NumPy with multiple threads. | numpy and Global Interpreter Lock I am about to write some computationally-intensive Python code that'll almost certainly spend most of its time inside numpy 's linear algebra functions. The problem at hand is embarrassingly parallel. Long story short, the easiest way for me to take advantage of that would be by using ... | TITLE:
numpy and Global Interpreter Lock
QUESTION:
I am about to write some computationally-intensive Python code that'll almost certainly spend most of its time inside numpy 's linear algebra functions. The problem at hand is embarrassingly parallel. Long story short, the easiest way for me to take advantage of that ... | [
"python",
"multithreading",
"numpy",
"gil",
"python-multithreading"
] | 38 | 6 | 13,672 | 3 | 0 | 2011-06-01T11:31:48.090000 | 2011-06-01T12:30:06.883000 |
6,200,449 | 6,200,493 | Fix a footer div cross mobile platforms - Jquery? | Does anybody have a simple effective solution to fix a footer menu to the bottom of a viewport window? Absolute positioning appears to work in all but Iphone. I thought that their should be a simple jquery or jquery touch script out there to do this, but I'm yet to find one! Any advice greatfully received! Cheers Paul | Paul, you can achieve this by adding a footer with fixed-positioning, see http://jquerymobile.com/demos/1.0a4.1/#docs/toolbars/bars-fixed.html Just create a navbar within the footer for a menu, see http://jquerymobile.com/demos/1.0a4.1/#docs/toolbars/docs-navbar.html or alternatively http://jquerymobile.com/demos/1.0a4... | Fix a footer div cross mobile platforms - Jquery? Does anybody have a simple effective solution to fix a footer menu to the bottom of a viewport window? Absolute positioning appears to work in all but Iphone. I thought that their should be a simple jquery or jquery touch script out there to do this, but I'm yet to find... | TITLE:
Fix a footer div cross mobile platforms - Jquery?
QUESTION:
Does anybody have a simple effective solution to fix a footer menu to the bottom of a viewport window? Absolute positioning appears to work in all but Iphone. I thought that their should be a simple jquery or jquery touch script out there to do this, b... | [
"mobile",
"jquery-mobile",
"jqtouch"
] | 0 | 2 | 868 | 2 | 0 | 2011-06-01T11:33:11.463000 | 2011-06-01T11:38:15.113000 |
6,200,461 | 6,200,487 | Calculate Speed using GPS in Android | I want to develop an Android App, which will give me the speed with which I am travelling. Please suggest me some webSites from where I can get some help. I know there is a function like Location.getSpeed(). But don't know how exactly it works. | First read this article to learn how to get GPS fixes. You can call getSpeed() in your location listener, in the onLocationChanged() callback. | Calculate Speed using GPS in Android I want to develop an Android App, which will give me the speed with which I am travelling. Please suggest me some webSites from where I can get some help. I know there is a function like Location.getSpeed(). But don't know how exactly it works. | TITLE:
Calculate Speed using GPS in Android
QUESTION:
I want to develop an Android App, which will give me the speed with which I am travelling. Please suggest me some webSites from where I can get some help. I know there is a function like Location.getSpeed(). But don't know how exactly it works.
ANSWER:
First read ... | [
"android"
] | 5 | 8 | 26,183 | 1 | 0 | 2011-06-01T11:34:05.307000 | 2011-06-01T11:37:41.500000 |
6,200,476 | 6,217,611 | Real-time application with graphic interface | I need to develop the real-time application which can handle user's input (from some external control panel) as fast as possible and provide some output to LCD monitor (very fast as well). To be more exact - I need to handle fixed-time interrupts (with period of 1ms) to recalculate internal model - with current state f... | As far as the different OSs, I know QNX has very good "hard" real time and has been built & optimized from the ground up. It also now has Qt running on it (QNX 6.5) for full featured GUIness. I have heard (2nd hand) anecdotal information that rtlinux is very close to hard realtime (guaranteed realtime), but it can some... | Real-time application with graphic interface I need to develop the real-time application which can handle user's input (from some external control panel) as fast as possible and provide some output to LCD monitor (very fast as well). To be more exact - I need to handle fixed-time interrupts (with period of 1ms) to reca... | TITLE:
Real-time application with graphic interface
QUESTION:
I need to develop the real-time application which can handle user's input (from some external control panel) as fast as possible and provide some output to LCD monitor (very fast as well). To be more exact - I need to handle fixed-time interrupts (with peri... | [
"real-time",
"monitor",
"qnx",
"rtx"
] | 1 | 2 | 308 | 1 | 0 | 2011-06-01T11:35:54.880000 | 2011-06-02T16:55:34.563000 |
6,200,486 | 6,201,390 | iOS Printing UI - limit number of copies | is it possible to limit number of copies (from code) which user is allowed to print? | In a word: No. This is not exposed in the public API and you should file a feature request on bugreport.apple.com if you want to see this functionality in a future version of the iOS APIs. | iOS Printing UI - limit number of copies is it possible to limit number of copies (from code) which user is allowed to print? | TITLE:
iOS Printing UI - limit number of copies
QUESTION:
is it possible to limit number of copies (from code) which user is allowed to print?
ANSWER:
In a word: No. This is not exposed in the public API and you should file a feature request on bugreport.apple.com if you want to see this functionality in a future ver... | [
"iphone",
"ios",
"ipad",
"printing"
] | 2 | 1 | 463 | 1 | 0 | 2011-06-01T11:37:41.213000 | 2011-06-01T12:48:42.890000 |
6,200,488 | 6,200,748 | Conditional Java Package Distributions | I know there isn't such a thing as conditional compilation as in C/C++ but I wonder if it is possible to produce a java program conditionally based on requirements. For example, there could be a public version which contains some features and private version which contains more features. Am I right to believe that the ... | I would have multiple modules for your application and multiple jars. I would have all the "private" features in a jar by itself and the rest in one or more jars. Your application would then use the features which are available in the jars distributed (there are any number of ways to do this) A library which you might ... | Conditional Java Package Distributions I know there isn't such a thing as conditional compilation as in C/C++ but I wonder if it is possible to produce a java program conditionally based on requirements. For example, there could be a public version which contains some features and private version which contains more fe... | TITLE:
Conditional Java Package Distributions
QUESTION:
I know there isn't such a thing as conditional compilation as in C/C++ but I wonder if it is possible to produce a java program conditionally based on requirements. For example, there could be a public version which contains some features and private version whic... | [
"java"
] | 1 | 3 | 153 | 3 | 0 | 2011-06-01T11:37:42.513000 | 2011-06-01T11:58:16.833000 |
6,200,494 | 6,201,520 | Script to find webmaster contact details | As part of a summer project I am currently undertaking, I am interested in writing a script to automate the retrieval of the contact email address for a particular site's webmaster. Is there any information anyone can direct my way to start me off? Stuff like research papers, source code for similar applications etc. I... | Check out Simone Carletti's pure ruby whois client & parser GitHub project. Here's a usage example: r = Whois.whois("google.com") # => # t = r.technical_contact # => # t.email # => "dns-admin@google.com" | Script to find webmaster contact details As part of a summer project I am currently undertaking, I am interested in writing a script to automate the retrieval of the contact email address for a particular site's webmaster. Is there any information anyone can direct my way to start me off? Stuff like research papers, so... | TITLE:
Script to find webmaster contact details
QUESTION:
As part of a summer project I am currently undertaking, I am interested in writing a script to automate the retrieval of the contact email address for a particular site's webmaster. Is there any information anyone can direct my way to start me off? Stuff like r... | [
"ruby",
"search",
"scripting",
"information-extraction"
] | 0 | 1 | 268 | 1 | 0 | 2011-06-01T11:38:15.470000 | 2011-06-01T12:58:55.980000 |
6,200,501 | 6,200,570 | adding uibuttons programmatically | here i have this code that i'm trying where openingHoursView.ohLocation has two values " value1 " and " value2 ". So does openingHoursView.idNum with values " id1 " and " id2 ". When i execute my code I only get one button with the name of " value2 " and " id2 ". So my question would be how to create all the buttons fo... | The problem is that you're doing: self.view = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
self.view.backgroundColor = [UIColor whiteColor]; inside the for loop and thus gets overwritten on each iteration. You should only do it once before the for loop. | adding uibuttons programmatically here i have this code that i'm trying where openingHoursView.ohLocation has two values " value1 " and " value2 ". So does openingHoursView.idNum with values " id1 " and " id2 ". When i execute my code I only get one button with the name of " value2 " and " id2 ". So my question would b... | TITLE:
adding uibuttons programmatically
QUESTION:
here i have this code that i'm trying where openingHoursView.ohLocation has two values " value1 " and " value2 ". So does openingHoursView.idNum with values " id1 " and " id2 ". When i execute my code I only get one button with the name of " value2 " and " id2 ". So m... | [
"iphone",
"uibutton"
] | 2 | 3 | 6,302 | 3 | 0 | 2011-06-01T11:38:46.390000 | 2011-06-01T11:44:57.730000 |
6,200,509 | 6,200,649 | Best practice for method chaining ("return this") | I have an abstract class called DatabaseRow that, after being derived and constructed, is mainly loaded from a Load(object id) method. I have lots of code that creates a new instance of the class, loads it from an ID, then returns the class. I'd like to simplify this code into one line of code (just to be neat, there a... | Personally, I think it's bad practice to chain method calls that have actual sideffects on the object instance. To be honest, I think both examples are quite ugly "hacks" whose only purpose is saving two lines of code. I don't think the result is actually more readable either. If you want a record to be loaded immediat... | Best practice for method chaining ("return this") I have an abstract class called DatabaseRow that, after being derived and constructed, is mainly loaded from a Load(object id) method. I have lots of code that creates a new instance of the class, loads it from an ID, then returns the class. I'd like to simplify this co... | TITLE:
Best practice for method chaining ("return this")
QUESTION:
I have an abstract class called DatabaseRow that, after being derived and constructed, is mainly loaded from a Load(object id) method. I have lots of code that creates a new instance of the class, loads it from an ID, then returns the class. I'd like t... | [
"c#",
".net",
"return-value"
] | 8 | 3 | 5,633 | 4 | 0 | 2011-06-01T11:39:15.733000 | 2011-06-01T11:51:11.083000 |
6,200,515 | 6,201,804 | Reducing Parse Calls in Oracle | I am noticing the parse_calls are equal to the number of executions in our Oracle 11g database. select parse_calls, executions from v$sql order by parse_calls desc; Running the above query gives the following result. "PARSE_CALLS" "EXECUTIONS" 87480 87480 87475 87476 87044 87044 26662 26662 21870 21870 21870 21870 As I... | Start with this: SELECT name, SUM(value) FROM v$sesstat s1 join v$statname s2 on s1.statistic# = s2.statistic# WHERE s1.name LIKE '%parse count%' GROUP BY name ORDER BY 1,2; This will give you the number of hard parses and total parses. The parse_calls values in your query is total parses, hard and soft. What does your... | Reducing Parse Calls in Oracle I am noticing the parse_calls are equal to the number of executions in our Oracle 11g database. select parse_calls, executions from v$sql order by parse_calls desc; Running the above query gives the following result. "PARSE_CALLS" "EXECUTIONS" 87480 87480 87475 87476 87044 87044 26662 266... | TITLE:
Reducing Parse Calls in Oracle
QUESTION:
I am noticing the parse_calls are equal to the number of executions in our Oracle 11g database. select parse_calls, executions from v$sql order by parse_calls desc; Running the above query gives the following result. "PARSE_CALLS" "EXECUTIONS" 87480 87480 87475 87476 870... | [
"c#",
"sql",
"performance",
"oracle",
"oracle11g"
] | 7 | 4 | 4,716 | 2 | 0 | 2011-06-01T11:39:34.557000 | 2011-06-01T13:19:53.287000 |
6,200,519 | 6,200,585 | javascript output with double quote in asp.net c# | when i generate text from database using datatables in asp.net c#, i can generate this " " + lbltext.Text + " " output is text but is in not working on webpage, it is noly working when onclick is in Ddouble quote like text how to generate text with double quote in "onclick" from database or any other solution to access... | you need to prefix your strings with @ which makes it a verbatim string, then just use " two times @" " + lbltext.Text + @" " or you escape the " with a \ " " + lbltext.Text + " " here`s some more info about verbatim and regular strings in c# http://msdn.microsoft.com/en-us/library/aa691090(v=vs.71).aspx | javascript output with double quote in asp.net c# when i generate text from database using datatables in asp.net c#, i can generate this " " + lbltext.Text + " " output is text but is in not working on webpage, it is noly working when onclick is in Ddouble quote like text how to generate text with double quote in "oncl... | TITLE:
javascript output with double quote in asp.net c#
QUESTION:
when i generate text from database using datatables in asp.net c#, i can generate this " " + lbltext.Text + " " output is text but is in not working on webpage, it is noly working when onclick is in Ddouble quote like text how to generate text with dou... | [
"c#",
"javascript",
"asp.net"
] | 1 | 1 | 1,750 | 1 | 0 | 2011-06-01T11:39:57.350000 | 2011-06-01T11:46:20.040000 |
6,200,524 | 6,214,519 | java.lang.OutOfMemoryError when saving a huge amount of records | I have a problem with saving a huge amount of records to database using CFWheels. Here is an example: This causes java.lang.OutOfMemoryError Please help me how to solve this problem. | There are a couple fairly inefficient things going on here. First, it's generating 1,000 user objects, which isn't really a good idea to do in a single request in ColdFusion. Second, it's running 1,000 database queries, which isn't really a good idea to do in any programming language. I would stop using model objects f... | java.lang.OutOfMemoryError when saving a huge amount of records I have a problem with saving a huge amount of records to database using CFWheels. Here is an example: This causes java.lang.OutOfMemoryError Please help me how to solve this problem. | TITLE:
java.lang.OutOfMemoryError when saving a huge amount of records
QUESTION:
I have a problem with saving a huge amount of records to database using CFWheels. Here is an example: This causes java.lang.OutOfMemoryError Please help me how to solve this problem.
ANSWER:
There are a couple fairly inefficient things g... | [
"exception",
"coldfusion",
"cfwheels"
] | 3 | 0 | 260 | 3 | 0 | 2011-06-01T11:40:40.603000 | 2011-06-02T12:30:16.840000 |
6,200,533 | 6,200,841 | How to set TextView textStyle such as bold, italic | How to set TextView style (bold or italic) within Java and without using the XML layout? In other words, I need to write android:textStyle with Java. | textView.setTypeface(null, Typeface.BOLD_ITALIC); textView.setTypeface(null, Typeface.BOLD); textView.setTypeface(null, Typeface.ITALIC); textView.setTypeface(null, Typeface.NORMAL); To keep the previous typeface textView.setTypeface(textView.getTypeface(), Typeface.BOLD_ITALIC) | How to set TextView textStyle such as bold, italic How to set TextView style (bold or italic) within Java and without using the XML layout? In other words, I need to write android:textStyle with Java. | TITLE:
How to set TextView textStyle such as bold, italic
QUESTION:
How to set TextView style (bold or italic) within Java and without using the XML layout? In other words, I need to write android:textStyle with Java.
ANSWER:
textView.setTypeface(null, Typeface.BOLD_ITALIC); textView.setTypeface(null, Typeface.BOLD);... | [
"android",
"textview",
"styles"
] | 959 | 2,101 | 584,900 | 30 | 0 | 2011-06-01T11:41:19.843000 | 2011-06-01T12:04:56.777000 |
6,200,535 | 6,200,674 | Render one view inside another in cakephp | i have a comments section that gets called at 3 place in one place along with posts and at other two places solo.(comments only). Now using this as a element makes sense. But my posts are also rendered via a element. Does it makes sense to render a element inside another | Since I knew about the elements I try to use whenever I can. They help you to minimize the code repetition. It's not unusual include elements inside another. In fact, I use the same structure in the elements directory as the views directory to organize them. | Render one view inside another in cakephp i have a comments section that gets called at 3 place in one place along with posts and at other two places solo.(comments only). Now using this as a element makes sense. But my posts are also rendered via a element. Does it makes sense to render a element inside another | TITLE:
Render one view inside another in cakephp
QUESTION:
i have a comments section that gets called at 3 place in one place along with posts and at other two places solo.(comments only). Now using this as a element makes sense. But my posts are also rendered via a element. Does it makes sense to render a element ins... | [
"php",
"cakephp"
] | 1 | 0 | 6,429 | 5 | 0 | 2011-06-01T11:41:20.713000 | 2011-06-01T11:52:49.163000 |
6,200,536 | 6,200,920 | Caliburn.Micro - How to ActivateItem from class other than the Conductor | I've composed the UI of my Caliburn.Micro application such that toolbar buttons have their own View and ViewModel. In the examples I've seen, to activate a new screen, a method in the shell calls Conductor.ActivateItem, passing in the viewmodel instance, however in my case the ToolbarButtonViewModel.Submit() method is ... | You should consider using the EventAggregator. Create a message which the main conductor handles and send it from the tool bar vm. When the message is recieved by the main conductor, activate the screen that it specifies. | Caliburn.Micro - How to ActivateItem from class other than the Conductor I've composed the UI of my Caliburn.Micro application such that toolbar buttons have their own View and ViewModel. In the examples I've seen, to activate a new screen, a method in the shell calls Conductor.ActivateItem, passing in the viewmodel in... | TITLE:
Caliburn.Micro - How to ActivateItem from class other than the Conductor
QUESTION:
I've composed the UI of my Caliburn.Micro application such that toolbar buttons have their own View and ViewModel. In the examples I've seen, to activate a new screen, a method in the shell calls Conductor.ActivateItem, passing i... | [
"c#",
"caliburn.micro"
] | 3 | 14 | 2,599 | 2 | 0 | 2011-06-01T11:41:37.953000 | 2011-06-01T12:12:16.947000 |
6,200,538 | 6,200,744 | text split problem | I have a program which scans trough a textbox1 text and displays all words from textbox1 which are more than n letters long in textbox2. Here's the complete code: Private Function filterWords(ByVal minLenght As Short, ByVal input As String) As List(Of String) Dim strInput() As String = input.Split(" ") Dim strList As N... | That really depends on how you define a word. Your current implementation defines that a space donates the end of a word. You define this by only passing the space to input.Split. If you also want to define that a period (.) ends a word, add it: input.Split("."). If you want to make a word end on a new line, add it: in... | text split problem I have a program which scans trough a textbox1 text and displays all words from textbox1 which are more than n letters long in textbox2. Here's the complete code: Private Function filterWords(ByVal minLenght As Short, ByVal input As String) As List(Of String) Dim strInput() As String = input.Split(" ... | TITLE:
text split problem
QUESTION:
I have a program which scans trough a textbox1 text and displays all words from textbox1 which are more than n letters long in textbox2. Here's the complete code: Private Function filterWords(ByVal minLenght As Short, ByVal input As String) As List(Of String) Dim strInput() As Strin... | [
".net",
"vb.net"
] | 0 | 2 | 100 | 1 | 0 | 2011-06-01T11:42:03.973000 | 2011-06-01T11:58:09.643000 |
6,200,541 | 6,201,344 | Arabic data with jQuery-ajax and Servlets | actually i'm trying to send Arabic data using jQuery ajax to Servlet but when i try to reprint these data on the page it is displayed like Ø¨Ø±ÙØ¬Ø© and this is my jQuery ajax code jQuery.ajax({ url: "/SearchedCoursesGetter", contentType: "application/x-www-form-urlencoded;charset=UTF-8", dataType: "text", data: { 'sea... | Add this to the top of your JSP <%@ page pageEncoding="UTF-8" %> This will implicitly do response.setHeader("Content-Type", "text/html;charset=UTF-8") and response.setCharacterEncoding("UTF-8") on the JSP itself. This way the browser will interpret the document (and thus also all JS on it) as UTF-8. You also need to en... | Arabic data with jQuery-ajax and Servlets actually i'm trying to send Arabic data using jQuery ajax to Servlet but when i try to reprint these data on the page it is displayed like Ø¨Ø±ÙØ¬Ø© and this is my jQuery ajax code jQuery.ajax({ url: "/SearchedCoursesGetter", contentType: "application/x-www-form-urlencoded;char... | TITLE:
Arabic data with jQuery-ajax and Servlets
QUESTION:
actually i'm trying to send Arabic data using jQuery ajax to Servlet but when i try to reprint these data on the page it is displayed like Ø¨Ø±ÙØ¬Ø© and this is my jQuery ajax code jQuery.ajax({ url: "/SearchedCoursesGetter", contentType: "application/x-www-fo... | [
"java",
"jquery",
"jsp",
"servlets",
"character-encoding"
] | 3 | 3 | 2,515 | 1 | 0 | 2011-06-01T11:42:20.103000 | 2011-06-01T12:45:36.893000 |
6,200,546 | 6,210,712 | Assembling a CUDA Project | I have been scanning the site for questions regarding large CUDA projects and I have found some good replies, anyway I have some doubts yet. My program, for now(it is still half-way from being complete), outputs some arrays, that are then input for Thrust library functions. So my main doubt is: 1-Given that I am using ... | There's no need to declare your functions extern "C" in the most recent (post 2.3) versions of CUDA. Besides, those functions are just C functions, they have nothing to do with CUDA. You can have your main function in a.cu file or a.cpp file. If you do the former, it must be compiled by nvcc. If you do the latter, it s... | Assembling a CUDA Project I have been scanning the site for questions regarding large CUDA projects and I have found some good replies, anyway I have some doubts yet. My program, for now(it is still half-way from being complete), outputs some arrays, that are then input for Thrust library functions. So my main doubt is... | TITLE:
Assembling a CUDA Project
QUESTION:
I have been scanning the site for questions regarding large CUDA projects and I have found some good replies, anyway I have some doubts yet. My program, for now(it is still half-way from being complete), outputs some arrays, that are then input for Thrust library functions. S... | [
"cuda",
"extern",
"thrust"
] | 0 | 1 | 440 | 1 | 0 | 2011-06-01T11:42:30.493000 | 2011-06-02T05:16:53.363000 |
6,200,554 | 6,200,809 | Splitting A File On Delimiter | I have a file on a Linux system that is roughly 10GB. It contains 20,000,000 binary records, but each record is separated by an ASCII delimiter "$". I would like to use the split command or some combination thereof to chunk the file into smaller parts. Ideally I would be able to specify that the command should split ev... | The only unorthodox part of the problem seems to be the record separator. I'm sure this is fixable in awk pretty simply - but I happen to hate awk. I would transfer it in the realm of 'normal' problems first: tr '$' '\n' < large_records.txt | split -l 1000 This will by default create xaa, xab, xac... files; look at man... | Splitting A File On Delimiter I have a file on a Linux system that is roughly 10GB. It contains 20,000,000 binary records, but each record is separated by an ASCII delimiter "$". I would like to use the split command or some combination thereof to chunk the file into smaller parts. Ideally I would be able to specify th... | TITLE:
Splitting A File On Delimiter
QUESTION:
I have a file on a Linux system that is roughly 10GB. It contains 20,000,000 binary records, but each record is separated by an ASCII delimiter "$". I would like to use the split command or some combination thereof to chunk the file into smaller parts. Ideally I would be ... | [
"linux",
"awk",
"split"
] | 5 | 5 | 6,227 | 3 | 0 | 2011-06-01T11:43:23.333000 | 2011-06-01T12:02:16.870000 |
6,200,556 | 6,201,467 | Zend: get Url parameter from inside Zend_Form | Zend talk.I need to set an hidden form field as the value of an url parameter. I have: class Form_Custom extends Zend_Form { public function init() { [..] $id = new Zend_Form_Element_Hidden('name'); [..] } } I know that I could pass it (from controller) inside an array of options while instantiating the class.But how c... | class Form_Custom extends Zend_Form { public function init() { //[..] $id = new Zend_Form_Element_Hidden('name'); //[..] $this->fill(); }
public function fill() { $this->name->setValue( Zend_Controller_Front::getInstance()->getRequest()->getParam( 'name', null ) ); } } Using construction above you can populate your fi... | Zend: get Url parameter from inside Zend_Form Zend talk.I need to set an hidden form field as the value of an url parameter. I have: class Form_Custom extends Zend_Form { public function init() { [..] $id = new Zend_Form_Element_Hidden('name'); [..] } } I know that I could pass it (from controller) inside an array of o... | TITLE:
Zend: get Url parameter from inside Zend_Form
QUESTION:
Zend talk.I need to set an hidden form field as the value of an url parameter. I have: class Form_Custom extends Zend_Form { public function init() { [..] $id = new Zend_Form_Element_Hidden('name'); [..] } } I know that I could pass it (from controller) in... | [
"php",
"zend-framework",
"forms",
"url-parameters"
] | 2 | 4 | 5,421 | 3 | 0 | 2011-06-01T11:43:28.810000 | 2011-06-01T12:55:25.040000 |
6,200,557 | 6,205,247 | Retrieving the UUID from Apache Solr after a commit | I am using Solrj to add new documents to a Solr instance. In my document schema the id is a UUID ( solr.UUIDField ). Each time a document is created the id is filled with the unique id, which is exactly what I want. Sometimes it's necessary in my application that I can retrieve this unique id to add it as a field value... | AFAIK you aren't going to ever get a UUID from an add or a commit. When you do an add or commit, the update request handler gives you back query time and status, but not much else (assuming it is successful). You can actually see what is in the HTTP response by running a manual add/commit like so: http://localhost:8983... | Retrieving the UUID from Apache Solr after a commit I am using Solrj to add new documents to a Solr instance. In my document schema the id is a UUID ( solr.UUIDField ). Each time a document is created the id is filled with the unique id, which is exactly what I want. Sometimes it's necessary in my application that I ca... | TITLE:
Retrieving the UUID from Apache Solr after a commit
QUESTION:
I am using Solrj to add new documents to a Solr instance. In my document schema the id is a UUID ( solr.UUIDField ). Each time a document is created the id is filled with the unique id, which is exactly what I want. Sometimes it's necessary in my app... | [
"java",
"solr",
"uuid",
"solrj"
] | 3 | 4 | 2,086 | 1 | 0 | 2011-06-01T11:43:34.583000 | 2011-06-01T17:25:41.993000 |
6,200,558 | 6,202,371 | How to change network mode programmatically in Qt | I'm creating an application with Qt for the Symbian platform. There is a signal in QSystemNetworkInfo that notifies when the network mode has been changed. Is there any way to programmatically change the network mode? Best regards | I don't think it is possible to change the mode programmatically, because it is specified by the network you're operating in. If you're operating in a wireless local area network, exactly that will be the network mode. May I ask why you would change the network mode explicitly? | How to change network mode programmatically in Qt I'm creating an application with Qt for the Symbian platform. There is a signal in QSystemNetworkInfo that notifies when the network mode has been changed. Is there any way to programmatically change the network mode? Best regards | TITLE:
How to change network mode programmatically in Qt
QUESTION:
I'm creating an application with Qt for the Symbian platform. There is a signal in QSystemNetworkInfo that notifies when the network mode has been changed. Is there any way to programmatically change the network mode? Best regards
ANSWER:
I don't thin... | [
"qt",
"networking",
"symbian",
"qt-mobility"
] | 1 | 1 | 479 | 2 | 0 | 2011-06-01T11:43:40.870000 | 2011-06-01T13:57:49.650000 |
6,200,560 | 6,201,022 | Why non-English string is recognized in view but not in helper in Rails 3? | Why this: <%= foo("Русский") %> works in view, but this: foo("Русский") doesn't work in helper? Error: syntax error, unexpected $end, expecting ')' File's encoding is UTF-8. | Try to add this line (must be first line) in your helper file: # coding: utf-8 | Why non-English string is recognized in view but not in helper in Rails 3? Why this: <%= foo("Русский") %> works in view, but this: foo("Русский") doesn't work in helper? Error: syntax error, unexpected $end, expecting ')' File's encoding is UTF-8. | TITLE:
Why non-English string is recognized in view but not in helper in Rails 3?
QUESTION:
Why this: <%= foo("Русский") %> works in view, but this: foo("Русский") doesn't work in helper? Error: syntax error, unexpected $end, expecting ')' File's encoding is UTF-8.
ANSWER:
Try to add this line (must be first line) in... | [
"ruby-on-rails",
"ruby-on-rails-3",
"ruby-1.9.2"
] | 2 | 6 | 57 | 1 | 0 | 2011-06-01T11:43:56.983000 | 2011-06-01T12:20:06.137000 |
6,200,573 | 6,200,636 | File upload control error-Access denied used by another person | when upload the same file for the multiple times i am getting this error...... "The process cannot access the file 'd:\MarketingSystem\ExcelImport\Sample.xls' because it is being used by another process." getting error in this line RevenueDumpFileUpload.PostedFile.SaveAs(Server.MapPath(strFilePathOnServer) + RevenueDum... | You forget to pass the File Name and File Extension when you are trying to delete the file. if (System.IO.File.Exists(Server.MapPath(strFilePathOnServer) + strPostedFileName+ System.IO.Path.GetExtension(RevenueDumpFileUpload.FileName))) { System.IO.File.Delete(Server.MapPath(strFilePathOnServer) + strPostedFileName + S... | File upload control error-Access denied used by another person when upload the same file for the multiple times i am getting this error...... "The process cannot access the file 'd:\MarketingSystem\ExcelImport\Sample.xls' because it is being used by another process." getting error in this line RevenueDumpFileUpload.Pos... | TITLE:
File upload control error-Access denied used by another person
QUESTION:
when upload the same file for the multiple times i am getting this error...... "The process cannot access the file 'd:\MarketingSystem\ExcelImport\Sample.xls' because it is being used by another process." getting error in this line Revenue... | [
"c#",
"asp.net",
"file-upload"
] | 1 | 0 | 982 | 2 | 0 | 2011-06-01T11:45:09.730000 | 2011-06-01T11:50:13.343000 |
6,200,575 | 6,200,829 | The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine | I am trying to upload a excel file in a asp.net website and process the fields into dataset for further operation. but i am getting a message as above. i have tried with other options of exception - will list those ex.message - The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. ex.Source - A... | The JET engine is installed by default - however, it is 32-bit only. The problem arises when you're running an application in 64-bit mode. I've had the same problem for Desktop applications. As you're creating an ASP.NET application, changing the app pool is the correct way. As sehe said, the ViewState message is unrel... | The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine I am trying to upload a excel file in a asp.net website and process the fields into dataset for further operation. but i am getting a message as above. i have tried with other options of exception - will list those ex.message - The 'Microsoft... | TITLE:
The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine
QUESTION:
I am trying to upload a excel file in a asp.net website and process the fields into dataset for further operation. but i am getting a message as above. i have tried with other options of exception - will list those ex.messag... | [
"c#",
"asp.net",
"windows-server-2008"
] | 0 | 1 | 1,755 | 3 | 0 | 2011-06-01T11:45:32.773000 | 2011-06-01T12:03:37.833000 |
6,200,581 | 6,200,745 | Equation parsing "100-x+200" and evaluating its value in java | The following code should be pretty self-evident. What I have made up so far to compute Y with variable x and some constants: public static void main(String[] args) { int x=50; String str="100-x+200"; str=str.replaceAll("x", Integer.toString(x)); String [] arrComputeNumber = str.split("[-|+]"); String [] arrComputeOper... | You can use BeanShell. It is a Java interpreter. Here is some code: Interpreter interpreter = new Interpreter(); interpreter.eval("x = 50"); interpreter.eval("result = 100 - x + 200"); System.out.println(interpreter.get("result")); | Equation parsing "100-x+200" and evaluating its value in java The following code should be pretty self-evident. What I have made up so far to compute Y with variable x and some constants: public static void main(String[] args) { int x=50; String str="100-x+200"; str=str.replaceAll("x", Integer.toString(x)); String [] a... | TITLE:
Equation parsing "100-x+200" and evaluating its value in java
QUESTION:
The following code should be pretty self-evident. What I have made up so far to compute Y with variable x and some constants: public static void main(String[] args) { int x=50; String str="100-x+200"; str=str.replaceAll("x", Integer.toStrin... | [
"java",
"string",
"parsing",
"evaluation"
] | 1 | 1 | 722 | 1 | 0 | 2011-06-01T11:46:13.300000 | 2011-06-01T11:58:10.570000 |
6,200,587 | 6,218,242 | Integrating ant resource generation targets into a Maven build | I'm currently working on a fairly large project that has been migrated from Ant to Maven. There are no problems with the actual build process (it compiles and packages the source code fine). The problem is that I also have a lot of targets that generate additional resources for the project (compile LessCSS, generate & ... | Generally embedding antrun calls is not ideal, but if you've not found a suitable plugin to do what you need then I wouldn't worry about it. If the processing is fairly simple it is actually quite easy to embed it in a Maven plugin yourself, see this example for help getting started. If you are going with antrun, and t... | Integrating ant resource generation targets into a Maven build I'm currently working on a fairly large project that has been migrated from Ant to Maven. There are no problems with the actual build process (it compiles and packages the source code fine). The problem is that I also have a lot of targets that generate add... | TITLE:
Integrating ant resource generation targets into a Maven build
QUESTION:
I'm currently working on a fairly large project that has been migrated from Ant to Maven. There are no problems with the actual build process (it compiles and packages the source code fine). The problem is that I also have a lot of targets... | [
"maven",
"ant",
"maven-antrun-plugin"
] | 1 | 1 | 1,655 | 1 | 0 | 2011-06-01T11:46:28.463000 | 2011-06-02T17:51:20.690000 |
6,200,593 | 6,201,300 | When to make object nil and when to call release | Today I see code in which user is releasing the object first and then he is making that object nil. like this [objectA release]; objectA=nil; I have read at many books that we should make the object nil while leaving the view and release the object later(in dealloc method of course this method is called after viewWillD... | Setting to nil and releasing are two distinct operations. You release an object to relinquish ownership of it. This is covered in the standard Memory Managemange Guidelines. If you are not familiar with them, you should read them before doing any further iOS programming. After releasing an object, you should set it to ... | When to make object nil and when to call release Today I see code in which user is releasing the object first and then he is making that object nil. like this [objectA release]; objectA=nil; I have read at many books that we should make the object nil while leaving the view and release the object later(in dealloc metho... | TITLE:
When to make object nil and when to call release
QUESTION:
Today I see code in which user is releasing the object first and then he is making that object nil. like this [objectA release]; objectA=nil; I have read at many books that we should make the object nil while leaving the view and release the object late... | [
"ios",
"objective-c",
"cocoa-touch",
"memory-management"
] | 2 | 6 | 1,026 | 6 | 0 | 2011-06-01T11:46:58.550000 | 2011-06-01T12:41:29.007000 |
6,200,595 | 6,200,973 | Return values by Yii db | I have a following return value from Yii framework query, using the methods and classes built in Yii: Array ( [0] => Array ( [id] => 1 [title] => Developer )
[1] => Array ( [id] => 2 [title] => Tester )
) I would like to (using nothing but Yii), rearange this like: Array ( [1] => Developer [2] => Tester
) Meaning, I... | You can use the following method, defined here: CHtml::listData($yourArray, 'id', 'title'); | Return values by Yii db I have a following return value from Yii framework query, using the methods and classes built in Yii: Array ( [0] => Array ( [id] => 1 [title] => Developer )
[1] => Array ( [id] => 2 [title] => Tester )
) I would like to (using nothing but Yii), rearange this like: Array ( [1] => Developer [2]... | TITLE:
Return values by Yii db
QUESTION:
I have a following return value from Yii framework query, using the methods and classes built in Yii: Array ( [0] => Array ( [id] => 1 [title] => Developer )
[1] => Array ( [id] => 2 [title] => Tester )
) I would like to (using nothing but Yii), rearange this like: Array ( [1... | [
"php",
"database",
"arrays",
"yii"
] | 1 | 3 | 292 | 1 | 0 | 2011-06-01T11:47:07.450000 | 2011-06-01T12:16:51.723000 |
6,200,597 | 6,200,648 | SQL statement. need help understanding it | I am findiing it hard to understand what this code is doing. Could someone please help me understand this code line by line so that I can understand what it is doing. CREATE TRIGGER LowCredit ON Order AFTER INSERT AS
DECLARE @creditrating tinyint
SELECT @creditrating = v.CreditRating FROM Customer c INNER JOIN insert... | It is checking to see if the credit rating is a certain value, if its too low is raising an error and rolling back the transaction. --Declare a trigger with name `LowCredit` on table `Order`, --run the trigger after CREATE TRIGGER LowCredit ON Order insert. AFTER INSERT
AS --start definition --declare int DECLARE @cre... | SQL statement. need help understanding it I am findiing it hard to understand what this code is doing. Could someone please help me understand this code line by line so that I can understand what it is doing. CREATE TRIGGER LowCredit ON Order AFTER INSERT AS
DECLARE @creditrating tinyint
SELECT @creditrating = v.Cred... | TITLE:
SQL statement. need help understanding it
QUESTION:
I am findiing it hard to understand what this code is doing. Could someone please help me understand this code line by line so that I can understand what it is doing. CREATE TRIGGER LowCredit ON Order AFTER INSERT AS
DECLARE @creditrating tinyint
SELECT @cre... | [
"sql",
"database"
] | 1 | 2 | 95 | 5 | 0 | 2011-06-01T11:47:13.637000 | 2011-06-01T11:51:09.133000 |
6,200,603 | 6,200,651 | Javascript: explain this one line of code to me please | I have this simple array: var RedirUrl = new Array(4); RedirUrl[0] = 'http://mafi.se/mf_redir/new_install_'+this_version+'.html'; RedirUrl[1] = 'http://ifurls.com/mf_redir/new_install_'+this_version+'.html'; RedirUrl[2] = 'http://ez.se/xml-update/mf_redir/new_install_'+this_version+'.html'; RedirUrl[3] = 'http://ilovre... | It's sorting the list of URLs with a sorting method that randomly returns values that are greater than or less than 0 in about half the cases each. Math.random() returns a number betweeen 0 and 1. Therefore 0.5 - Math.random() is a randomly decided value between -0.5 and 0.5. About half of those values are greater than... | Javascript: explain this one line of code to me please I have this simple array: var RedirUrl = new Array(4); RedirUrl[0] = 'http://mafi.se/mf_redir/new_install_'+this_version+'.html'; RedirUrl[1] = 'http://ifurls.com/mf_redir/new_install_'+this_version+'.html'; RedirUrl[2] = 'http://ez.se/xml-update/mf_redir/new_insta... | TITLE:
Javascript: explain this one line of code to me please
QUESTION:
I have this simple array: var RedirUrl = new Array(4); RedirUrl[0] = 'http://mafi.se/mf_redir/new_install_'+this_version+'.html'; RedirUrl[1] = 'http://ifurls.com/mf_redir/new_install_'+this_version+'.html'; RedirUrl[2] = 'http://ez.se/xml-update/... | [
"javascript"
] | 3 | 7 | 184 | 6 | 0 | 2011-06-01T11:47:47.077000 | 2011-06-01T11:51:24.853000 |
6,200,604 | 6,200,974 | Set OnClickListener for items in ListView with 2 Views | I have a ListView, with items with this layout: So my items have two different sections. I want to be able to setup different onclickListener inside each item(one for each LinearLayout). I have tried so far to override the onListItemClick, but it doesnt seem to work properly: @Override protected void onListItemClick(Li... | You have to use set onclicklistener to all elements inside ListView. I have created a listview. set an adapter to the listview. My adapter is reponsible to show each element of the listview. so inside getView() I will assign onclicklistener to all the elemnts to whom i want to get the click event. Example public View g... | Set OnClickListener for items in ListView with 2 Views I have a ListView, with items with this layout: So my items have two different sections. I want to be able to setup different onclickListener inside each item(one for each LinearLayout). I have tried so far to override the onListItemClick, but it doesnt seem to wor... | TITLE:
Set OnClickListener for items in ListView with 2 Views
QUESTION:
I have a ListView, with items with this layout: So my items have two different sections. I want to be able to setup different onclickListener inside each item(one for each LinearLayout). I have tried so far to override the onListItemClick, but it ... | [
"android",
"listview",
"onclick"
] | 8 | 11 | 24,685 | 3 | 0 | 2011-06-01T11:47:47.433000 | 2011-06-01T12:17:02.830000 |
6,200,610 | 6,200,643 | NSObject to NSString Objective-C | Can someone help me to convert an NSObject to NSString? I'm trying to do something like this - NSString *address = [NSString stringWithFormat:ivpObj.addressStr]; But I got an warning - Format is not a string literal and no format arguments Please some one help | How about this: NSString *address = [NSString stringWithFormat:@"%@", ivpObj.addressStr]; | NSObject to NSString Objective-C Can someone help me to convert an NSObject to NSString? I'm trying to do something like this - NSString *address = [NSString stringWithFormat:ivpObj.addressStr]; But I got an warning - Format is not a string literal and no format arguments Please some one help | TITLE:
NSObject to NSString Objective-C
QUESTION:
Can someone help me to convert an NSObject to NSString? I'm trying to do something like this - NSString *address = [NSString stringWithFormat:ivpObj.addressStr]; But I got an warning - Format is not a string literal and no format arguments Please some one help
ANSWER:... | [
"objective-c",
"nsstring",
"nsobject"
] | 4 | 9 | 16,169 | 4 | 0 | 2011-06-01T11:48:25.740000 | 2011-06-01T11:50:51.683000 |
6,200,628 | 6,208,844 | SSRS Page break on Tablix with Rownumber ,just one row group and no group expression given by default | I have created a report with one tablix and it has one RowGroup (which automatically came) when I dragged and dropped my report fields. [It doesnot have any group by expression defined] Now my requirement is to create page breaks based on the row number. I clicked on the RowGroup properties and give Group on expression... | I haven't done this before but try adding another group outside you current group with this expression. Then set the page break in it. Edit: I just re read you question. I think you expression is incorrect. I think it should be: =Floor((RowNumber(Nothing)-1)/2000) I couldn't understand how you could set that as the gro... | SSRS Page break on Tablix with Rownumber ,just one row group and no group expression given by default I have created a report with one tablix and it has one RowGroup (which automatically came) when I dragged and dropped my report fields. [It doesnot have any group by expression defined] Now my requirement is to create ... | TITLE:
SSRS Page break on Tablix with Rownumber ,just one row group and no group expression given by default
QUESTION:
I have created a report with one tablix and it has one RowGroup (which automatically came) when I dragged and dropped my report fields. [It doesnot have any group by expression defined] Now my require... | [
"reporting-services"
] | 2 | 4 | 11,387 | 1 | 0 | 2011-06-01T11:49:22.430000 | 2011-06-01T23:21:32.383000 |
6,200,632 | 6,207,828 | System Security Exception in Silverlight app making GET request | I am new to silverlight. I have been trying to patch up a silverlight app that makes a get request to some site over the net, say google. However, I keep getting the system.security exception again nd again. I read various other posts and what i gathered is that for these things to work u need to choose HOST APPLICATIO... | You cannot call a web service other than from your own domain directly from a Silverlight application. If you want to to this, you would have to install a cross-domain policy on the server that hosts the service. But you can always install a web service within your own web application (that hosts the Sivlerlight app) a... | System Security Exception in Silverlight app making GET request I am new to silverlight. I have been trying to patch up a silverlight app that makes a get request to some site over the net, say google. However, I keep getting the system.security exception again nd again. I read various other posts and what i gathered i... | TITLE:
System Security Exception in Silverlight app making GET request
QUESTION:
I am new to silverlight. I have been trying to patch up a silverlight app that makes a get request to some site over the net, say google. However, I keep getting the system.security exception again nd again. I read various other posts and... | [
"silverlight",
"securityexception"
] | 1 | 1 | 429 | 1 | 0 | 2011-06-01T11:49:39.227000 | 2011-06-01T21:17:28.180000 |
6,200,635 | 6,207,980 | Removing grey bar above UINavigationController in a UITableView | I am creating a UITableView with a UINavigationController programmatically: - (void) displayView:(int)intNewView{
NSLog(@"%i", intNewView); [currentView.view removeFromSuperview]; [currentView release];
switch (intNewView) {......
case 5: vc = [[RootViewController alloc] init]; currentView = [[UINavigationController... | When the UINavigationController is initialised, it does so expecting the iPhones status bar to be present at the top of the screen. Therefore, the view is essentially moved down a little in order to accommodate this. BUT, as my UINavigationController is inside my RootViewController, the UINavigationController does not ... | Removing grey bar above UINavigationController in a UITableView I am creating a UITableView with a UINavigationController programmatically: - (void) displayView:(int)intNewView{
NSLog(@"%i", intNewView); [currentView.view removeFromSuperview]; [currentView release];
switch (intNewView) {......
case 5: vc = [[RootVie... | TITLE:
Removing grey bar above UINavigationController in a UITableView
QUESTION:
I am creating a UITableView with a UINavigationController programmatically: - (void) displayView:(int)intNewView{
NSLog(@"%i", intNewView); [currentView.view removeFromSuperview]; [currentView release];
switch (intNewView) {......
case... | [
"iphone",
"objective-c",
"ios",
"uitableview",
"uinavigationcontroller"
] | 0 | 1 | 1,590 | 2 | 0 | 2011-06-01T11:50:08.353000 | 2011-06-01T21:32:57.773000 |
6,200,639 | 6,200,699 | How does ajax push work? | In simple terms, how is push achieved through ajax? Is this done through the same object used for conventional ajax requests? | In simple terms, how is push achieved through ajax? The general idea is to always have a request to the server "hanging", so the server can respond to it whenever it wants to "push" something to the client. Is this done through the same object used for conventional ajax requests? It can be, but you can emulate it with ... | How does ajax push work? In simple terms, how is push achieved through ajax? Is this done through the same object used for conventional ajax requests? | TITLE:
How does ajax push work?
QUESTION:
In simple terms, how is push achieved through ajax? Is this done through the same object used for conventional ajax requests?
ANSWER:
In simple terms, how is push achieved through ajax? The general idea is to always have a request to the server "hanging", so the server can re... | [
"ajax",
"push"
] | 7 | 8 | 9,016 | 4 | 0 | 2011-06-01T11:50:26.807000 | 2011-06-01T11:54:39.047000 |
6,200,650 | 6,200,795 | Query gives different output on different OS | I have written the following function in Java. This function returns current timestamp by executing a query. The function code is as follows: private String getTimeStamp(){ String timeStamp=null; try{ String strQuery="select current_timestamp"; PreparedStatement pmtQuery=con.prepareStatement(strQuery); ResultSet rsQuer... | Use this SELECT DATE_FORMAT(CURDATE(), '%d/%m/%Y %hh%mm%ss') Note: I wonder why you are querying to get the currentDate | Query gives different output on different OS I have written the following function in Java. This function returns current timestamp by executing a query. The function code is as follows: private String getTimeStamp(){ String timeStamp=null; try{ String strQuery="select current_timestamp"; PreparedStatement pmtQuery=con... | TITLE:
Query gives different output on different OS
QUESTION:
I have written the following function in Java. This function returns current timestamp by executing a query. The function code is as follows: private String getTimeStamp(){ String timeStamp=null; try{ String strQuery="select current_timestamp"; PreparedStat... | [
"java",
"mysql",
"windows",
"linux"
] | 0 | 2 | 199 | 4 | 0 | 2011-06-01T11:51:20.570000 | 2011-06-01T12:01:26.030000 |
6,200,654 | 6,202,146 | updated listitem attributes aren't commiting changes to sharepoint | i'm uploading a document to sharepoint.. however i would like to provide a custom name rather than it inherit the name of the file which im uploading. my code was based on this solution: http://www.codeproject.com/Articles/103503/How-to-upload-download-a-document-in-SharePoint-20.aspx however this doesnt work. Addition... | You are missing a call to clientContext.Load after you add the file to the Files collection. See these blog posts for more information: https://www.c-sharpcorner.com/code/965/programmatically-upload-document-using-client-object-model-in-sharepoint.aspx https://zimmergren.net/sp-2010-uploading-files-using-the-client-om-... | updated listitem attributes aren't commiting changes to sharepoint i'm uploading a document to sharepoint.. however i would like to provide a custom name rather than it inherit the name of the file which im uploading. my code was based on this solution: http://www.codeproject.com/Articles/103503/How-to-upload-download-... | TITLE:
updated listitem attributes aren't commiting changes to sharepoint
QUESTION:
i'm uploading a document to sharepoint.. however i would like to provide a custom name rather than it inherit the name of the file which im uploading. my code was based on this solution: http://www.codeproject.com/Articles/103503/How-t... | [
"c#",
"sharepoint-2010"
] | 4 | 7 | 3,105 | 3 | 0 | 2011-06-01T11:51:35.100000 | 2011-06-01T13:42:48.280000 |
6,200,658 | 6,200,854 | cannot execute the following sql query because of permission | What level of rights would i need to execute the following query? SELECT S.* FROM sys.dm_exec_requests R INNER JOIN sys.dm_exec_sessions S ON S.session_id = R.blocking_session_id
sys.dm_exec_sessions is a Dynamic Management view i am getting an error saying that it cant start debugger; | According to this very helpful article: These DM Views are secured, since they might show information you'd rather not have available to everyone. Grant the VIEW SERVER STATE permission for server-level and VIEW DATABASE STATE permissions for database-level Dynamic Management Views and Functions. It's usually best to c... | cannot execute the following sql query because of permission What level of rights would i need to execute the following query? SELECT S.* FROM sys.dm_exec_requests R INNER JOIN sys.dm_exec_sessions S ON S.session_id = R.blocking_session_id
sys.dm_exec_sessions is a Dynamic Management view i am getting an error saying ... | TITLE:
cannot execute the following sql query because of permission
QUESTION:
What level of rights would i need to execute the following query? SELECT S.* FROM sys.dm_exec_requests R INNER JOIN sys.dm_exec_sessions S ON S.session_id = R.blocking_session_id
sys.dm_exec_sessions is a Dynamic Management view i am gettin... | [
"sql",
"sql-server"
] | 3 | 4 | 3,228 | 3 | 0 | 2011-06-01T11:51:53.410000 | 2011-06-01T12:06:11.043000 |
6,200,663 | 6,200,819 | Same project but customised and installable alongside each other? | I have a small Android project that I use as a core project. From this core project I want to be able to do customisations. So I have the app in a framework format using standard icons, buttons etc... I want to be able to create different versions with different icons and buttons. This I know how to do. (I will have tw... | You should use Android Libraries. Put all your application code into one Android Library and then create two Android Applications which have custom icons and different package names. The resources defined in final Android Applications will override all already existing resources in Android Library. One drawback: you'll... | Same project but customised and installable alongside each other? I have a small Android project that I use as a core project. From this core project I want to be able to do customisations. So I have the app in a framework format using standard icons, buttons etc... I want to be able to create different versions with d... | TITLE:
Same project but customised and installable alongside each other?
QUESTION:
I have a small Android project that I use as a core project. From this core project I want to be able to do customisations. So I have the app in a framework format using standard icons, buttons etc... I want to be able to create differe... | [
"android",
"xml",
"customising"
] | 1 | 2 | 204 | 2 | 0 | 2011-06-01T11:52:02.363000 | 2011-06-01T12:02:52.637000 |
6,200,667 | 6,200,711 | Initializing arrays of type char | I want to initialize arbitrary large strings. It is null terminated string of characters, but I cannot print its content. Can anybody tell me why? char* b; char c; b = &c *b = 'm'; *(b+1) = 'o'; *(b+2) = 'j'; *(b+3) = 'a'; *(b+4) = '\0'; printf("%s\n", *b); | Your solution invokes undefined behaviour, because *(b+1) etc. are outside the bounds of the stack variable c. So when you write to them, you're writing all over memory that you don't own, which can cause all sorts of corruption. Also, you need to printf("%s\n", b) ( printf expects a pointer for %s ). The solution depe... | Initializing arrays of type char I want to initialize arbitrary large strings. It is null terminated string of characters, but I cannot print its content. Can anybody tell me why? char* b; char c; b = &c *b = 'm'; *(b+1) = 'o'; *(b+2) = 'j'; *(b+3) = 'a'; *(b+4) = '\0'; printf("%s\n", *b); | TITLE:
Initializing arrays of type char
QUESTION:
I want to initialize arbitrary large strings. It is null terminated string of characters, but I cannot print its content. Can anybody tell me why? char* b; char c; b = &c *b = 'm'; *(b+1) = 'o'; *(b+2) = 'j'; *(b+3) = 'a'; *(b+4) = '\0'; printf("%s\n", *b);
ANSWER:
Yo... | [
"c",
"arrays",
"pointers",
"char"
] | 3 | 11 | 33,707 | 8 | 0 | 2011-06-01T11:52:06.403000 | 2011-06-01T11:55:13.353000 |
6,200,681 | 6,201,110 | AS3.0: Acces child's properties of created instance | on my timeline i create a new instance of the class FirstClass with the following code: var firstObject:FirstClass = new FirstClass(); the class looks like this: package { public class FirstClass extends MovieClip { public function FirstClass() { var tempObject:SecondClass = new SecondClass(); tempObject.x = 100; tempO... | You must declare tempObject as a member of FirstClass. You cannot use objects (object references if be exact) between different methods of a class if they aren't members of this class. Corrected code: package { public class FirstClass extends MovieClip { public function FirstClass() { tempObject = new SecondClass(); te... | AS3.0: Acces child's properties of created instance on my timeline i create a new instance of the class FirstClass with the following code: var firstObject:FirstClass = new FirstClass(); the class looks like this: package { public class FirstClass extends MovieClip { public function FirstClass() { var tempObject:Second... | TITLE:
AS3.0: Acces child's properties of created instance
QUESTION:
on my timeline i create a new instance of the class FirstClass with the following code: var firstObject:FirstClass = new FirstClass(); the class looks like this: package { public class FirstClass extends MovieClip { public function FirstClass() { var... | [
"actionscript-3",
"instances"
] | 0 | 2 | 443 | 1 | 0 | 2011-06-01T11:53:30.240000 | 2011-06-01T12:26:08.467000 |
6,200,702 | 6,201,186 | Selenium verify text or link on the web page | If i have to check a 'xyz' text present in header of the web page & the 'xyz' is present in body of the page.on the use of this function.it will return true,which is not correct.. selenium.isTextPresent("xyz"); Same question for link presence check. selenium.isLinkPresent("link=xyz"); Please suggest me what is the best... | You can use XPath to narrow down your search. For e.g. if you have XML like Hello World Google Hello World Google To check if text Hello World is present in the you can use selenium.isElementPresent("//Header/TextNode[.='Hello World']"); OR To check if text Hello World is present in the you can use selenium.isElementPr... | Selenium verify text or link on the web page If i have to check a 'xyz' text present in header of the web page & the 'xyz' is present in body of the page.on the use of this function.it will return true,which is not correct.. selenium.isTextPresent("xyz"); Same question for link presence check. selenium.isLinkPresent("l... | TITLE:
Selenium verify text or link on the web page
QUESTION:
If i have to check a 'xyz' text present in header of the web page & the 'xyz' is present in body of the page.on the use of this function.it will return true,which is not correct.. selenium.isTextPresent("xyz"); Same question for link presence check. seleniu... | [
"selenium",
"selenium-rc"
] | 1 | 4 | 9,697 | 1 | 0 | 2011-06-01T11:54:48.873000 | 2011-06-01T12:32:15.817000 |
6,200,709 | 6,200,838 | Order status and status log | I am developing a backend of e-commerce (online shopping) in PHP / MYSQL. I want to know what the best way dealing with orders status and status tracking/date. When a user placed an order, the order status will be 1 ( tbl_order.status = 1 ) on the tbl_order table. Is this the best way? Here are the numbers of order sta... | Current order status should be stored on the order table as you suggest. But for tracking changes, I would suggest a separate log table, where you would log timestamp, order_id, user_id, old_status, new_status. This way you can retrace full history at any time (as opposed to LastUpdate concept). This concept can be gen... | Order status and status log I am developing a backend of e-commerce (online shopping) in PHP / MYSQL. I want to know what the best way dealing with orders status and status tracking/date. When a user placed an order, the order status will be 1 ( tbl_order.status = 1 ) on the tbl_order table. Is this the best way? Here ... | TITLE:
Order status and status log
QUESTION:
I am developing a backend of e-commerce (online shopping) in PHP / MYSQL. I want to know what the best way dealing with orders status and status tracking/date. When a user placed an order, the order status will be 1 ( tbl_order.status = 1 ) on the tbl_order table. Is this t... | [
"php",
"database",
"database-design",
"e-commerce",
"shopping-cart"
] | 0 | 1 | 3,098 | 2 | 0 | 2011-06-01T11:55:09.053000 | 2011-06-01T12:04:46.677000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.