PostId int64 13 11.8M | PostCreationDate stringlengths 19 19 | OwnerUserId int64 3 1.57M | OwnerCreationDate stringlengths 10 19 | ReputationAtPostCreation int64 -33 210k | OwnerUndeletedAnswerCountAtPostTime int64 0 5.77k | Title stringlengths 10 250 | BodyMarkdown stringlengths 12 30k | Tag1 stringlengths 1 25 ⌀ | Tag2 stringlengths 1 25 ⌀ | Tag3 stringlengths 1 25 ⌀ | Tag4 stringlengths 1 25 ⌀ | Tag5 stringlengths 1 25 ⌀ | PostClosedDate stringlengths 19 19 ⌀ | OpenStatus stringclasses 5 values | unified_texts stringlengths 47 30.1k | OpenStatus_id int64 0 4 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10,635,429 | 05/17/2012 12:05:35 | 1,105,809 | 12/19/2011 11:50:22 | 67 | 8 | How to install Rapache on CentOs5.8? | I am trying to install Rapacke on CentOs,but I am facing some problems. How can I install Rapache on my system? Do i need to install other software? If yes then from where and how? | r | apache2 | rapache | null | null | 05/18/2012 17:21:31 | off topic | How to install Rapache on CentOs5.8?
===
I am trying to install Rapacke on CentOs,but I am facing some problems. How can I install Rapache on my system? Do i need to install other software? If yes then from where and how? | 2 |
8,040,611 | 11/07/2011 18:03:44 | 967,461 | 09/27/2011 15:58:59 | 15 | 5 | Which website you always check out the lastest front-end technology on? | I am a web front-end developer.I focus on the mobile web app.You know in China,there are few of high quality websites about front-end tech.
I want some websites which focus on web front-end.I hope that they can bring me some good news,the lastest frameworks,super skills and any other kind things good for study.
Would you like to give me some websites like that?
Thank you very much. | javascript | css | html5 | web | front-end | 11/07/2011 18:12:53 | not constructive | Which website you always check out the lastest front-end technology on?
===
I am a web front-end developer.I focus on the mobile web app.You know in China,there are few of high quality websites about front-end tech.
I want some websites which focus on web front-end.I hope that they can bring me some good news,the lastest frameworks,super skills and any other kind things good for study.
Would you like to give me some websites like that?
Thank you very much. | 4 |
5,296,726 | 03/14/2011 09:23:29 | 644,518 | 03/04/2011 10:12:32 | 43 | 3 | What should be the architecture/design of a j2ee web application? | How do I architect a j2ee web application which is based on JSP, Struts 2, Spring 3 and hibernate?
What is the best way to design a starting framework for such web application?
The other technologies that will be used extensively in the application are DWR and jQuery. | java | hibernate | spring | java-ee | struts2 | null | open | What should be the architecture/design of a j2ee web application?
===
How do I architect a j2ee web application which is based on JSP, Struts 2, Spring 3 and hibernate?
What is the best way to design a starting framework for such web application?
The other technologies that will be used extensively in the application are DWR and jQuery. | 0 |
6,988,569 | 08/08/2011 21:04:33 | 290,051 | 03/09/2010 22:45:01 | 314 | 3 | PHP User portal | First of all, I am very inexperienced in PHP. I know the very basics and that is pretty much it (so excuse my lack of knowledge on this subject). I make Tumblr themes and would like to add a user portal on my website that lets users make an account and add themes to their "My Themes" which would allow them to keep track of updates, etc. from their own "dashboard." How can I go about building a platform like this? | php | null | null | null | null | 08/08/2011 21:09:09 | too localized | PHP User portal
===
First of all, I am very inexperienced in PHP. I know the very basics and that is pretty much it (so excuse my lack of knowledge on this subject). I make Tumblr themes and would like to add a user portal on my website that lets users make an account and add themes to their "My Themes" which would allow them to keep track of updates, etc. from their own "dashboard." How can I go about building a platform like this? | 3 |
8,393,277 | 12/05/2011 23:15:40 | 127,255 | 06/22/2009 23:49:44 | 1,452 | 49 | What's the best way to selectivly run javacript when using the rails asset pipeline? | The rails asset pipeline has it's issues, but the benefits of concatenating all my JS, minifying it and serving it with far-future expires headers are hard to ignore.
Lots of the JS in my rails app is specific to a single action. For example, we have a complex page for staff to enter customer orders.
pre rails 3.1, I had the action-specific code in a distinct JS file that was only loaded when needed. Now all my JS is served all the time. What's the best way to only run the order-entry JS when it's needed?
Currently I'm checking for the order-entry DOM elements, but that means there'll be lots of unnecessary functions running on DOMready.
Here's a snippet of coffeespcript from the order-entry code, and this pattern is repeated in about 20 files. Is there a better way?
$ ->
window.app.draft = new app.DraftOrder()
@module 'app', ->
class @DraftOrder
constructor: ->
@items = $('table.draft-items tr')
return if @items.size() == 0
@initEvents()
@move_first()
initEvents: ->
# foo
otherMethod: ->
# bar | javascript | ruby-on-rails | coffeescript | null | null | null | open | What's the best way to selectivly run javacript when using the rails asset pipeline?
===
The rails asset pipeline has it's issues, but the benefits of concatenating all my JS, minifying it and serving it with far-future expires headers are hard to ignore.
Lots of the JS in my rails app is specific to a single action. For example, we have a complex page for staff to enter customer orders.
pre rails 3.1, I had the action-specific code in a distinct JS file that was only loaded when needed. Now all my JS is served all the time. What's the best way to only run the order-entry JS when it's needed?
Currently I'm checking for the order-entry DOM elements, but that means there'll be lots of unnecessary functions running on DOMready.
Here's a snippet of coffeespcript from the order-entry code, and this pattern is repeated in about 20 files. Is there a better way?
$ ->
window.app.draft = new app.DraftOrder()
@module 'app', ->
class @DraftOrder
constructor: ->
@items = $('table.draft-items tr')
return if @items.size() == 0
@initEvents()
@move_first()
initEvents: ->
# foo
otherMethod: ->
# bar | 0 |
8,559,086 | 12/19/2011 09:08:28 | 891,076 | 08/12/2011 03:26:26 | 6 | 1 | Window-based clients to Fedora Directory Services | Is there any way to have user login in window-based client machines to authenticate with Fedora Directory Services? | active-directory | null | null | null | null | 12/19/2011 13:36:26 | off topic | Window-based clients to Fedora Directory Services
===
Is there any way to have user login in window-based client machines to authenticate with Fedora Directory Services? | 2 |
1,243,126 | 08/07/2009 05:58:29 | 116,483 | 06/03/2009 09:27:07 | 48 | 0 | how do you deal with people who poke into developers works? | This questions is not meant to be subjective or argumentative..
My question today is how do you deal with people who poke into developers works.
I mean a developers comes up a technical solution for a problem and the the so called tech lead comes in gives his expert opinion on the matter without even understanding the technology.
How do you as a developer deal with such tech leads?
| developer | null | null | null | null | 02/03/2012 14:52:14 | not constructive | how do you deal with people who poke into developers works?
===
This questions is not meant to be subjective or argumentative..
My question today is how do you deal with people who poke into developers works.
I mean a developers comes up a technical solution for a problem and the the so called tech lead comes in gives his expert opinion on the matter without even understanding the technology.
How do you as a developer deal with such tech leads?
| 4 |
5,419,377 | 03/24/2011 12:49:36 | 650,492 | 03/08/2011 20:53:44 | 76 | 15 | IsNumeric does not work in SQL server | Getting very annoyed with this simple query...
I need to add an offset to a varchar, if it's a number and do nothing is it is not.
For this reason I've created the following function in SQL-server.
I then extract the answer with:
<code>select dbo.OffsetKPL("100",200)</code>
However this does not work, I get the error
> Msg 207, Level 16, State 1, Line 1
Invalid column name '100'.
The code for the function is as follows...
ALTER FUNCTION [dbo].[OffsetKPL](
@kpl varchar(20)
,@offset int = 0
)
RETURNS varchar(20)
AS
BEGIN
DECLARE @uitkomst varchar(20);
set @uitkomst = @kpl;
if not(@offset = 0) begin
if (IsNumeric(@uitkomst) = 1) begin
set @uitkomst = cast((cast(@kpl as int) + @offset) as varchar);
end;
end;
RETURN @uitkomst;
END
What's wrong? nowhere does it state that IsNumeric does not accept a variable. | sql-server | stored-procedures | isnumeric | null | null | null | open | IsNumeric does not work in SQL server
===
Getting very annoyed with this simple query...
I need to add an offset to a varchar, if it's a number and do nothing is it is not.
For this reason I've created the following function in SQL-server.
I then extract the answer with:
<code>select dbo.OffsetKPL("100",200)</code>
However this does not work, I get the error
> Msg 207, Level 16, State 1, Line 1
Invalid column name '100'.
The code for the function is as follows...
ALTER FUNCTION [dbo].[OffsetKPL](
@kpl varchar(20)
,@offset int = 0
)
RETURNS varchar(20)
AS
BEGIN
DECLARE @uitkomst varchar(20);
set @uitkomst = @kpl;
if not(@offset = 0) begin
if (IsNumeric(@uitkomst) = 1) begin
set @uitkomst = cast((cast(@kpl as int) + @offset) as varchar);
end;
end;
RETURN @uitkomst;
END
What's wrong? nowhere does it state that IsNumeric does not accept a variable. | 0 |
10,939,660 | 06/07/2012 20:49:24 | 1,112,656 | 12/22/2011 23:49:32 | 50 | 1 | How to upload a one terabyte file to Amazon S3 via webapp? | I would like to know how to upload large files to amazon S3 (> 1 terabyte)
Ideally the web-app upload mechanism should have:
1. Real time progress bar
2. Upload Speed stats
3. Pause / Resume Support
4. Upload directly from computer to amazon S3
5. Memory efficient, so that the large file can be sent via the web browser.
I have tried *Uploadify S3* via *Django*. Although it looks like it can not handle large files very well.
Does anyone know about an existing demo app on Github or documentation using any of the following languages?
- Rails
- Django
- PHP
- Java
Recently, also I have goggled about the **Knox S3 library** and *nodejs*, although I haven't found a demo app for uploading.
Thanks in advance! | node.js | file-upload | amazon-s3 | amazon-web-services | knox | null | open | How to upload a one terabyte file to Amazon S3 via webapp?
===
I would like to know how to upload large files to amazon S3 (> 1 terabyte)
Ideally the web-app upload mechanism should have:
1. Real time progress bar
2. Upload Speed stats
3. Pause / Resume Support
4. Upload directly from computer to amazon S3
5. Memory efficient, so that the large file can be sent via the web browser.
I have tried *Uploadify S3* via *Django*. Although it looks like it can not handle large files very well.
Does anyone know about an existing demo app on Github or documentation using any of the following languages?
- Rails
- Django
- PHP
- Java
Recently, also I have goggled about the **Knox S3 library** and *nodejs*, although I haven't found a demo app for uploading.
Thanks in advance! | 0 |
3,162,528 | 07/02/2010 00:16:05 | 220,898 | 11/29/2009 16:41:25 | 63 | 4 | Do g++ thread-local variables follow default initialization rules? | Using g++ to declare function-static thread-local storage:
void f() {
static __thread somePodStruct thing;
...
}
can I assume that `thing` will get zero-initialized?
| c++ | gcc | multithreading | static | initialization | null | open | Do g++ thread-local variables follow default initialization rules?
===
Using g++ to declare function-static thread-local storage:
void f() {
static __thread somePodStruct thing;
...
}
can I assume that `thing` will get zero-initialized?
| 0 |
3,848,824 | 10/03/2010 06:22:38 | 224,988 | 12/04/2009 18:31:03 | 1,452 | 77 | iOS OpenGL ES compatible with Adnroid OpenGL ES? | In theory, can I write a game for iOS in openGL ES and expect to easily port it to Android? How about from Android to iOS? | android | opengl-es | cross-platform | ios | compatibility | null | open | iOS OpenGL ES compatible with Adnroid OpenGL ES?
===
In theory, can I write a game for iOS in openGL ES and expect to easily port it to Android? How about from Android to iOS? | 0 |
9,931,993 | 03/29/2012 19:19:10 | 1,294,968 | 03/27/2012 08:25:44 | 11 | 0 | Passing an Object from an Activity to a Fragment | I have an Activity which uses a Fragment. I simply want to pass an object from this activity to the Fragment.
How could I do ? All the tutorials I've seen so far where retrieving data from resources.
Thanks for your help :) | android | null | null | null | null | null | open | Passing an Object from an Activity to a Fragment
===
I have an Activity which uses a Fragment. I simply want to pass an object from this activity to the Fragment.
How could I do ? All the tutorials I've seen so far where retrieving data from resources.
Thanks for your help :) | 0 |
9,742,039 | 03/16/2012 17:44:05 | 1,217,946 | 02/18/2012 10:37:18 | 31 | 2 | A* Pathfinding - Java, Slick2D Library | So I use Slick2D and I am making a game. It has a TiledMap and entities (as any other game) and I want a way to use A*. I don't really know how to use it because I can't find an explanation.
Just for those who don't use Slick, it already has AStarPathFinding and TiledMap classes which I use. | java | path-finding | a-star | slick2d | null | null | open | A* Pathfinding - Java, Slick2D Library
===
So I use Slick2D and I am making a game. It has a TiledMap and entities (as any other game) and I want a way to use A*. I don't really know how to use it because I can't find an explanation.
Just for those who don't use Slick, it already has AStarPathFinding and TiledMap classes which I use. | 0 |
7,193,292 | 08/25/2011 15:43:33 | 236,860 | 12/22/2009 13:05:32 | 84 | 3 | What Order should I Call @@ROWCOUNT/@@ERROR | I am inserting a number or rows into a table using INSERT with SELECT.
After the transaction, I want to store both the @@ROWCOUNT and @@ERROR values into locallay declared variables.
INSERT SubscriberList (PublicationId, SubscriberId)
SELECT @PublicationId, S.SubscriberId
FROM Subscribers S
SET @NoRows = @@ROWCOUNT
SET @ErrorCode = @@ERROR
I wasn't sure if this was valid in as much if I call one, will I negate the other? | sql | tsql | null | null | null | null | open | What Order should I Call @@ROWCOUNT/@@ERROR
===
I am inserting a number or rows into a table using INSERT with SELECT.
After the transaction, I want to store both the @@ROWCOUNT and @@ERROR values into locallay declared variables.
INSERT SubscriberList (PublicationId, SubscriberId)
SELECT @PublicationId, S.SubscriberId
FROM Subscribers S
SET @NoRows = @@ROWCOUNT
SET @ErrorCode = @@ERROR
I wasn't sure if this was valid in as much if I call one, will I negate the other? | 0 |
8,747,417 | 01/05/2012 18:04:15 | 202,089 | 11/03/2009 21:19:13 | 50 | 2 | Suggestions for search methodology requested | I am throwing this question out to the 'greater creativity' for some suggestions on search methodology that might solve this problem. I have come up with a somewhat contrived example to attempt to explain the problem well enough that some solution(s) might be recommended.
The problem:
We are using a relational DB (MSSQL) and need to search across products with the following constraints:
- Availability
- Market
- Price
We also need to group and sort on
- price
- market
- larger entity roll-up
Let me see if I can explain using semi-real world entities:
Think of an application that allows users to search for hotel rooms that they can book. The following criteria might be available for the search:
- Days that the rooms would be booked for
- The market in which they want a hotel room (NYC, Boston, etc.)
- Amenities that the hotel room(s) might have (hot tub, fireplace
- Number of beds
- Suite or not
In all cases, the search criteria above may or may not be selected. So, a very broad search is possible (on these dates, don't care which market) or varying levels of specificity (in NYC, 2 beds, with fireplace).
To add complexity, we also need to return the prices of the hotel rooms for the selected criteria. Obviously, special pricing, different prices for the different days of the stay (one price on Thursday night and a different price on Friday and Saturday nights for a weekend stay).
Some of the things we've played around with are:
- Solr
- Endeca
- SQL querying
- Implementing in C# code and optimizing when/where necessary (think Decorator Pattern)
What I'm looking for here is some suggestions from the community on
- Which of the above is NOT suited for this problem
- Which might be well suited for this problem
- Which other technology might work better that we haven't thought about
- Techniques that others have used on similar problems that worked well (non-technology specific)
Thank you in advance for any idea or suggestions you may have. I am going to attempt to apply appropriate tags to this question, but am open and can add/remove to help get the right brains on it. | c# | sql | search | solr | endeca | 01/06/2012 19:48:52 | off topic | Suggestions for search methodology requested
===
I am throwing this question out to the 'greater creativity' for some suggestions on search methodology that might solve this problem. I have come up with a somewhat contrived example to attempt to explain the problem well enough that some solution(s) might be recommended.
The problem:
We are using a relational DB (MSSQL) and need to search across products with the following constraints:
- Availability
- Market
- Price
We also need to group and sort on
- price
- market
- larger entity roll-up
Let me see if I can explain using semi-real world entities:
Think of an application that allows users to search for hotel rooms that they can book. The following criteria might be available for the search:
- Days that the rooms would be booked for
- The market in which they want a hotel room (NYC, Boston, etc.)
- Amenities that the hotel room(s) might have (hot tub, fireplace
- Number of beds
- Suite or not
In all cases, the search criteria above may or may not be selected. So, a very broad search is possible (on these dates, don't care which market) or varying levels of specificity (in NYC, 2 beds, with fireplace).
To add complexity, we also need to return the prices of the hotel rooms for the selected criteria. Obviously, special pricing, different prices for the different days of the stay (one price on Thursday night and a different price on Friday and Saturday nights for a weekend stay).
Some of the things we've played around with are:
- Solr
- Endeca
- SQL querying
- Implementing in C# code and optimizing when/where necessary (think Decorator Pattern)
What I'm looking for here is some suggestions from the community on
- Which of the above is NOT suited for this problem
- Which might be well suited for this problem
- Which other technology might work better that we haven't thought about
- Techniques that others have used on similar problems that worked well (non-technology specific)
Thank you in advance for any idea or suggestions you may have. I am going to attempt to apply appropriate tags to this question, but am open and can add/remove to help get the right brains on it. | 2 |
1,111,577 | 07/10/2009 19:41:58 | 119,910 | 06/09/2009 15:18:14 | 203 | 33 | How to get next IP in range from Excel | I know there has to be a way:
I need help getting any hot excel module/trick/script/macro that would look at a range of IPs and give me the next address up?
e.g.
(192.168.1.128) --> (192.168.1.129)
Not sure i need sub nets, but will throw it out there as well.
( 192.168.1.255) --> ( 192.168.2.1)
I bet is has to be done with vbscript and quick and dirty tutorials on how to implement this would be stellar
Thanks in advance~ | excel | macros | vbscript | networking | null | null | open | How to get next IP in range from Excel
===
I know there has to be a way:
I need help getting any hot excel module/trick/script/macro that would look at a range of IPs and give me the next address up?
e.g.
(192.168.1.128) --> (192.168.1.129)
Not sure i need sub nets, but will throw it out there as well.
( 192.168.1.255) --> ( 192.168.2.1)
I bet is has to be done with vbscript and quick and dirty tutorials on how to implement this would be stellar
Thanks in advance~ | 0 |
11,468,786 | 07/13/2012 10:34:05 | 1,523,264 | 07/13/2012 10:19:01 | 1 | 0 | How to access wcf service through server in windows application? | I am not able to access wcf service through proxy server in windows application. can any one help me out ? | .net | wcf | null | null | null | 07/13/2012 19:10:32 | not a real question | How to access wcf service through server in windows application?
===
I am not able to access wcf service through proxy server in windows application. can any one help me out ? | 1 |
9,944,830 | 03/30/2012 14:23:13 | 1,269,636 | 03/14/2012 17:03:57 | 641 | 34 | tsql - seperate a text bloc by new lines | I need to seperate a `TEXT` value by new lines character and then loop on each line.
In other words, I need an `explode()` function, but for T-SQL, and I need to to loop on each line.
Is there a quick way to do this in T-SQL ? | sql-server | tsql | triggers | null | null | null | open | tsql - seperate a text bloc by new lines
===
I need to seperate a `TEXT` value by new lines character and then loop on each line.
In other words, I need an `explode()` function, but for T-SQL, and I need to to loop on each line.
Is there a quick way to do this in T-SQL ? | 0 |
11,121,870 | 06/20/2012 14:31:42 | 860,515 | 07/24/2011 19:01:51 | 75 | 0 | jquery mobile image width causes delayed loading of image | I'm using jquery 1.7.1 and jquery-mobile 1.1.0.
I have a simple page:
<div data-role="page" id="page-start">
<img src="src/images/header-img.png" style="max-width:100%;" />
<div data-role="content">
<p>
Welcome to the test page<br/>
now some test input fields:
</p>
<div data-role="fieldcontain">
<label for="name">Text Input:</label>
<input type="text" name="name" id="name" value=""/>
</div>
<div data-role="fieldcontain">
<label for="name2">Text Input:</label>
<input type="text" name="name2" id="name2" value=""/>
</div>
</div>
</div>
Now my Problem is, the page is already displayed, but the image (origin width: 770px) is displayed with a delay of 2-3 seconds. Without the "max-width" or simple "width" style attribute it's displayed directly (but with a width of 770px).
How can I solve that the image is already loaded when the page is shown?
What I also tried is to hide the "#page-start" (with style="display:none" initially) and performed on javascript:
$(document).bind('pageinit', function() {
$("#page-start").show();
});
but it didn't solve my problem, the page is displayed directly and the image takes 2,3,4 seconds until it's shown up and the page jumps down a bit (exatly the image height).
Thanks in advance.
Cheers,
Marco | jquery | image | jquery-mobile | null | null | null | open | jquery mobile image width causes delayed loading of image
===
I'm using jquery 1.7.1 and jquery-mobile 1.1.0.
I have a simple page:
<div data-role="page" id="page-start">
<img src="src/images/header-img.png" style="max-width:100%;" />
<div data-role="content">
<p>
Welcome to the test page<br/>
now some test input fields:
</p>
<div data-role="fieldcontain">
<label for="name">Text Input:</label>
<input type="text" name="name" id="name" value=""/>
</div>
<div data-role="fieldcontain">
<label for="name2">Text Input:</label>
<input type="text" name="name2" id="name2" value=""/>
</div>
</div>
</div>
Now my Problem is, the page is already displayed, but the image (origin width: 770px) is displayed with a delay of 2-3 seconds. Without the "max-width" or simple "width" style attribute it's displayed directly (but with a width of 770px).
How can I solve that the image is already loaded when the page is shown?
What I also tried is to hide the "#page-start" (with style="display:none" initially) and performed on javascript:
$(document).bind('pageinit', function() {
$("#page-start").show();
});
but it didn't solve my problem, the page is displayed directly and the image takes 2,3,4 seconds until it's shown up and the page jumps down a bit (exatly the image height).
Thanks in advance.
Cheers,
Marco | 0 |
5,299,508 | 03/14/2011 13:53:30 | 344,337 | 05/18/2010 18:08:12 | 13 | 3 | WCF - Using <serviceHostingEnvironment aspNetCompatibilityEnabled="true" /> but HttpContext is still null | I've also remembered to include
AspNetCompatibilityRequirements( RequirementsMode = AspNetCompatibilityRequirementsMode.Required )] on my service.
As far as I can tell these are the only two things that need to be set but nobody on the WCF forums seem to be able to help. I am running in IIS7. Is there something else I could be missing?? | wcf | null | null | null | null | null | open | WCF - Using <serviceHostingEnvironment aspNetCompatibilityEnabled="true" /> but HttpContext is still null
===
I've also remembered to include
AspNetCompatibilityRequirements( RequirementsMode = AspNetCompatibilityRequirementsMode.Required )] on my service.
As far as I can tell these are the only two things that need to be set but nobody on the WCF forums seem to be able to help. I am running in IIS7. Is there something else I could be missing?? | 0 |
6,909,373 | 08/02/2011 08:44:20 | 841,099 | 07/12/2011 16:00:59 | 1 | 0 | Control flash system from a c++ program | I'm currently building a c++ program (with Qt) to take picture from a camera device. This part is actualy done, now I need to control 8 flashs divided in two groups in an automatic way.
The flash I already use are from ELINCHROM [http://www.elinchrom.com/][1] and this [device][2] seems to be perfect for what I need but I could not find anywhere a way to control it from a different application than the one elinchrom propose.
Do you know if what I intend to do is even possible? If a solution exist with another brand I will also take it.
Thank you in advance for any replies, and please excuse my english.
[1]: http://www.elinchrom.com/
[2]: http://www.elinchrom.com/product/EL-Skyport-USB-RX-SPEED.html#content | c++ | qt | photo | photography | null | null | open | Control flash system from a c++ program
===
I'm currently building a c++ program (with Qt) to take picture from a camera device. This part is actualy done, now I need to control 8 flashs divided in two groups in an automatic way.
The flash I already use are from ELINCHROM [http://www.elinchrom.com/][1] and this [device][2] seems to be perfect for what I need but I could not find anywhere a way to control it from a different application than the one elinchrom propose.
Do you know if what I intend to do is even possible? If a solution exist with another brand I will also take it.
Thank you in advance for any replies, and please excuse my english.
[1]: http://www.elinchrom.com/
[2]: http://www.elinchrom.com/product/EL-Skyport-USB-RX-SPEED.html#content | 0 |
3,299,985 | 07/21/2010 13:55:34 | 397,987 | 07/21/2010 13:09:39 | 1 | 0 | Idea for final year project | i hv an idea of making a website using PHP and MYSQL which will maintain a list of all shops and services like plumbers, carpenters, interior decorators etc.(from now on referred to as workers) in an area. Just like ebay sells products, i intend to help the forementioned people (workers) "sell" their services.
I am planning to do this using a website in which the user can put up a notice that he needs people mentioned above for some work. This notice can be forwarded to such people on their mobiles through sms and they can respond if interested. This way a person won't hv to go searching for such people, and these workers would get jobs to do.
I also plan on letting the user's comment on their work, so people would know who the right person is... I also intend to show the shop locations using gmaps.. i am putting in more thought on new features as well.. This can be extended to practically every city in the world...
is this good enough for final year project..
i could use your valuable suggestions and views on this.....
any recommendations for some other topic are most welcome..
| language-agnostic | null | null | null | null | 07/22/2012 02:54:48 | not constructive | Idea for final year project
===
i hv an idea of making a website using PHP and MYSQL which will maintain a list of all shops and services like plumbers, carpenters, interior decorators etc.(from now on referred to as workers) in an area. Just like ebay sells products, i intend to help the forementioned people (workers) "sell" their services.
I am planning to do this using a website in which the user can put up a notice that he needs people mentioned above for some work. This notice can be forwarded to such people on their mobiles through sms and they can respond if interested. This way a person won't hv to go searching for such people, and these workers would get jobs to do.
I also plan on letting the user's comment on their work, so people would know who the right person is... I also intend to show the shop locations using gmaps.. i am putting in more thought on new features as well.. This can be extended to practically every city in the world...
is this good enough for final year project..
i could use your valuable suggestions and views on this.....
any recommendations for some other topic are most welcome..
| 4 |
5,878,618 | 05/04/2011 04:41:36 | 737,322 | 05/04/2011 04:38:03 | 1 | 0 | Prevent files from being deleted and modified VB.NET | How can I orevent files from being deleted or modified and the only one who can delete or modifie them is me?
thanks! | vb.net | visual-studio-2008 | file | delete | null | 05/04/2011 04:46:47 | not a real question | Prevent files from being deleted and modified VB.NET
===
How can I orevent files from being deleted or modified and the only one who can delete or modifie them is me?
thanks! | 1 |
10,277,468 | 04/23/2012 08:52:48 | 848,741 | 04/13/2011 23:25:43 | 6 | 0 | Is there a way to custom ViewConfiguration? | I want to custom the value touchSlop, but do not find a way to do this. Is it possible?
final ViewConfiguration configuration = ViewConfiguration.get(context);
mTouchSlop = configuration.getScaledTouchSlop(); | android | view | configuration | null | null | null | open | Is there a way to custom ViewConfiguration?
===
I want to custom the value touchSlop, but do not find a way to do this. Is it possible?
final ViewConfiguration configuration = ViewConfiguration.get(context);
mTouchSlop = configuration.getScaledTouchSlop(); | 0 |
1,253,753 | 08/10/2009 08:40:56 | 124,192 | 06/10/2009 21:47:38 | 51 | 4 | Controlling partial views re:Contact forms | Ok, so here's where I'm at. I've been studying MVC/OOP, trying to roll my own as an exercise. I think I've finally grepped the purpose of each letter in the MVC acronym - my question here pertains to a design decision.
I've set up an FC of sorts - it takes parameters from the $_GET array and loads the appropriate sub-template into a master template using an include. Each sub-template also performs a similar trick, and loads in a set of partials to allow for complex layout requirements. As I was doing this, I got the sneaking suspicion I hadn't quite grasped everything - the Model wasn't making a significant appearance (although to be fair the 'application' has little in the way of a data layer).
Then I figured I should tackle the contact form, which requires three states/views, submitted with no errors, submitted with errors, and not submitted. I've seen a number of approaches to this problem, and I wanted to get some feedback. What I intend to do is load a controller within that partial that handles the view selection based on the request data.
I looked at application controllers, but the examples I've seen simply loop through a whole bunch of commands, and I figure I only want to execute a command/control per partial, so I'm not sure if this is the right way to go.
So, my question is:
1) what would you recommend?
2) How would you define the component I've described, is it a controller, a command pattern, or a filthy Page Controller?
Caveat: The "application" is nothing more than a basic brochure site, but I wanted to tackle something simple to grasp the concept. | controller | application | view | oop | mvc | null | open | Controlling partial views re:Contact forms
===
Ok, so here's where I'm at. I've been studying MVC/OOP, trying to roll my own as an exercise. I think I've finally grepped the purpose of each letter in the MVC acronym - my question here pertains to a design decision.
I've set up an FC of sorts - it takes parameters from the $_GET array and loads the appropriate sub-template into a master template using an include. Each sub-template also performs a similar trick, and loads in a set of partials to allow for complex layout requirements. As I was doing this, I got the sneaking suspicion I hadn't quite grasped everything - the Model wasn't making a significant appearance (although to be fair the 'application' has little in the way of a data layer).
Then I figured I should tackle the contact form, which requires three states/views, submitted with no errors, submitted with errors, and not submitted. I've seen a number of approaches to this problem, and I wanted to get some feedback. What I intend to do is load a controller within that partial that handles the view selection based on the request data.
I looked at application controllers, but the examples I've seen simply loop through a whole bunch of commands, and I figure I only want to execute a command/control per partial, so I'm not sure if this is the right way to go.
So, my question is:
1) what would you recommend?
2) How would you define the component I've described, is it a controller, a command pattern, or a filthy Page Controller?
Caveat: The "application" is nothing more than a basic brochure site, but I wanted to tackle something simple to grasp the concept. | 0 |
9,952,797 | 03/31/2012 03:30:14 | 1,304,511 | 03/31/2012 03:25:21 | 1 | 0 | Php framwork with easy code and performance ? | I am new to php development and want to choose a single php framework which is **easy to learn** with followings in mind:-
1.fast development
2.less code
3.customization
4.performance of created project. | php | frameworks | web | development | null | 03/31/2012 16:35:34 | not constructive | Php framwork with easy code and performance ?
===
I am new to php development and want to choose a single php framework which is **easy to learn** with followings in mind:-
1.fast development
2.less code
3.customization
4.performance of created project. | 4 |
6,576,763 | 07/04/2011 23:12:08 | 701,854 | 04/11/2011 09:16:32 | 37 | 0 | a good web hosting service for a basic web site | I'm looking for a good web hosting solution provider. I need to host a small business web site that comprises of HTML code & few javascript scripts. There are no especial requirement at all. Its a very basic web site though I need a better but economical service
. | web-hosting | null | null | null | null | 07/05/2011 01:20:32 | off topic | a good web hosting service for a basic web site
===
I'm looking for a good web hosting solution provider. I need to host a small business web site that comprises of HTML code & few javascript scripts. There are no especial requirement at all. Its a very basic web site though I need a better but economical service
. | 2 |
4,433,262 | 12/13/2010 20:36:58 | 109,028 | 05/18/2009 21:26:27 | 118 | 1 | MethodInfo.Invoke requires admin on windows 7?? | So I am loading an assembly at runtime and I also am using generics depending on the assembly type. To get the right type, each DLL is implementing a factory that I expect to be there which instantiates the class with the correct generic type.
Type factoryType = assembly.GetType("MyCompany.ScenarioPlayer.PlayerFactory");
MethodInfo method = factoryType.GetMethod("CreatePlayer", BindingFlags.Public | BindingFlags.Static);
player = (IScenarioPlayer)method.Invoke(null, null);
This code fails on the method.Invoke when I don't have administrative privileges. Is this correct that any calls to MethodInfo.Invoke the way I'm using it requires admin? I stepped down into my DLL's code and it isn't even getting past this call into the Factory. | c# | windows-7 | invoke | administration | methodinfo | null | open | MethodInfo.Invoke requires admin on windows 7??
===
So I am loading an assembly at runtime and I also am using generics depending on the assembly type. To get the right type, each DLL is implementing a factory that I expect to be there which instantiates the class with the correct generic type.
Type factoryType = assembly.GetType("MyCompany.ScenarioPlayer.PlayerFactory");
MethodInfo method = factoryType.GetMethod("CreatePlayer", BindingFlags.Public | BindingFlags.Static);
player = (IScenarioPlayer)method.Invoke(null, null);
This code fails on the method.Invoke when I don't have administrative privileges. Is this correct that any calls to MethodInfo.Invoke the way I'm using it requires admin? I stepped down into my DLL's code and it isn't even getting past this call into the Factory. | 0 |
6,505,575 | 06/28/2011 11:18:00 | 809,455 | 06/22/2011 00:08:38 | 67 | 1 | Inner class instantiation | An inner class is said to be a member of the outer class. Does that mean that whenever an object of the outer class is created, an instance of inner class is also created implicitly? | java | inner-classes | null | null | null | null | open | Inner class instantiation
===
An inner class is said to be a member of the outer class. Does that mean that whenever an object of the outer class is created, an instance of inner class is also created implicitly? | 0 |
10,915,694 | 06/06/2012 13:56:26 | 973,753 | 09/30/2011 19:52:37 | 1 | 0 | How to blend colors in CAShapeLayer? | I want to develop an iOS app, which could draw lines and if any of the lines collide blend their colors to each other like in the following link:
http://www.youtube.com/watch?v=FBjlE3oTSyQ
Any ideas? | iphone | objective-c | ios | line | cashapelayer | 06/08/2012 06:49:59 | not a real question | How to blend colors in CAShapeLayer?
===
I want to develop an iOS app, which could draw lines and if any of the lines collide blend their colors to each other like in the following link:
http://www.youtube.com/watch?v=FBjlE3oTSyQ
Any ideas? | 1 |
8,602,814 | 12/22/2011 10:54:06 | 227,933 | 12/09/2009 11:50:06 | 70 | 10 | unable to compile program on linux using g++ | I am trying to compile a program called phantomJS on centos 6.1 , i have installed everything correctly but when i try to compile i get following error!
[root@localhost phantomjs]# /usr/lib/qt47/bin/qmake-qt47 && make
cd src/ && make -f Makefile.phantomjs
make[1]: Entering directory `/installs/phantomjs/src'
make[1]: *** No rule to make target `/usr/lib/qt4/mkspecs/linux-g++/qmake.conf', needed by `Makefile.phantomjs'. Stop.
make[1]: Leaving directory `/installs/phantomjs/src'
make: *** [sub-src-phantomjs-pro-make_default-ordered] Error 2
Can somebody tell me what exactly i am missing? And what could be the possible solution!
Thank you | linux | unix | compilation | script | g++ | 12/23/2011 21:29:26 | too localized | unable to compile program on linux using g++
===
I am trying to compile a program called phantomJS on centos 6.1 , i have installed everything correctly but when i try to compile i get following error!
[root@localhost phantomjs]# /usr/lib/qt47/bin/qmake-qt47 && make
cd src/ && make -f Makefile.phantomjs
make[1]: Entering directory `/installs/phantomjs/src'
make[1]: *** No rule to make target `/usr/lib/qt4/mkspecs/linux-g++/qmake.conf', needed by `Makefile.phantomjs'. Stop.
make[1]: Leaving directory `/installs/phantomjs/src'
make: *** [sub-src-phantomjs-pro-make_default-ordered] Error 2
Can somebody tell me what exactly i am missing? And what could be the possible solution!
Thank you | 3 |
11,130,866 | 06/21/2012 02:42:25 | 912,446 | 08/25/2011 15:24:20 | 33 | 0 | How would I create this using android xml? | I'm looking to create a title bar like the one in this image where it says "Music" and has the buy now button. Instead of the button I would like to have a drop down box. I'm just wondering if someone can point me in the right direction on how to do this? I've done some research and some playing around with androids xml but I can't seem to find anything that would allow this.
http://aliciapinkard.com/wp-content/uploads/2011/06/list.png | android | xml | layout | null | null | 06/21/2012 14:52:32 | not a real question | How would I create this using android xml?
===
I'm looking to create a title bar like the one in this image where it says "Music" and has the buy now button. Instead of the button I would like to have a drop down box. I'm just wondering if someone can point me in the right direction on how to do this? I've done some research and some playing around with androids xml but I can't seem to find anything that would allow this.
http://aliciapinkard.com/wp-content/uploads/2011/06/list.png | 1 |
5,488,121 | 03/30/2011 15:03:28 | 425,727 | 08/19/2010 20:32:25 | 386 | 3 | implementing interfaces in Java | I wrote a skeleton class that implements the `Queue` interface. When i compile, i get an ErrMsg asking to implement the `add` method from Object class(or does it refer to Object interface? I looked up both in the Java API and none of them even has an add method)
Why do i get this error and does it mean that a non-abstract class which implements a given interface needs to implement all the methods from the implemented class? I would have thought not.
import java.util.* ;
class ArrayQueue implements Queue
{
private Object[] elems ;
private int front, rear, length ;
public static void main(String[] args)
{
System.out.println("Hello World!");
}
public ArrayQueue(int maxLength)
{
length = 0 ;
front = 0 ;
rear = 0 ;
elems = new Object[maxLength] ;
}
public boolean offer(Object o) {}
public Object poll() {}
public Object remove() {}
public Object peek() {}
public Object element() {}
}
compiler message:
> ArrayQueue is not abstract and does
> not override abstract method
> add(java.lang.Object) in
> java.util.Queue
btw, is there an other tag than homework to say that this is done in the context of studying? it's not homework i'm doing but its as close as it gets to what i do: study... | java | homework | interface | null | null | null | open | implementing interfaces in Java
===
I wrote a skeleton class that implements the `Queue` interface. When i compile, i get an ErrMsg asking to implement the `add` method from Object class(or does it refer to Object interface? I looked up both in the Java API and none of them even has an add method)
Why do i get this error and does it mean that a non-abstract class which implements a given interface needs to implement all the methods from the implemented class? I would have thought not.
import java.util.* ;
class ArrayQueue implements Queue
{
private Object[] elems ;
private int front, rear, length ;
public static void main(String[] args)
{
System.out.println("Hello World!");
}
public ArrayQueue(int maxLength)
{
length = 0 ;
front = 0 ;
rear = 0 ;
elems = new Object[maxLength] ;
}
public boolean offer(Object o) {}
public Object poll() {}
public Object remove() {}
public Object peek() {}
public Object element() {}
}
compiler message:
> ArrayQueue is not abstract and does
> not override abstract method
> add(java.lang.Object) in
> java.util.Queue
btw, is there an other tag than homework to say that this is done in the context of studying? it's not homework i'm doing but its as close as it gets to what i do: study... | 0 |
5,983,395 | 05/12/2011 19:27:25 | 702,769 | 04/11/2011 19:14:09 | 277 | 0 | Don't user-defined structs inherit an overloaded == operator? | If reference type doesn't overload an equality operator `==`, then build-in equality operator on `Object` will be used instead. Why isn't the same true for user-defined `structs`:
{
static void Main(string[] args)
{
A a = new A();
A a1 = new A();
bool equal= (a == a1); //error
}
}
struct A{ }
Namely, doesn't `ValueType` ( from which all `structs` derive ) also overload `==` operator?
thanx
| c# | null | null | null | null | null | open | Don't user-defined structs inherit an overloaded == operator?
===
If reference type doesn't overload an equality operator `==`, then build-in equality operator on `Object` will be used instead. Why isn't the same true for user-defined `structs`:
{
static void Main(string[] args)
{
A a = new A();
A a1 = new A();
bool equal= (a == a1); //error
}
}
struct A{ }
Namely, doesn't `ValueType` ( from which all `structs` derive ) also overload `==` operator?
thanx
| 0 |
7,362,158 | 09/09/2011 13:13:34 | 80,869 | 03/21/2009 14:38:18 | 3,605 | 126 | How to use java.net.URI | I've tried to use java.net.URI to manipulate query strings but I failed to even on very simple task like getting the query string from one url and placing it in another.
Do you know how to make this code below work
URI sample = new URI("test?param1=x%3D1");
URI uri2 = new URI(
"http",
"domain",
"/a-path",
sample.getRawQuery(),
sample.getFragment());
Call to `uri2.toASCIIString()` should return: `http://domain/a-path?param1=x%3D1`
but it returns: `http://domain/a-path?param1=x%253D1` (double encoding)
if I use getQuery() instead of getRawQuery() the query string is not encoded at all and the url looks like this: `http://domain/a-path?param1=x=1`
| java | standard-library | null | null | null | null | open | How to use java.net.URI
===
I've tried to use java.net.URI to manipulate query strings but I failed to even on very simple task like getting the query string from one url and placing it in another.
Do you know how to make this code below work
URI sample = new URI("test?param1=x%3D1");
URI uri2 = new URI(
"http",
"domain",
"/a-path",
sample.getRawQuery(),
sample.getFragment());
Call to `uri2.toASCIIString()` should return: `http://domain/a-path?param1=x%3D1`
but it returns: `http://domain/a-path?param1=x%253D1` (double encoding)
if I use getQuery() instead of getRawQuery() the query string is not encoded at all and the url looks like this: `http://domain/a-path?param1=x=1`
| 0 |
4,347,855 | 12/03/2010 16:54:15 | 529,644 | 12/03/2010 16:54:15 | 1 | 0 | Coding Help! Help! | Can someone show me how to change to following code to pull data from RIA service?
public ObservableCollection<CatObj> LoadData()
{
ObservableCollection<CatObj> data = new ObservableCollection<CatObj>();
data.Add(new CatObj()
{
CatAddOn = DateTime.Now,
CatDesc = "John",
CatId = 1,
CmpId = 1
});
return data;
} | c# | null | null | null | null | 12/03/2010 22:26:54 | not a real question | Coding Help! Help!
===
Can someone show me how to change to following code to pull data from RIA service?
public ObservableCollection<CatObj> LoadData()
{
ObservableCollection<CatObj> data = new ObservableCollection<CatObj>();
data.Add(new CatObj()
{
CatAddOn = DateTime.Now,
CatDesc = "John",
CatId = 1,
CmpId = 1
});
return data;
} | 1 |
4,034,133 | 10/27/2010 14:06:24 | 471,607 | 10/10/2010 16:20:50 | 11 | 0 | Good Book for J2EE design Pattern | Looking for some suggestion about a good refrence book for J2EE design pattern.I do have knowledge about some patterns but not that much so looking for a good Refrence material.
any help in this regard will be much helpfull
Thanks
Umesh | java | design-patterns | java-ee | null | null | 10/28/2010 05:46:29 | not constructive | Good Book for J2EE design Pattern
===
Looking for some suggestion about a good refrence book for J2EE design pattern.I do have knowledge about some patterns but not that much so looking for a good Refrence material.
any help in this regard will be much helpfull
Thanks
Umesh | 4 |
9,548,436 | 03/03/2012 17:57:27 | 832,187 | 07/06/2011 18:37:03 | 45 | 3 | Target buttons in an iframe? | I'm doing an Android Web catalog, and for that reason I had to use iframes. I wanted to ask, however, is it possible to click a button in an iframe and make the code work in the main page?
This is the code I have:
function initFastButtons() {
new FastButton(document.getElementById("CloseButton"), runclose);
new FastButton(document.getElementById("OpenButton"), runopen);
};
function runclose() {
$('.full-preview-viewer').hide();
};
function runopen() {
$('.full-preview-viewer').show();
};
And this is what a button in an iframe looks like:
<input id="OpenButton" type="image" src="products/special/product1.png" name="image" width="336" height="593"></input>
Thanks everyone :) | jquery | null | null | null | null | null | open | Target buttons in an iframe?
===
I'm doing an Android Web catalog, and for that reason I had to use iframes. I wanted to ask, however, is it possible to click a button in an iframe and make the code work in the main page?
This is the code I have:
function initFastButtons() {
new FastButton(document.getElementById("CloseButton"), runclose);
new FastButton(document.getElementById("OpenButton"), runopen);
};
function runclose() {
$('.full-preview-viewer').hide();
};
function runopen() {
$('.full-preview-viewer').show();
};
And this is what a button in an iframe looks like:
<input id="OpenButton" type="image" src="products/special/product1.png" name="image" width="336" height="593"></input>
Thanks everyone :) | 0 |
10,775,631 | 05/27/2012 16:48:32 | 791,335 | 06/09/2011 16:24:09 | 387 | 7 | Django csv output in Excel | Hi I have a simple view which returns a csv file of a queryset which is generated from a mysql db using utf-8 encoding:
def export_csv(request):
...
response = HttpResponse(mimetype='text/csv')
response['Content-Disposition'] = 'attachment; filename=search_results.csv'
writer = csv.writer(response, dialect=csv.excel)
for item in query_set:
writer.writerow(smart_str(item))
return response
return render(request, 'search_results.html', context)
This works fine as a CSV file, and can be opened in text editors, LibreOffice etc. without problem.
However, I need to supply a file which can be opened in MS Excel in Windows without errors. If I have strings with latin characters in the queryset such as 'Española' then the output in Excel is 'Española'.
I tried this [blogpost][1] but it didn't help. I also know abut the [xlwt package][2], but I am curious if there is a way of correcting the output, using the CSV method I have at the moment.
Any help much appreciated.
[1]: http://crashcoursing.blogspot.com/
[2]: http://pypi.python.org/pypi/xlwt | django | csv | utf-8 | null | null | null | open | Django csv output in Excel
===
Hi I have a simple view which returns a csv file of a queryset which is generated from a mysql db using utf-8 encoding:
def export_csv(request):
...
response = HttpResponse(mimetype='text/csv')
response['Content-Disposition'] = 'attachment; filename=search_results.csv'
writer = csv.writer(response, dialect=csv.excel)
for item in query_set:
writer.writerow(smart_str(item))
return response
return render(request, 'search_results.html', context)
This works fine as a CSV file, and can be opened in text editors, LibreOffice etc. without problem.
However, I need to supply a file which can be opened in MS Excel in Windows without errors. If I have strings with latin characters in the queryset such as 'Española' then the output in Excel is 'Española'.
I tried this [blogpost][1] but it didn't help. I also know abut the [xlwt package][2], but I am curious if there is a way of correcting the output, using the CSV method I have at the moment.
Any help much appreciated.
[1]: http://crashcoursing.blogspot.com/
[2]: http://pypi.python.org/pypi/xlwt | 0 |
8,767,003 | 01/07/2012 03:04:29 | 388,388 | 07/10/2010 10:12:11 | 3,924 | 208 | How can i make an Image button get selected by default | Hi all i have done a program for a `pop-up` using `Ajax ModalPopupExtender` where i will show a pop-up with two image buttons namely `YES` and `NO`. Now what i would like to have is when the `pop-up ` was opened i would like to make `YES` `Image button` get selected and when ever user press `Enter` on `YES` it should take corresponding action. If the user press `NO` i would like to cancel and close the pop-up..
This is my design
<asp:UpdatePanel ID="updatepnl1" runat="server">
<ContentTemplate>
<asp:GridView runat="server" ID="gvDetails" CssClass="Gridview" DataKeyNames="UserId"
AutoGenerateColumns="false">
<HeaderStyle BackColor="#df5015" />
<Columns>
<asp:TemplateField HeaderStyle-BackColor="#EFF1F1" ItemStyle-HorizontalAlign="Center"
ItemStyle-Height="25" HeaderStyle-Width="50" ItemStyle-Width="50" HeaderStyle-Font-Bold="true">
<ItemTemplate>
<asp:CheckBox ID="chkBoxChild" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="UserName" HeaderText="UserName" />
<asp:BoundField DataField="FirstName" HeaderText="FirstName" />
<asp:BoundField DataField="LastName" HeaderText="LastName" />
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton ID="btnDelete" ImageUrl="~/Images/Delete.png" runat="server" OnClick="btnDelete_Click" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:Label ID="lblresult" runat="server" />
<asp:Button ID="btnShowPopup" runat="server" Style="display: none" />
<ajax:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="btnShowPopup"
PopupControlID="pnlpopup" CancelControlID="btnNo" BackgroundCssClass="modalBackground">
</ajax:ModalPopupExtender>
<asp:Panel ID="pnlpopup" runat="server" BackColor="White" Height="100px" Width="400px"
Style="display: none">
<table width="100%" style="border: Solid 2px #999; width: 100%; height: 100%" cellpadding="0"
cellspacing="0">
<tr style="background-image: url(Images/title.gif)">
<td style="height: 10%; color: Black; padding: 2px; font-size: larger; font-family: Arial"
align="center">
Confirm Box
</td>
<td style="color: White; font-weight: bold; padding: 3px; font-size: larger" align="Right">
<a href="javascript:void(0)" onclick="closepopup()">
<img src="Images/x.png" style="border: 0px" align="right" /></a>
</td>
</tr>
<tr>
<td colspan="2" align="left" style="padding: 5px; font-family: Calibri">
<asp:Label ID="lblUser" runat="server" />
</td>
</tr>
<tr>
<td align="right" style="padding-right: 15px">
<asp:ImageButton ID="btnYes" OnClick="btnYes_Click" runat="server" ImageUrl="~/Images/btnyes.jpg" />
<asp:ImageButton ID="btnNo" runat="server" ImageUrl="~/Images/btnNo.jpg" />
</td>
</tr>
</table>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
![enter image description here][1]
[1]: http://i.stack.imgur.com/GROXb.jpg | c# | asp.net | ajax | null | null | null | open | How can i make an Image button get selected by default
===
Hi all i have done a program for a `pop-up` using `Ajax ModalPopupExtender` where i will show a pop-up with two image buttons namely `YES` and `NO`. Now what i would like to have is when the `pop-up ` was opened i would like to make `YES` `Image button` get selected and when ever user press `Enter` on `YES` it should take corresponding action. If the user press `NO` i would like to cancel and close the pop-up..
This is my design
<asp:UpdatePanel ID="updatepnl1" runat="server">
<ContentTemplate>
<asp:GridView runat="server" ID="gvDetails" CssClass="Gridview" DataKeyNames="UserId"
AutoGenerateColumns="false">
<HeaderStyle BackColor="#df5015" />
<Columns>
<asp:TemplateField HeaderStyle-BackColor="#EFF1F1" ItemStyle-HorizontalAlign="Center"
ItemStyle-Height="25" HeaderStyle-Width="50" ItemStyle-Width="50" HeaderStyle-Font-Bold="true">
<ItemTemplate>
<asp:CheckBox ID="chkBoxChild" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="UserName" HeaderText="UserName" />
<asp:BoundField DataField="FirstName" HeaderText="FirstName" />
<asp:BoundField DataField="LastName" HeaderText="LastName" />
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton ID="btnDelete" ImageUrl="~/Images/Delete.png" runat="server" OnClick="btnDelete_Click" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:Label ID="lblresult" runat="server" />
<asp:Button ID="btnShowPopup" runat="server" Style="display: none" />
<ajax:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="btnShowPopup"
PopupControlID="pnlpopup" CancelControlID="btnNo" BackgroundCssClass="modalBackground">
</ajax:ModalPopupExtender>
<asp:Panel ID="pnlpopup" runat="server" BackColor="White" Height="100px" Width="400px"
Style="display: none">
<table width="100%" style="border: Solid 2px #999; width: 100%; height: 100%" cellpadding="0"
cellspacing="0">
<tr style="background-image: url(Images/title.gif)">
<td style="height: 10%; color: Black; padding: 2px; font-size: larger; font-family: Arial"
align="center">
Confirm Box
</td>
<td style="color: White; font-weight: bold; padding: 3px; font-size: larger" align="Right">
<a href="javascript:void(0)" onclick="closepopup()">
<img src="Images/x.png" style="border: 0px" align="right" /></a>
</td>
</tr>
<tr>
<td colspan="2" align="left" style="padding: 5px; font-family: Calibri">
<asp:Label ID="lblUser" runat="server" />
</td>
</tr>
<tr>
<td align="right" style="padding-right: 15px">
<asp:ImageButton ID="btnYes" OnClick="btnYes_Click" runat="server" ImageUrl="~/Images/btnyes.jpg" />
<asp:ImageButton ID="btnNo" runat="server" ImageUrl="~/Images/btnNo.jpg" />
</td>
</tr>
</table>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
![enter image description here][1]
[1]: http://i.stack.imgur.com/GROXb.jpg | 0 |
9,008,782 | 01/25/2012 19:15:24 | 788,272 | 06/07/2011 21:28:09 | 15 | 3 | Assigning App Logo/Icon to App | I've done this many times before... maybe it's broken?
When I go to my app settings page and click on the logo or icon to edit, the "Upload A Logo" dialogue appears. However, when I select an image and click "open", there's only a "cancel" button to click...?
Am I missing something? I don't remember this even being an issue the last time I did this (maybe two weeks ago)? | facebook | icons | logo | null | null | 01/25/2012 20:08:34 | off topic | Assigning App Logo/Icon to App
===
I've done this many times before... maybe it's broken?
When I go to my app settings page and click on the logo or icon to edit, the "Upload A Logo" dialogue appears. However, when I select an image and click "open", there's only a "cancel" button to click...?
Am I missing something? I don't remember this even being an issue the last time I did this (maybe two weeks ago)? | 2 |
10,994,958 | 06/12/2012 10:38:35 | 1,277,996 | 03/19/2012 06:47:49 | 32 | 0 | converting image to thumbnail in java | I am using spring mvc and java in my application. i need to upload an image, cahnge it to thumbnail and then save it in database(mysql). Please can any one provide the code ? | java | mysql | null | null | null | 06/12/2012 11:08:39 | not a real question | converting image to thumbnail in java
===
I am using spring mvc and java in my application. i need to upload an image, cahnge it to thumbnail and then save it in database(mysql). Please can any one provide the code ? | 1 |
8,405,025 | 12/06/2011 18:40:46 | 803,461 | 06/17/2011 15:00:45 | 133 | 13 | Set Print Area - OpenXML with Excel | Does anybody know how to set print area through OpenXML SDK in Excel? | c# | .net | excel | openxml | null | null | open | Set Print Area - OpenXML with Excel
===
Does anybody know how to set print area through OpenXML SDK in Excel? | 0 |
5,653,383 | 04/13/2011 17:49:15 | 216,190 | 11/21/2009 19:13:45 | 200 | 2 | developing android applications. | hey people.i would like to know how to develop applications for android.
i know nothing about it.and want to start frm the scratch..so tell me what all i need to study/ thanks. | android | null | null | null | null | 04/13/2011 18:36:49 | not a real question | developing android applications.
===
hey people.i would like to know how to develop applications for android.
i know nothing about it.and want to start frm the scratch..so tell me what all i need to study/ thanks. | 1 |
4,266,553 | 11/24/2010 12:05:24 | 212,912 | 11/17/2009 14:16:37 | 122 | 6 | Watermark on a UIImage with automatically with auto contrast? | I want to put a watermark on a UIImageView. I have two watermark images, a black one and a white one. I want to put the black one on the UIImageView when the area of the watermark is bright, and the white one on the UIImageView when the area of the watermark is dark. How to do that?
Any help would be appreciated. | iphone | objective-c | uiimageview | uiimage | watermark | null | open | Watermark on a UIImage with automatically with auto contrast?
===
I want to put a watermark on a UIImageView. I have two watermark images, a black one and a white one. I want to put the black one on the UIImageView when the area of the watermark is bright, and the white one on the UIImageView when the area of the watermark is dark. How to do that?
Any help would be appreciated. | 0 |
6,546,366 | 07/01/2011 09:51:12 | 824,630 | 07/01/2011 09:45:55 | 1 | 0 | Want to develop a servlet container like tomcat | Actually I want to develop a simple servlet container like tomcat. It's purely my learning purpose. It would be very helpful if anyone can help and guide me where to start actually.
Thanks in advance. | java | null | null | null | null | 07/01/2011 10:07:39 | not constructive | Want to develop a servlet container like tomcat
===
Actually I want to develop a simple servlet container like tomcat. It's purely my learning purpose. It would be very helpful if anyone can help and guide me where to start actually.
Thanks in advance. | 4 |
8,208,720 | 11/21/2011 07:50:34 | 351,545 | 05/27/2010 03:03:07 | 64 | 2 | Take too long time to connect to server through ssh if not specify ip in /ect/hosts | My ubuntu 10.10 is in intranet. If i don't specify servers' ip in /etc/hosts, it takes too long time to connect and sometimes fails.
Do you know why ?
| linux | null | null | null | null | 11/21/2011 08:39:53 | off topic | Take too long time to connect to server through ssh if not specify ip in /ect/hosts
===
My ubuntu 10.10 is in intranet. If i don't specify servers' ip in /etc/hosts, it takes too long time to connect and sometimes fails.
Do you know why ?
| 2 |
4,427,316 | 12/13/2010 09:19:06 | 75,761 | 03/09/2009 18:07:24 | 4,610 | 126 | Prevent git push against remote repository when username of pusher is not configured | I want to prevent users from pushing to my repository when their usernames aren't set correctly. In practice I'd like this:
foreach commit in pushed_stuff:
if not commit.username in some_list:
reject push
The hook `pre-receive` seems appropriate but how do I extract the username from each commit object that is received? `update` seems to get the object names but from my understanding that happens when it's already in my repository (just before the ref has moved).
EDIT: This isn't meant to be some security mechanism to only allow certain people to push to me. I trust everyone, but sometimes people mess up and forget to configure their `.gitconfig`. | git | null | null | null | null | null | open | Prevent git push against remote repository when username of pusher is not configured
===
I want to prevent users from pushing to my repository when their usernames aren't set correctly. In practice I'd like this:
foreach commit in pushed_stuff:
if not commit.username in some_list:
reject push
The hook `pre-receive` seems appropriate but how do I extract the username from each commit object that is received? `update` seems to get the object names but from my understanding that happens when it's already in my repository (just before the ref has moved).
EDIT: This isn't meant to be some security mechanism to only allow certain people to push to me. I trust everyone, but sometimes people mess up and forget to configure their `.gitconfig`. | 0 |
10,322,781 | 04/25/2012 19:53:56 | 954,474 | 09/20/2011 10:00:28 | 68 | 1 | Broadcasting in C | I have an application written in C that is a server and a client at the same time. What I do is the following:
sock = socket(AF_INET, SOCK_DGRAM, 0);
bzero(&server, length);
server.sin_family = AF_INET;
server.sin_addr.s_addr = INADDR_ANY;
server.sin_port = htons(MYPORT);
char broadcast = '1';
int broadcastlen = sizeof(broadcast);
if (setsockopt(sock, SOL_SOCKET, SO_BROADCAST, &broadcast, &broadcastlen) < 0) {
close(sock);
error("Error in setting broadcast option");
}
if (bind(sock, (struct sockaddr*) &server, sizeof(server)) < 0) {
close(sock);
error("Error in BINDING");
}
bzero(&sender, length);
bcast.sin_family = AF_INET;
bcast.sin_addr.s_addr = NBCAST; // NBCAST is the broadcast address of the subnet
bcast.sin_port = htons(MYPORT);
if (sendto(bcData->sock, dateQuery, strlen(dateQuery) + 1, 0, (struct sockaddr*)&local_sender, sizeof(local_sender)) < 0) {
close(bcData->sock);
error("ERROR in sending");
}
Up to this point everything works well. But I start a thread with the sock parameter to listen to, and do the following:
int len = sizeof(struct sockaddr_in);
struct sockaddr_in sender_addr;
recfrom(sock, recvbuff, recvbufflen, 0, (struct sockaddr*) &sender_addr, &len);
And it blocks there forever. I tried to make it work from different PCs, but it doesn't seem to work, because the thread is blocked due to recvfrom(). Can anyone tell me what is wrong with my code?
Thanks | c | network-programming | udp | broadcast | null | null | open | Broadcasting in C
===
I have an application written in C that is a server and a client at the same time. What I do is the following:
sock = socket(AF_INET, SOCK_DGRAM, 0);
bzero(&server, length);
server.sin_family = AF_INET;
server.sin_addr.s_addr = INADDR_ANY;
server.sin_port = htons(MYPORT);
char broadcast = '1';
int broadcastlen = sizeof(broadcast);
if (setsockopt(sock, SOL_SOCKET, SO_BROADCAST, &broadcast, &broadcastlen) < 0) {
close(sock);
error("Error in setting broadcast option");
}
if (bind(sock, (struct sockaddr*) &server, sizeof(server)) < 0) {
close(sock);
error("Error in BINDING");
}
bzero(&sender, length);
bcast.sin_family = AF_INET;
bcast.sin_addr.s_addr = NBCAST; // NBCAST is the broadcast address of the subnet
bcast.sin_port = htons(MYPORT);
if (sendto(bcData->sock, dateQuery, strlen(dateQuery) + 1, 0, (struct sockaddr*)&local_sender, sizeof(local_sender)) < 0) {
close(bcData->sock);
error("ERROR in sending");
}
Up to this point everything works well. But I start a thread with the sock parameter to listen to, and do the following:
int len = sizeof(struct sockaddr_in);
struct sockaddr_in sender_addr;
recfrom(sock, recvbuff, recvbufflen, 0, (struct sockaddr*) &sender_addr, &len);
And it blocks there forever. I tried to make it work from different PCs, but it doesn't seem to work, because the thread is blocked due to recvfrom(). Can anyone tell me what is wrong with my code?
Thanks | 0 |
154,217 | 09/30/2008 17:57:19 | 7,913 | 09/15/2008 14:40:40 | 391 | 27 | Evaluating OPF3 (ORM framework for .NET) | Is anyone using or has anyone evaluated [OPF3][1] as an ORM (.NET)? How does it stack up against EntitySpaces or Subsonic?
One thing about OPF3 I like in my evaluation so far is that it is very easy to customize. Since it binds database fields to object members using attributes, you do not *need* to use any code generation tool. This also means you can basically create your own classes, and then add OPF3 data binding on top of that.
<Persistent("users")> _
Public Class User
<Field("userid", AutoNumber:=True, Identifier:=True, allowDbnull:=False)> _
Public Property ID() As Long
<Field("name", allowDbnull:=False)> _
Public Property Name() As String
End Class
They do have a generation tool, and one thing I don't like is that the demo will not output classes, so I can't actually see what it is *really* going to do. On the plus side again, it appears that when you buy the tool, you get the source for it as well.
[1]: http://opf3.com
| .net | orm | opf3 | null | null | 01/14/2009 20:12:47 | off topic | Evaluating OPF3 (ORM framework for .NET)
===
Is anyone using or has anyone evaluated [OPF3][1] as an ORM (.NET)? How does it stack up against EntitySpaces or Subsonic?
One thing about OPF3 I like in my evaluation so far is that it is very easy to customize. Since it binds database fields to object members using attributes, you do not *need* to use any code generation tool. This also means you can basically create your own classes, and then add OPF3 data binding on top of that.
<Persistent("users")> _
Public Class User
<Field("userid", AutoNumber:=True, Identifier:=True, allowDbnull:=False)> _
Public Property ID() As Long
<Field("name", allowDbnull:=False)> _
Public Property Name() As String
End Class
They do have a generation tool, and one thing I don't like is that the demo will not output classes, so I can't actually see what it is *really* going to do. On the plus side again, it appears that when you buy the tool, you get the source for it as well.
[1]: http://opf3.com
| 2 |
6,813,271 | 07/25/2011 08:11:44 | 553,828 | 12/25/2010 13:26:48 | 62 | 1 | how to get all of the implemantations of an Interface using Reflection? | Public interface IRuleObject {}
Public class RuleBase : IRuleObject {}
Public class Length : RuleBase {}
Public class Range : RuleBase {}
Public class SetDefault : IRuleObject {}
I'm trying to write a piece of code in which I can get all of the classes that implement
IRuleObject...
As you noticed, some **Rules** might be derived from **RuleBase** which implements the **IRuleObject** and there are some other **Rules** which don't inherit the **RuleBase** and try implement the **IRuleObject** on their own. All of the **Rules** above are assignable to **IRuleObject**.
I tried :
Assembly dll = Assembly.GetAssembly(typeof(IRuleObject));
var rules = dll.GetTypes().Where(x => x.IsAssignableFrom(typeof(IRuleObject)));
However it couldn't retrieve the **Rules**
ideas are appreciated :-)
thanks | c# | inheritance | reflection | interface | implementation | null | open | how to get all of the implemantations of an Interface using Reflection?
===
Public interface IRuleObject {}
Public class RuleBase : IRuleObject {}
Public class Length : RuleBase {}
Public class Range : RuleBase {}
Public class SetDefault : IRuleObject {}
I'm trying to write a piece of code in which I can get all of the classes that implement
IRuleObject...
As you noticed, some **Rules** might be derived from **RuleBase** which implements the **IRuleObject** and there are some other **Rules** which don't inherit the **RuleBase** and try implement the **IRuleObject** on their own. All of the **Rules** above are assignable to **IRuleObject**.
I tried :
Assembly dll = Assembly.GetAssembly(typeof(IRuleObject));
var rules = dll.GetTypes().Where(x => x.IsAssignableFrom(typeof(IRuleObject)));
However it couldn't retrieve the **Rules**
ideas are appreciated :-)
thanks | 0 |
7,596,810 | 09/29/2011 11:43:57 | 959,128 | 09/22/2011 12:45:24 | 26 | 0 | How to use session in javascript or jquery | I want to use session in one javascript function.
I have tried this :
var myvar = "Hey Buddy";
'<%Session["temp"] = "' + myvar +'"; %>' ;
alert('<%=Session["temp"] %>');
this its not working...
How I used?Please help | javascript | jquery | session | null | null | 09/30/2011 11:28:54 | not a real question | How to use session in javascript or jquery
===
I want to use session in one javascript function.
I have tried this :
var myvar = "Hey Buddy";
'<%Session["temp"] = "' + myvar +'"; %>' ;
alert('<%=Session["temp"] %>');
this its not working...
How I used?Please help | 1 |
1,031,080 | 06/23/2009 07:26:06 | 124,875 | 06/18/2009 05:59:26 | 29 | 1 | Calculator keypress | i made a basic calculator. but i don't know how to assign keypress. how it assigned? | c# | null | null | null | null | 07/13/2012 22:38:16 | not a real question | Calculator keypress
===
i made a basic calculator. but i don't know how to assign keypress. how it assigned? | 1 |
8,557,895 | 12/19/2011 06:32:58 | 1,105,353 | 12/19/2011 06:28:20 | 1 | 0 | Cost/Effort Estimation of Open Source Systems | Is it possible to estimate the Cost/Effort of Open Source Systems?
Example: Cost/Effort estimation of Linux, WordPress and also the open source community projects.
| linux | open-source | software-engineering | null | null | 12/19/2011 06:47:30 | off topic | Cost/Effort Estimation of Open Source Systems
===
Is it possible to estimate the Cost/Effort of Open Source Systems?
Example: Cost/Effort estimation of Linux, WordPress and also the open source community projects.
| 2 |
6,193,132 | 05/31/2011 20:23:37 | 234,253 | 12/18/2009 00:56:42 | 594 | 22 | 1 pixel to the right on pages background | I just came across a problem that annoyed me for a couple of hours, before I decided for a hack.
I was coding a website designed by another guy into a html/css template.
The background is a big image, and the top banner has some elements that overflow to the background - following his project directive - he didn't want any floating div, etc. I did cutting the image and letting part of it on the background, and with a centralized content, I could put the images back together.
But no matter what I did, there was always 1 pixel separating the banner from the rest of the image on the background. I call the guy after my 2 or 3 hours frustration trying to "fix" my css, html, whatever - but he said this always happened - that I just should move that bit of the image (the background) 1 pixel to the left, before flattening the image and save it as the site background.
I hope this make sense, I can't put an example here because of my contract - but will try to reproduce with another image if my explanation is not good enough.
What I wan't to know is, why this happens?
I was using on the background image position: center and top.
The website main div container is centralized, the logical thing is: the banner and the rest of the overflow element should meet.
And I have checked, I did not cut one pixel extra.
| html | css | layout | website | background | 05/31/2011 21:43:00 | not a real question | 1 pixel to the right on pages background
===
I just came across a problem that annoyed me for a couple of hours, before I decided for a hack.
I was coding a website designed by another guy into a html/css template.
The background is a big image, and the top banner has some elements that overflow to the background - following his project directive - he didn't want any floating div, etc. I did cutting the image and letting part of it on the background, and with a centralized content, I could put the images back together.
But no matter what I did, there was always 1 pixel separating the banner from the rest of the image on the background. I call the guy after my 2 or 3 hours frustration trying to "fix" my css, html, whatever - but he said this always happened - that I just should move that bit of the image (the background) 1 pixel to the left, before flattening the image and save it as the site background.
I hope this make sense, I can't put an example here because of my contract - but will try to reproduce with another image if my explanation is not good enough.
What I wan't to know is, why this happens?
I was using on the background image position: center and top.
The website main div container is centralized, the logical thing is: the banner and the rest of the overflow element should meet.
And I have checked, I did not cut one pixel extra.
| 1 |
1,352,474 | 08/29/2009 21:49:42 | 136,861 | 07/11/2009 21:36:11 | 92 | 7 | Realtime with PubSubHubBub | I'm trying to implement real time chat engine with PubSubHubBub as the core in Rails. My question is what I need to do to or read to achieve this task ? Where I'm gonna start ? What knowledge do I need to know first because I'm really really newbie in this field and like to play with it... or are they any realtime chat engine that is fully compatible with Rails other than pshb ?
Thanx | ruby | ruby-on-rails | real-time | publish-subscribe | null | null | open | Realtime with PubSubHubBub
===
I'm trying to implement real time chat engine with PubSubHubBub as the core in Rails. My question is what I need to do to or read to achieve this task ? Where I'm gonna start ? What knowledge do I need to know first because I'm really really newbie in this field and like to play with it... or are they any realtime chat engine that is fully compatible with Rails other than pshb ?
Thanx | 0 |
10,699,740 | 05/22/2012 09:58:38 | 1,409,881 | 05/22/2012 09:50:43 | 1 | 0 | Mystery of the If() function in VB.net | I have this code:
dstCell.CELL_VALUE_INT = If(srcCell.CELL_VALUE_FLOAT IsNot Nothing,
Math.Round(CDbl(srcCell.CELL_VALUE_FLOAT)),
Nothing)
when **srcCell.CELL_VALUE_FLOAT is Nothing** it mysteriously evaluates to the True part!
Funny part is that a normal If statement correctly evaluates to the False part:
If (srcCell.CELL_VALUE_UOM IsNot Nothing) Then
dstCell.CELL_VALUE_INT = Math.Round(CDbl(srcCell.CELL_VALUE_UOM))
Else
dstCell.CELL_VALUE_INT = Nothing
End If
Any ideas?
Thank u! | vb.net | if-statement | null | null | null | null | open | Mystery of the If() function in VB.net
===
I have this code:
dstCell.CELL_VALUE_INT = If(srcCell.CELL_VALUE_FLOAT IsNot Nothing,
Math.Round(CDbl(srcCell.CELL_VALUE_FLOAT)),
Nothing)
when **srcCell.CELL_VALUE_FLOAT is Nothing** it mysteriously evaluates to the True part!
Funny part is that a normal If statement correctly evaluates to the False part:
If (srcCell.CELL_VALUE_UOM IsNot Nothing) Then
dstCell.CELL_VALUE_INT = Math.Round(CDbl(srcCell.CELL_VALUE_UOM))
Else
dstCell.CELL_VALUE_INT = Nothing
End If
Any ideas?
Thank u! | 0 |
6,864,974 | 07/28/2011 20:04:19 | 333,061 | 05/05/2010 04:31:45 | 54 | 10 | Where are the popups when needed?... | I need to test for pop-up advertising (hopefully with windows.open and iframes) for a new site (Administrator user introduce codes in a textarea box of one admin panel of the application in developing).
Can you believe it? I find no site from which take one sample. Help please... | javascript | popup | advertising | null | null | 11/21/2011 14:44:04 | not a real question | Where are the popups when needed?...
===
I need to test for pop-up advertising (hopefully with windows.open and iframes) for a new site (Administrator user introduce codes in a textarea box of one admin panel of the application in developing).
Can you believe it? I find no site from which take one sample. Help please... | 1 |
7,384,602 | 09/12/2011 07:31:31 | 475,349 | 09/08/2010 13:04:04 | 266 | 2 | problem in implementing a url in android application | I am developing android application in which i have to implement a url so that it can be fit in 320*480 resolution
The url is
http://www.crazysales.com.au/
I have tried googling it,,But cant find a solution for the listview scrollable
Can anyone tell me,,How to implement that listview on the left side,,,with icon,I AM TRYING TO customise it,,But cant succeed because its crashing dont know why
Thanks in advance
Tushar | android | null | null | null | null | 11/22/2011 06:36:47 | too localized | problem in implementing a url in android application
===
I am developing android application in which i have to implement a url so that it can be fit in 320*480 resolution
The url is
http://www.crazysales.com.au/
I have tried googling it,,But cant find a solution for the listview scrollable
Can anyone tell me,,How to implement that listview on the left side,,,with icon,I AM TRYING TO customise it,,But cant succeed because its crashing dont know why
Thanks in advance
Tushar | 3 |
9,498,499 | 02/29/2012 11:42:26 | 806,539 | 06/20/2011 11:32:09 | 1,046 | 4 | JavaScript regular expression to match hyphenated words? | I'd like a JavaScript regular expression that can match a string either at the start of another string, or after a hyphen in the string.
For example, "milne" and "lee" and "lees" should all match "Lees-Milne".
This is my code so far:
var name = "Lees-Milne";
var text = "lee";
// I don't know what 'text' is ahead of time, so
// best to use RegExp constructor.
var re = RegExp("^" + text | "-" + text, "i");
alert(re.exec(name.toLowerCase()));
However, this returns null. What am I doing wrong?
| javascript | regex | null | null | null | null | open | JavaScript regular expression to match hyphenated words?
===
I'd like a JavaScript regular expression that can match a string either at the start of another string, or after a hyphen in the string.
For example, "milne" and "lee" and "lees" should all match "Lees-Milne".
This is my code so far:
var name = "Lees-Milne";
var text = "lee";
// I don't know what 'text' is ahead of time, so
// best to use RegExp constructor.
var re = RegExp("^" + text | "-" + text, "i");
alert(re.exec(name.toLowerCase()));
However, this returns null. What am I doing wrong?
| 0 |
11,644,930 | 07/25/2012 07:43:03 | 1,474,334 | 06/22/2012 08:59:36 | 414 | 51 | How to display an array properly | I have just a little question, I searched on net but I have not found anything.
I use a lot print_r or var_dump. I'm looking for a method to display an array with these methods properly, with the right format, aligned etc... but not all on one line even making it incomprehensible.
Do you understand what i want ?^^
| php | arrays | null | null | null | 07/25/2012 14:00:18 | not a real question | How to display an array properly
===
I have just a little question, I searched on net but I have not found anything.
I use a lot print_r or var_dump. I'm looking for a method to display an array with these methods properly, with the right format, aligned etc... but not all on one line even making it incomprehensible.
Do you understand what i want ?^^
| 1 |
9,584,576 | 03/06/2012 13:24:34 | 1,252,286 | 03/06/2012 13:21:24 | 1 | 0 | can i divert text output ( cat() &/or print() ) to a separate window | platform: R 2.14.2 - Windows XP
When I use cat() or print() in a script, the output text is of course
interlaced with the lines of the script.
I can sink() the output to a textfile and then play the file back at the
end of the script, but that's not really what I'm after.
It would be nice if the lines of text output could appear in a separate
window, in the same sort of way that you'd use windows() for graphical
output.
Apologies if I'm missing something obvious.
Bob Kinley | r | null | null | null | null | null | open | can i divert text output ( cat() &/or print() ) to a separate window
===
platform: R 2.14.2 - Windows XP
When I use cat() or print() in a script, the output text is of course
interlaced with the lines of the script.
I can sink() the output to a textfile and then play the file back at the
end of the script, but that's not really what I'm after.
It would be nice if the lines of text output could appear in a separate
window, in the same sort of way that you'd use windows() for graphical
output.
Apologies if I'm missing something obvious.
Bob Kinley | 0 |
7,363,213 | 09/09/2011 14:30:24 | 855,778 | 07/21/2011 11:11:25 | 1 | 0 | Can any one please give me clear information about Indexes in App Engine Data store with example.? | I am trying to search Users datastore with Email id. The Users datastore have more than 1000 records. Its nearly taking 9sec for the output. I Think indexing with be helpful for this problem. So.. please help me. | google-app-engine | indexing | gae-datastore | code-examples | null | 09/12/2011 19:15:26 | not a real question | Can any one please give me clear information about Indexes in App Engine Data store with example.?
===
I am trying to search Users datastore with Email id. The Users datastore have more than 1000 records. Its nearly taking 9sec for the output. I Think indexing with be helpful for this problem. So.. please help me. | 1 |
7,593,656 | 09/29/2011 07:05:17 | 871,232 | 07/31/2011 03:12:21 | 1 | 0 | Why is the variable read from the Scanner method next() or nextDouble() equal to a String or double respectively | For example,
If I declare a String variable and a double variable
String d = "dragon";
double = 1.45;
And then I have a text file and on the first line of the file it is...
A dragon is 1.45
So I open the file
{
try {
x = new Scanner(new File("Dragon.txt"));
}
catch(Exception e)
{
System.out.println("Could not find file");
}
}
// And then read in the data, in this case I use hasNext which returns a String.
public void readFileData()
{
while(x.hasNext())
{
// Remember, this is the first line of the text file: A dragon is 1.45
String a1 = x.next(); // al = "A";
String a2 = x.next(); // a2 = "dragon;
// And I test a2 to see it is equal to dragon, however it is not.
if(d == a2)
{
System.out.println("Wow");
}
else
System.out.println("Naw man");
String a3 = x.next();
String a4 = x.next();
// Of course I do the same thing for the a4 variable and of course the String variables are replaced with double and nextdouble() method is used.
Thank you very much in advance to anyone who can help!
| java | string | file | null | null | 10/01/2011 20:50:28 | not a real question | Why is the variable read from the Scanner method next() or nextDouble() equal to a String or double respectively
===
For example,
If I declare a String variable and a double variable
String d = "dragon";
double = 1.45;
And then I have a text file and on the first line of the file it is...
A dragon is 1.45
So I open the file
{
try {
x = new Scanner(new File("Dragon.txt"));
}
catch(Exception e)
{
System.out.println("Could not find file");
}
}
// And then read in the data, in this case I use hasNext which returns a String.
public void readFileData()
{
while(x.hasNext())
{
// Remember, this is the first line of the text file: A dragon is 1.45
String a1 = x.next(); // al = "A";
String a2 = x.next(); // a2 = "dragon;
// And I test a2 to see it is equal to dragon, however it is not.
if(d == a2)
{
System.out.println("Wow");
}
else
System.out.println("Naw man");
String a3 = x.next();
String a4 = x.next();
// Of course I do the same thing for the a4 variable and of course the String variables are replaced with double and nextdouble() method is used.
Thank you very much in advance to anyone who can help!
| 1 |
11,484,043 | 07/14/2012 13:12:19 | 1,454,263 | 06/13/2012 16:46:07 | 1 | 0 | Number of samples and instances in Machine Learning | I'm trying to determine the ideal number of samples and instances of data that I should collect. Basically, I have to create a dataset of website's traffic.
I'm not sure how the number of samples and instances in each sample influences the training data. Is it a large number of samples good? Then, should I try to collect as many instances of each website as possible?
My idea was to collect two different samples in different days. Then for each website in each samples I would collect around 30 instances.
And I will be using the SVM algorithm.
Thanks for your help, and any clarification. And, I'm also not sure if I'm confusing definitions (samples vs instances). | machine-learning | null | null | null | null | 07/16/2012 04:49:30 | not constructive | Number of samples and instances in Machine Learning
===
I'm trying to determine the ideal number of samples and instances of data that I should collect. Basically, I have to create a dataset of website's traffic.
I'm not sure how the number of samples and instances in each sample influences the training data. Is it a large number of samples good? Then, should I try to collect as many instances of each website as possible?
My idea was to collect two different samples in different days. Then for each website in each samples I would collect around 30 instances.
And I will be using the SVM algorithm.
Thanks for your help, and any clarification. And, I'm also not sure if I'm confusing definitions (samples vs instances). | 4 |
3,609,230 | 08/31/2010 12:56:11 | 400,575 | 07/23/2010 18:54:30 | 8 | 0 | Best(?) way to make a popup menu for semi-portable shell scripts? | Basically I would love to say:
echo `grep ^foo /usr/share/dict/words | popup_menu`
...and have some type of keyboard navigable menu popup or selection tool, very similar to how vim's ":Explore" mechanism works.
Extreme bonus points for "easy and works pretty much everywhere with standard tools"
Also acceptable is "needs some sort of extra config file or 5-10 line shell script"
Less acceptable is "go download this perl library or 100 line python script, etc..." at that point, I would rather just try to find some actual program / package to install and list it as a hard dependency. But if you can come up with a 2-5 line perl / python script that doesn't require tracking down libraries that'd probably work too.
I have investigated:
* Dialog - appears more geared towards "shell application" instead of ad-hoc scripting (looks like there might be a way to make it do what I want, though), drawback is that it overwrites the current screen state
* Curses - seems like it targets "C" or would need to be used as part of a perl / python library, would have to write my own menu program using this
* bash "select" builtin - works via number selection, not keyboard navigation, is a little awkward to use but fairly close
* Vim - "grep ^foo /usr/share/dict/words | vim -" ... this gets you surprisingly close, just missing "bind the enter key to print current line to terminal and exit"
...so, how do I go about making or finding a decent, simple, ad-hoc menu maker for use in bash scripts and when I'm being lazy on the command line?
... git checkout -b `git branch -a | menu`
... ssh `grep foo /etc/hosts | menu`
... rm `ls | menu` # ignore obvious quoting issues with this...
| bash | scripting | shell | menu | interactive | null | open | Best(?) way to make a popup menu for semi-portable shell scripts?
===
Basically I would love to say:
echo `grep ^foo /usr/share/dict/words | popup_menu`
...and have some type of keyboard navigable menu popup or selection tool, very similar to how vim's ":Explore" mechanism works.
Extreme bonus points for "easy and works pretty much everywhere with standard tools"
Also acceptable is "needs some sort of extra config file or 5-10 line shell script"
Less acceptable is "go download this perl library or 100 line python script, etc..." at that point, I would rather just try to find some actual program / package to install and list it as a hard dependency. But if you can come up with a 2-5 line perl / python script that doesn't require tracking down libraries that'd probably work too.
I have investigated:
* Dialog - appears more geared towards "shell application" instead of ad-hoc scripting (looks like there might be a way to make it do what I want, though), drawback is that it overwrites the current screen state
* Curses - seems like it targets "C" or would need to be used as part of a perl / python library, would have to write my own menu program using this
* bash "select" builtin - works via number selection, not keyboard navigation, is a little awkward to use but fairly close
* Vim - "grep ^foo /usr/share/dict/words | vim -" ... this gets you surprisingly close, just missing "bind the enter key to print current line to terminal and exit"
...so, how do I go about making or finding a decent, simple, ad-hoc menu maker for use in bash scripts and when I'm being lazy on the command line?
... git checkout -b `git branch -a | menu`
... ssh `grep foo /etc/hosts | menu`
... rm `ls | menu` # ignore obvious quoting issues with this...
| 0 |
59,954 | 09/12/2008 21:04:39 | 2,744 | 08/24/2008 20:43:50 | 26 | 1 | What is the best book for learning WPF? | What is the best book for building WPF Business Applications? | .net | wpf | null | null | null | 11/01/2011 16:01:40 | not constructive | What is the best book for learning WPF?
===
What is the best book for building WPF Business Applications? | 4 |
6,790,273 | 07/22/2011 12:50:56 | 857,915 | 07/22/2011 12:32:28 | 1 | 0 | snmpwalk for temperature value (Intel(R) Xeon(R) CPU X3430 @ 2.40GHz) | i get this value(2147483647) from with snmpwalk from Intel(R) Xeon(R) CPU X3430 @ 2.40GHz.
MIB: .1.3.6.1.4.1.343.2.10.3.5.600.40.1.6 Temperature Reading
but this mib branch.
SNMPv2-SMI::enterprises.343.2.10.3.5.600.40.1.6.1 = INTEGER: 2147483647
SNMPv2-SMI::enterprises.343.2.10.3.5.600.40.1.6.2 = INTEGER: -600
SNMPv2-SMI::enterprises.343.2.10.3.5.600.40.1.6.3 = INTEGER: 0
SNMPv2-SMI::enterprises.343.2.10.3.5.600.40.1.6.4 = INTEGER: 0
SNMPv2-SMI::enterprises.343.2.10.3.5.600.40.1.6.5 = INTEGER: 380
SNMPv2-SMI::enterprises.343.2.10.3.5.600.40.1.6.6 = INTEGER: 250
SNMPv2-SMI::enterprises.343.2.10.3.5.600.40.1.6.7 = INTEGER: 270
which mib is temperature value ?? | snmp | snmp4j | null | null | null | 07/23/2011 02:59:43 | off topic | snmpwalk for temperature value (Intel(R) Xeon(R) CPU X3430 @ 2.40GHz)
===
i get this value(2147483647) from with snmpwalk from Intel(R) Xeon(R) CPU X3430 @ 2.40GHz.
MIB: .1.3.6.1.4.1.343.2.10.3.5.600.40.1.6 Temperature Reading
but this mib branch.
SNMPv2-SMI::enterprises.343.2.10.3.5.600.40.1.6.1 = INTEGER: 2147483647
SNMPv2-SMI::enterprises.343.2.10.3.5.600.40.1.6.2 = INTEGER: -600
SNMPv2-SMI::enterprises.343.2.10.3.5.600.40.1.6.3 = INTEGER: 0
SNMPv2-SMI::enterprises.343.2.10.3.5.600.40.1.6.4 = INTEGER: 0
SNMPv2-SMI::enterprises.343.2.10.3.5.600.40.1.6.5 = INTEGER: 380
SNMPv2-SMI::enterprises.343.2.10.3.5.600.40.1.6.6 = INTEGER: 250
SNMPv2-SMI::enterprises.343.2.10.3.5.600.40.1.6.7 = INTEGER: 270
which mib is temperature value ?? | 2 |
9,327,094 | 02/17/2012 11:05:33 | 925,126 | 09/02/2011 11:09:23 | 15 | 4 | (JSF) Ajax and Validator is not working together | When I am trying to insert a validator to a selectOneMenu element containing a ajax listener in JSF, the ajax listener begins to not working. The following is my JSF snipplet specific to issue I am talking:
<h:selectOneMenu id="metalCodes" converter="metalCodeConverter" required="true" requiredMessage="#{lang.metalStockIntroducing_metalCode_req_txt}" value="#{metalStockIntroducingProcessesBean.metal.metalCode}">
<f:selectItem itemLabel="Please select..." noSelectionOption="true" />
<f:selectItems value="#{metalStockIntroducingProcessesBean.metalCodesMenu}" />
<f:ajax listener="#{metalStockIntroducingProcessesBean.changeMetalType}" event="change" execute="metalCodes" render="metalTypesMenu" immediate="false"/>
<f:validator validatorId="densityValidator"/>
</h:selectOneMenu>
What would you friends recommend me to do in order to make the validator and ajax listener works collaborately in a h:selectOneMenu JSF element?
Yours sincerely... | jsf | validator | ajax4jsf | null | null | null | open | (JSF) Ajax and Validator is not working together
===
When I am trying to insert a validator to a selectOneMenu element containing a ajax listener in JSF, the ajax listener begins to not working. The following is my JSF snipplet specific to issue I am talking:
<h:selectOneMenu id="metalCodes" converter="metalCodeConverter" required="true" requiredMessage="#{lang.metalStockIntroducing_metalCode_req_txt}" value="#{metalStockIntroducingProcessesBean.metal.metalCode}">
<f:selectItem itemLabel="Please select..." noSelectionOption="true" />
<f:selectItems value="#{metalStockIntroducingProcessesBean.metalCodesMenu}" />
<f:ajax listener="#{metalStockIntroducingProcessesBean.changeMetalType}" event="change" execute="metalCodes" render="metalTypesMenu" immediate="false"/>
<f:validator validatorId="densityValidator"/>
</h:selectOneMenu>
What would you friends recommend me to do in order to make the validator and ajax listener works collaborately in a h:selectOneMenu JSF element?
Yours sincerely... | 0 |
10,783,294 | 05/28/2012 10:43:13 | 1,418,896 | 05/26/2012 10:37:19 | 1 | 0 | ceate database using file operation in c language | i have created database using file operation.
in my case 1 : i have added the record in file if i enter the two record as same it will accept. but i don't wont this if i enter the data which is already exists in the file , it can not add in the file. so what i have to do...?
how to check the record is already in the file and how to stop same data will enter by user in the file.
thanks in advance...
/* vehicle record program */
#include <stdio.h>
#include <string.h>
typedef struct vehicle
{
char name[100];
int lice_no;
int vehicle_type;
char cmpny_name[100];
int menu_year;
}record;
int main(void)
{
int i , choice;
FILE *fp1,*fp2;
char oname[100];
record det;
int recsize;
char c;
fp1 = fopen("record.dat" , "r+");
if(fp1 == NULL)
{
fp1 = fopen("record.dat" , "w+");
if(fp1 == NULL)
{
printf("error in opening file : \n");
return -1;
}
}
recsize = sizeof(det);
do
{
printf("\t\"enter the choice\"\n");
printf("----------------------------------------------------------------------------\n");
printf("1 : adding the record\n");
printf("2 : delete the record\n");
printf("3 : editing the record\n");
printf("4 : display the record\n");
printf("5 : exit the program\n");
printf("----------------------------------------------------------------------------\n");
fflush(stdin);
scanf("%d" , &choice);
scanf("%c" , &c);
printf("----------------------------------------------------------------------------\n");
switch(choice)
{
case 1 :
{
fseek(fp1 , 0 ,SEEK_END);
printf("Enter owner Name : ");
scanf("%[^\n]" , det.name);
printf("Enter licence number : ");
scanf("%d" , &det.lice_no);
printf("Enter the vehicle type : ");
scanf("%d" , &det.vehicle_type);
scanf("%c" , &c);
printf("Enter company name : ");
scanf("%[^\n]" , det.cmpny_name);
printf("Enter menufecture year : ");
scanf("%d" , &det.menu_year);
fwrite(&det,recsize,1,fp1);
break;
}
case 2 :
{
int fsize;
fseek(fp1 , 0 ,SEEK_END);
fsize = ftell(fp1);
printf("the value of fsize is : %d\n" , fsize);
if(fsize == 0 || fsize == -1)
{
printf("No record in database : \n");
}
else
{
printf("Enter the vehicle owner name for delete : ");
scanf("%[^\n]" , oname);
fp2 = fopen("temp.dat" , "w+");
if(fp2 == NULL)
{
printf("Error in opening file : \n");
return -1;
}
rewind(fp1);
while((i = fread(&det,recsize,1,fp1)) == 1)
{
if(strcmp(det.name , oname) != 0)
fwrite(&det , recsize , 1 , fp2);
}
fclose(fp1);
fclose(fp2);
remove("record.dat");
rename("temp.dat" , "record.dat");
fp1 = fopen("record.dat","r+");
if(fp1 == NULL)
{
printf("Error in opening file : \n");
return -1;
}
}
break;
}
case 3 :
{
int fsize;
fseek(fp1 , 0 ,SEEK_END);
fsize = ftell(fp1);
printf("the value of fsize is : %d\n" , fsize);
if(fsize == 0 || fsize == -1)
{
printf("No record in database to edit : \n");
}
else
{
int ch,j;
rewind(fp1);
printf("Enter the name of owner to edit detail : ");
scanf("%[^\n]" , oname);
i = fread(&det , recsize , 1 , fp1);
j = strcmp(det.name , oname);
if(j == 0)
{
while(1)
{
printf("enter the choice : \n");
printf("1 : owner name\n");
printf("2 : licence number\n");
printf("3 : vehicle type\n");
printf("4 : cpmpany name\n");
printf("5 : menufecture year\n");
printf("6 : exit\n");
scanf("%d" , &ch);
scanf("%c" , &c);
if(ch == 1)
{
printf("Enter new owner name : ");
scanf("%[^\n]" , det.name);
}
else if(ch == 2)
{
printf("Enter new licence number : ");
scanf("%d" , &det.lice_no);
}
else if(ch == 3)
{
printf("Enter new vehicle type : ");
scanf("%d" , &det.vehicle_type);
}
else if(ch == 4)
{
printf("Enter new company name : ");
scanf("%[^\n]" , det.cmpny_name);
}
else if(ch == 5)
{
printf("Enter new menufecturing year : ");
scanf("%d" , &det.menu_year);
}
else if(ch == 6)
break;
else
printf("Invalid entry : \n");
fseek(fp1,-recsize,SEEK_CUR);
fwrite(&det,recsize,1,fp1);
}
}
else
{
int c,d;
char j;
while((c = fread(&det , recsize ,1,fp1)) == 1)
{
d = strcmp(det.name , oname);
if(d == 0)
{
while(1)
{
printf("enter the choice : \n");
printf("1 : owner name\n");
printf("2 : licence number\n");
printf("3 : vehicle type\n");
printf("4 : cpmpany name\n");
printf("5 : menufecture year\n");
printf("6 : exit\n");
scanf("%d" , &ch);
scanf("%c" , &j);
if(ch == 1)
{
printf("Enter new owner name : ");
scanf("%[^\n]" , det.name);
}
else if(ch == 2)
{
printf("Enter new licence number : ");
scanf("%d" , &det.lice_no);
}
else if(ch == 3)
{
printf("Enter new vehicle type : ");
scanf("%d" , &det.vehicle_type);
}
else if(ch == 4)
{
printf("Enter new company name : ");
scanf("%[^\n]" , det.cmpny_name);
}
else if(ch == 5)
{
printf("Enter new menufecturing year : ");
scanf("%d" , &det.menu_year);
}
else if(ch == 6)
break;
else
printf("Invalid entry :\n");
fseek(fp1,-recsize,SEEK_CUR);
fwrite(&det,recsize,1,fp1);
}
}
printf("\"record edited\"\n")
}
printf("record is not found\n");
}
}
break;
}
case 4 :
{
rewind(fp1);
while(fread(&det,recsize,1,fp1) == 1)
{
printf("owner name = %s\n" , det.name);
printf("licence number = %d\n" , det.lice_no);
printf("vehicle type = %d wheeler\n" , det.vehicle_type);
printf("company type = %s\n" , det.cmpny_name);
printf("menufectur year = %d\n" , det.menu_year);
printf("----------------------------------------------------------------------------\n");
}
break;
}
case 5 :
{
fclose(fp1);
return -1;
break;
}
default :
{
printf("\"Invalid option\"\n");
break;
}
}
}
while(1);
return 0;
} | c | database | file-handling | null | null | 05/29/2012 08:34:41 | too localized | ceate database using file operation in c language
===
i have created database using file operation.
in my case 1 : i have added the record in file if i enter the two record as same it will accept. but i don't wont this if i enter the data which is already exists in the file , it can not add in the file. so what i have to do...?
how to check the record is already in the file and how to stop same data will enter by user in the file.
thanks in advance...
/* vehicle record program */
#include <stdio.h>
#include <string.h>
typedef struct vehicle
{
char name[100];
int lice_no;
int vehicle_type;
char cmpny_name[100];
int menu_year;
}record;
int main(void)
{
int i , choice;
FILE *fp1,*fp2;
char oname[100];
record det;
int recsize;
char c;
fp1 = fopen("record.dat" , "r+");
if(fp1 == NULL)
{
fp1 = fopen("record.dat" , "w+");
if(fp1 == NULL)
{
printf("error in opening file : \n");
return -1;
}
}
recsize = sizeof(det);
do
{
printf("\t\"enter the choice\"\n");
printf("----------------------------------------------------------------------------\n");
printf("1 : adding the record\n");
printf("2 : delete the record\n");
printf("3 : editing the record\n");
printf("4 : display the record\n");
printf("5 : exit the program\n");
printf("----------------------------------------------------------------------------\n");
fflush(stdin);
scanf("%d" , &choice);
scanf("%c" , &c);
printf("----------------------------------------------------------------------------\n");
switch(choice)
{
case 1 :
{
fseek(fp1 , 0 ,SEEK_END);
printf("Enter owner Name : ");
scanf("%[^\n]" , det.name);
printf("Enter licence number : ");
scanf("%d" , &det.lice_no);
printf("Enter the vehicle type : ");
scanf("%d" , &det.vehicle_type);
scanf("%c" , &c);
printf("Enter company name : ");
scanf("%[^\n]" , det.cmpny_name);
printf("Enter menufecture year : ");
scanf("%d" , &det.menu_year);
fwrite(&det,recsize,1,fp1);
break;
}
case 2 :
{
int fsize;
fseek(fp1 , 0 ,SEEK_END);
fsize = ftell(fp1);
printf("the value of fsize is : %d\n" , fsize);
if(fsize == 0 || fsize == -1)
{
printf("No record in database : \n");
}
else
{
printf("Enter the vehicle owner name for delete : ");
scanf("%[^\n]" , oname);
fp2 = fopen("temp.dat" , "w+");
if(fp2 == NULL)
{
printf("Error in opening file : \n");
return -1;
}
rewind(fp1);
while((i = fread(&det,recsize,1,fp1)) == 1)
{
if(strcmp(det.name , oname) != 0)
fwrite(&det , recsize , 1 , fp2);
}
fclose(fp1);
fclose(fp2);
remove("record.dat");
rename("temp.dat" , "record.dat");
fp1 = fopen("record.dat","r+");
if(fp1 == NULL)
{
printf("Error in opening file : \n");
return -1;
}
}
break;
}
case 3 :
{
int fsize;
fseek(fp1 , 0 ,SEEK_END);
fsize = ftell(fp1);
printf("the value of fsize is : %d\n" , fsize);
if(fsize == 0 || fsize == -1)
{
printf("No record in database to edit : \n");
}
else
{
int ch,j;
rewind(fp1);
printf("Enter the name of owner to edit detail : ");
scanf("%[^\n]" , oname);
i = fread(&det , recsize , 1 , fp1);
j = strcmp(det.name , oname);
if(j == 0)
{
while(1)
{
printf("enter the choice : \n");
printf("1 : owner name\n");
printf("2 : licence number\n");
printf("3 : vehicle type\n");
printf("4 : cpmpany name\n");
printf("5 : menufecture year\n");
printf("6 : exit\n");
scanf("%d" , &ch);
scanf("%c" , &c);
if(ch == 1)
{
printf("Enter new owner name : ");
scanf("%[^\n]" , det.name);
}
else if(ch == 2)
{
printf("Enter new licence number : ");
scanf("%d" , &det.lice_no);
}
else if(ch == 3)
{
printf("Enter new vehicle type : ");
scanf("%d" , &det.vehicle_type);
}
else if(ch == 4)
{
printf("Enter new company name : ");
scanf("%[^\n]" , det.cmpny_name);
}
else if(ch == 5)
{
printf("Enter new menufecturing year : ");
scanf("%d" , &det.menu_year);
}
else if(ch == 6)
break;
else
printf("Invalid entry : \n");
fseek(fp1,-recsize,SEEK_CUR);
fwrite(&det,recsize,1,fp1);
}
}
else
{
int c,d;
char j;
while((c = fread(&det , recsize ,1,fp1)) == 1)
{
d = strcmp(det.name , oname);
if(d == 0)
{
while(1)
{
printf("enter the choice : \n");
printf("1 : owner name\n");
printf("2 : licence number\n");
printf("3 : vehicle type\n");
printf("4 : cpmpany name\n");
printf("5 : menufecture year\n");
printf("6 : exit\n");
scanf("%d" , &ch);
scanf("%c" , &j);
if(ch == 1)
{
printf("Enter new owner name : ");
scanf("%[^\n]" , det.name);
}
else if(ch == 2)
{
printf("Enter new licence number : ");
scanf("%d" , &det.lice_no);
}
else if(ch == 3)
{
printf("Enter new vehicle type : ");
scanf("%d" , &det.vehicle_type);
}
else if(ch == 4)
{
printf("Enter new company name : ");
scanf("%[^\n]" , det.cmpny_name);
}
else if(ch == 5)
{
printf("Enter new menufecturing year : ");
scanf("%d" , &det.menu_year);
}
else if(ch == 6)
break;
else
printf("Invalid entry :\n");
fseek(fp1,-recsize,SEEK_CUR);
fwrite(&det,recsize,1,fp1);
}
}
printf("\"record edited\"\n")
}
printf("record is not found\n");
}
}
break;
}
case 4 :
{
rewind(fp1);
while(fread(&det,recsize,1,fp1) == 1)
{
printf("owner name = %s\n" , det.name);
printf("licence number = %d\n" , det.lice_no);
printf("vehicle type = %d wheeler\n" , det.vehicle_type);
printf("company type = %s\n" , det.cmpny_name);
printf("menufectur year = %d\n" , det.menu_year);
printf("----------------------------------------------------------------------------\n");
}
break;
}
case 5 :
{
fclose(fp1);
return -1;
break;
}
default :
{
printf("\"Invalid option\"\n");
break;
}
}
}
while(1);
return 0;
} | 3 |
1,108,405 | 07/10/2009 08:33:25 | 135,758 | 07/09/2009 16:00:46 | 1 | 1 | More recent networking books | I'm not sure if publish date matters, but it seems that all the recommended books I see are from like, pre-2000, or at the latest, around 2002. Hasn't there been much advance on the subject in almost 10 years? Are there any recently published network programming books, and are they any good? I posted this on GDnet but would like as many suggestions as possible:
I'm looking for a selection of books on C++ Network Programming. I'm not looking for beginners guides, I want something more advanced. I'd like it to cover concepts such as IOCP in detail (although I do have some experience with this already), topics discussing TCP/UDP protocol details, implementing ordering/reliability protocols on top of UDP. Network application architecture/design discussion (yes that's pretty general) would also be a bonus, as would a section on security (but that would be bordering on cryptography). Really I would just like to learn about things I don't already know, or even know *about*
Can anyone suggest any books that fit my description? ISBNs would help too if possible.
Edit: Platform should focus on Windows, but I'm not fussed if the book if mostly theory and applicable to many platforms.
| c++ | networking | books | null | null | 09/25/2011 10:56:09 | not constructive | More recent networking books
===
I'm not sure if publish date matters, but it seems that all the recommended books I see are from like, pre-2000, or at the latest, around 2002. Hasn't there been much advance on the subject in almost 10 years? Are there any recently published network programming books, and are they any good? I posted this on GDnet but would like as many suggestions as possible:
I'm looking for a selection of books on C++ Network Programming. I'm not looking for beginners guides, I want something more advanced. I'd like it to cover concepts such as IOCP in detail (although I do have some experience with this already), topics discussing TCP/UDP protocol details, implementing ordering/reliability protocols on top of UDP. Network application architecture/design discussion (yes that's pretty general) would also be a bonus, as would a section on security (but that would be bordering on cryptography). Really I would just like to learn about things I don't already know, or even know *about*
Can anyone suggest any books that fit my description? ISBNs would help too if possible.
Edit: Platform should focus on Windows, but I'm not fussed if the book if mostly theory and applicable to many platforms.
| 4 |
5,011,676 | 02/16/2011 01:43:04 | 325,418 | 05/09/2009 15:50:29 | 10,326 | 352 | Why Ruby on Rails' User.create!(:email => 'ha', :identifier => 'foo') not work? | (I am using Rails 2.2.2, but should be very similar to 2.3.5 or 3.0)
The following line works:
User.create!(:email => 'ha')
But I generated a migration and added `identifier` to the users table, and restarted the Rails console, and used
User.create!(:email => 'bar', :identifier => 'foo')
This user is created with and the email field is set to `bar` (as seen in mysql) but `identifier` is not set to `foo`... is there a reason why?
| ruby-on-rails | ruby-on-rails-3 | activerecord | restful-authentication | null | null | open | Why Ruby on Rails' User.create!(:email => 'ha', :identifier => 'foo') not work?
===
(I am using Rails 2.2.2, but should be very similar to 2.3.5 or 3.0)
The following line works:
User.create!(:email => 'ha')
But I generated a migration and added `identifier` to the users table, and restarted the Rails console, and used
User.create!(:email => 'bar', :identifier => 'foo')
This user is created with and the email field is set to `bar` (as seen in mysql) but `identifier` is not set to `foo`... is there a reason why?
| 0 |
6,878,584 | 07/29/2011 20:21:29 | 79,676 | 03/18/2009 19:05:34 | 329 | 23 | Implicit Connection Cache InactivityTimeout not working | We have a Java application which connects to Oracle database. The current issue is database connection created by the application is not cleared for days and this is cleared only after app server bounce. The max connection created by application remain inactive (without any activity) for days.
We use (ojdbc14.jar) Oracle JDBC Driver version - "10.2.0.2.0"
JDk 1.5
Resin app 3.1.7 servers
We have set the Implicit Connection Cache properties as follows
> connCacheProps.setProperty("MinLimit", 5);
connCacheProps.setProperty("MaxLimit", 50);
connCacheProps.setProperty("InitialLimit", 5);
connCacheProps.setProperty("InactivityTimeout", "1800");
connCacheProps.setProperty("AbandonedConnectionTimeout", 900);
connCacheProps.setProperty("MaxStatementsLimit", "10");
connCacheProps.setProperty("PropertyCheckInterval", "60");
Please share your thoughts! | java | oracle | jdbc | null | null | null | open | Implicit Connection Cache InactivityTimeout not working
===
We have a Java application which connects to Oracle database. The current issue is database connection created by the application is not cleared for days and this is cleared only after app server bounce. The max connection created by application remain inactive (without any activity) for days.
We use (ojdbc14.jar) Oracle JDBC Driver version - "10.2.0.2.0"
JDk 1.5
Resin app 3.1.7 servers
We have set the Implicit Connection Cache properties as follows
> connCacheProps.setProperty("MinLimit", 5);
connCacheProps.setProperty("MaxLimit", 50);
connCacheProps.setProperty("InitialLimit", 5);
connCacheProps.setProperty("InactivityTimeout", "1800");
connCacheProps.setProperty("AbandonedConnectionTimeout", 900);
connCacheProps.setProperty("MaxStatementsLimit", "10");
connCacheProps.setProperty("PropertyCheckInterval", "60");
Please share your thoughts! | 0 |
6,155,347 | 05/27/2011 16:48:12 | 772,335 | 05/27/2011 01:52:44 | 1 | 0 | Arraylist manipulation | I have a text file that has text like this:
Bill
Kenny
Derik
Jame
<b>
1
5
4
3
2
<b>
1
3
4
5
2
<b> 2 1 5 4 3
and i want to store it into an array like this using a buffer reader and fileinputstream :
Bill
Kenny
Derik
Jame
<b> 1 5 4 3 2
<b> 1 3 4 5 2
<b> 2 1 5 4 3 | java | printing | newline | space | fileinputstream | 05/27/2011 16:53:19 | not a real question | Arraylist manipulation
===
I have a text file that has text like this:
Bill
Kenny
Derik
Jame
<b>
1
5
4
3
2
<b>
1
3
4
5
2
<b> 2 1 5 4 3
and i want to store it into an array like this using a buffer reader and fileinputstream :
Bill
Kenny
Derik
Jame
<b> 1 5 4 3 2
<b> 1 3 4 5 2
<b> 2 1 5 4 3 | 1 |
9,561,317 | 03/05/2012 03:35:43 | 1,241,438 | 02/29/2012 23:06:31 | 1 | 0 | html input popup calender issue | I am trying to pop a calender control when a user clicks on an input field. Te calender control i actually a div section for calender which i am trying to toggle the display. The code is given below. The issue is when i click on the input the calender does not show up. But the catch is, when i change the position property of input from relative to fixed, then the calenders shows up but relative to the browser. I want it to be displayed relative to the input field.
<script>
function showCalender(startDate)
{
try{
//var inputElement = document.getElementById(startDate);
var inputElement = document.getElementsByName(startDate)[0];
var divCalender = document.getElementById('calendar');
var divContent = document.getElementById('content');
if(divCalender.style.display == 'block')
{
divContent.appendChild(divCalender);
//inputElement.style.position='fixed';
//divCalender.style.position='fixed';
divCalender.style.display = 'none';
//divCalender.style.zindex = 0;
}
else
{
divCalender.parentNode.removeChild(divCalender);
inputElement.appendChild(divCalender);
inputElement.style.position='relative';
divCalender.style.position='absolute';
divCalender.style.top=30;
divCalender.style.left=30;
//divCalender.style.zindex = 100;
divCalender.style.display = 'block';
}
}
catch(e)
{
alert(e);
}
}
</script>
<body>
<table id="bookingTable">
<tr>
<th colspan="4">Book Rentals</th>
</tr>
<tr>
<th colspan="4"><%=fileService.title%></th>
</tr>
<tr>
<td style="text-align:right;">Start Date</td>
<td style="text-align:left;">
<input style="cursor:pointer;" type="text" name="startDate" value="" onclick="showCalender('startDate')">
</td>
<td style="text-align:right;">Start Time</td>
<td style="text-align:left;"><input type="text" name="startTime" value=""></td>
</tr>
<tr>
<td style="text-align:right;">End Date</td>
<td style="text-align:left;">
<input style="cursor:pointer;" type="text" name="endDate" value="" onclick="showCalender('endDate')">
</td>
<td style="text-align:right;">End Time</td>
<td style="text-align:left;"><input type="text" name="endTime" value=""></td>
</tr>
<tr>
<td colspan="4" style="text-align: center;"><input
type="submit" class="button" name="submit" value="Add" /></td>
</tr>
</table>
<div id="calendar" style="display: none;">
Here is create a table dynamically which represent a calender and which i am trying to toggle the display.
</div>
| javascript | html | null | null | null | null | open | html input popup calender issue
===
I am trying to pop a calender control when a user clicks on an input field. Te calender control i actually a div section for calender which i am trying to toggle the display. The code is given below. The issue is when i click on the input the calender does not show up. But the catch is, when i change the position property of input from relative to fixed, then the calenders shows up but relative to the browser. I want it to be displayed relative to the input field.
<script>
function showCalender(startDate)
{
try{
//var inputElement = document.getElementById(startDate);
var inputElement = document.getElementsByName(startDate)[0];
var divCalender = document.getElementById('calendar');
var divContent = document.getElementById('content');
if(divCalender.style.display == 'block')
{
divContent.appendChild(divCalender);
//inputElement.style.position='fixed';
//divCalender.style.position='fixed';
divCalender.style.display = 'none';
//divCalender.style.zindex = 0;
}
else
{
divCalender.parentNode.removeChild(divCalender);
inputElement.appendChild(divCalender);
inputElement.style.position='relative';
divCalender.style.position='absolute';
divCalender.style.top=30;
divCalender.style.left=30;
//divCalender.style.zindex = 100;
divCalender.style.display = 'block';
}
}
catch(e)
{
alert(e);
}
}
</script>
<body>
<table id="bookingTable">
<tr>
<th colspan="4">Book Rentals</th>
</tr>
<tr>
<th colspan="4"><%=fileService.title%></th>
</tr>
<tr>
<td style="text-align:right;">Start Date</td>
<td style="text-align:left;">
<input style="cursor:pointer;" type="text" name="startDate" value="" onclick="showCalender('startDate')">
</td>
<td style="text-align:right;">Start Time</td>
<td style="text-align:left;"><input type="text" name="startTime" value=""></td>
</tr>
<tr>
<td style="text-align:right;">End Date</td>
<td style="text-align:left;">
<input style="cursor:pointer;" type="text" name="endDate" value="" onclick="showCalender('endDate')">
</td>
<td style="text-align:right;">End Time</td>
<td style="text-align:left;"><input type="text" name="endTime" value=""></td>
</tr>
<tr>
<td colspan="4" style="text-align: center;"><input
type="submit" class="button" name="submit" value="Add" /></td>
</tr>
</table>
<div id="calendar" style="display: none;">
Here is create a table dynamically which represent a calender and which i am trying to toggle the display.
</div>
| 0 |
11,581,635 | 07/20/2012 14:45:34 | 578,871 | 01/17/2011 17:44:32 | 89 | 7 | Inserting a record to mysql using jquery | I want to use a cloned div that contains a form to insert a record to the database using this code
$(document).ready(function() {
//dom insert start
$("#button").click(function () {
$("<div class='newclone' id='xxx'><article><form method='post' id='aj'><input type='checkbox'><label>Firstname</label><input type='text' value='' name='firstname'><label>Secondname</label><input type='text' value='' name='secondname'><label>City</label><input type='text' value='' name='city'><input type='hidden' value='4'></article><input type='submit' value='insert' class='one'><button class='two'>Delete</button><button class='three'>Cancel</button></form></div>").appendTo('.clone-container');
});//dom insert end
//ajax function start
$('.one').click(function () {
$.ajax({
type: "POST",
url: "insert.php",
data: $("#aj").serialize(),
success: function(){
alert('Inserted!');
}
});
});
//ajax function end
});
This is the php file
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("clone", $con);
$firstname=$_POST['firstname'];
$secondname=$_POST['secondname'];
$city=$_POST['city'];
mysql_query("INSERT INTO clone(firstname,secondname,city) VALUES ('$firstname','$secondname','$city')");
edit
the problem is that there seem to be nothing posted | php | jquery | null | null | null | null | open | Inserting a record to mysql using jquery
===
I want to use a cloned div that contains a form to insert a record to the database using this code
$(document).ready(function() {
//dom insert start
$("#button").click(function () {
$("<div class='newclone' id='xxx'><article><form method='post' id='aj'><input type='checkbox'><label>Firstname</label><input type='text' value='' name='firstname'><label>Secondname</label><input type='text' value='' name='secondname'><label>City</label><input type='text' value='' name='city'><input type='hidden' value='4'></article><input type='submit' value='insert' class='one'><button class='two'>Delete</button><button class='three'>Cancel</button></form></div>").appendTo('.clone-container');
});//dom insert end
//ajax function start
$('.one').click(function () {
$.ajax({
type: "POST",
url: "insert.php",
data: $("#aj").serialize(),
success: function(){
alert('Inserted!');
}
});
});
//ajax function end
});
This is the php file
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("clone", $con);
$firstname=$_POST['firstname'];
$secondname=$_POST['secondname'];
$city=$_POST['city'];
mysql_query("INSERT INTO clone(firstname,secondname,city) VALUES ('$firstname','$secondname','$city')");
edit
the problem is that there seem to be nothing posted | 0 |
11,645,686 | 07/25/2012 08:32:48 | 1,550,965 | 07/25/2012 08:21:02 | 1 | 0 | Link Formating in Internet Explorer | I have launched a webpage for a school organization and I developed it primarily for Chrome. It looks fine in Safari and Firefox, however in Internet explorer the links on the contact page are displyed one word at a time instead of as the full title. Any suggestions on how to correct this?
An example of the problem:
In chrome : <pre> "Welcome to Ebay"
"The Atlanta Journal Constitution"</pre>
In Internet Explorer : <pre> "Welcome
to
Ebay"
"The
Atlanta
Journal
Constitution"</pre>
| html | css | internet-explorer | formatting | links | 07/26/2012 20:45:56 | not a real question | Link Formating in Internet Explorer
===
I have launched a webpage for a school organization and I developed it primarily for Chrome. It looks fine in Safari and Firefox, however in Internet explorer the links on the contact page are displyed one word at a time instead of as the full title. Any suggestions on how to correct this?
An example of the problem:
In chrome : <pre> "Welcome to Ebay"
"The Atlanta Journal Constitution"</pre>
In Internet Explorer : <pre> "Welcome
to
Ebay"
"The
Atlanta
Journal
Constitution"</pre>
| 1 |
2,811,104 | 05/11/2010 13:34:24 | 315,478 | 04/13/2010 12:52:56 | 16 | 0 | Container item implementation | I am working in Train Traffic Controller software project.
My responsibility in this project is to develop the visual railroad GUI.
We are implementing the project with Qt.
By now I am using [QGraphicsLinearLayout][1] to hold my items.
I am using the layout because I do not want to calculate coordinates of each item.
So far I wrote item classes to add the layout. For instance SwitchItem class symbolizes
railroad switch in real world. Each item class is responsible for its own painting and events.
So far so good.<br/>
Now I need a composite item that can contain two or more item. This class is going to be responsible for painting the items contained in it. I need this class because I have to put two or more items inside same layout cell. If I don' t put them in same cell I can' t use layout. See the image below. <br/>
![Composite Item][2] BlockSegmentItem and SignalItem inside same cell.
Here is my compositeitem implementation.<br/>
#include "compositeitem.h"
CompositeItem::CompositeItem(QString id,QList<FieldItem *> _children)
{
children = _children;
}
CompositeItem::~CompositeItem()
{
}
QRectF CompositeItem::boundingRect() const
{
//Not carefully thinked about it
return QRectF(QPointF(-50,-150),QSizeF(250,250));
}
void CompositeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget )
{
FieldItem *child;
foreach(child,children)
{
child->paint(painter,option,widget);
}
}
QSizeF CompositeItem::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
{
QSizeF itsSize(0,0);
FieldItem *child;
foreach(child,children)
{
// if its size empty set first child size to itsSize
if(itsSize.isEmpty())
itsSize = child->sizeHint(Qt::PreferredSize);
else
{
QSizeF childSize = child->sizeHint(Qt::PreferredSize);
if(itsSize.width() < childSize.width())
itsSize.setWidth(childSize.width());
itsSize.setHeight(itsSize.height() + childSize.height());
}
}
return itsSize;
}
void CompositeItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
{
qDebug()<<"Test";
}
This code works good with painting but when it comes to item events it is problematic.
[QGraphicsScene][3] treats the composite item like a single item which is right for layout but not for events. Because each item has its own event implementation.(e.g. SignalItem has its special context menu event.)
I have to handle item events seperately. Also I need a composite item implementation for the layout. How can I overcome this dilemma?
[1]: http://doc.trolltech.com/4.4/qgraphicslinearlayout.html
[2]: http://img169.imageshack.us/img169/9079/composite1.jpg
[3]: http://doc.trolltech.com/4.2/qgraphicsscene.html | qgraphicsview | c++ | implementation | qgraphicsitem | qt | null | open | Container item implementation
===
I am working in Train Traffic Controller software project.
My responsibility in this project is to develop the visual railroad GUI.
We are implementing the project with Qt.
By now I am using [QGraphicsLinearLayout][1] to hold my items.
I am using the layout because I do not want to calculate coordinates of each item.
So far I wrote item classes to add the layout. For instance SwitchItem class symbolizes
railroad switch in real world. Each item class is responsible for its own painting and events.
So far so good.<br/>
Now I need a composite item that can contain two or more item. This class is going to be responsible for painting the items contained in it. I need this class because I have to put two or more items inside same layout cell. If I don' t put them in same cell I can' t use layout. See the image below. <br/>
![Composite Item][2] BlockSegmentItem and SignalItem inside same cell.
Here is my compositeitem implementation.<br/>
#include "compositeitem.h"
CompositeItem::CompositeItem(QString id,QList<FieldItem *> _children)
{
children = _children;
}
CompositeItem::~CompositeItem()
{
}
QRectF CompositeItem::boundingRect() const
{
//Not carefully thinked about it
return QRectF(QPointF(-50,-150),QSizeF(250,250));
}
void CompositeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget )
{
FieldItem *child;
foreach(child,children)
{
child->paint(painter,option,widget);
}
}
QSizeF CompositeItem::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
{
QSizeF itsSize(0,0);
FieldItem *child;
foreach(child,children)
{
// if its size empty set first child size to itsSize
if(itsSize.isEmpty())
itsSize = child->sizeHint(Qt::PreferredSize);
else
{
QSizeF childSize = child->sizeHint(Qt::PreferredSize);
if(itsSize.width() < childSize.width())
itsSize.setWidth(childSize.width());
itsSize.setHeight(itsSize.height() + childSize.height());
}
}
return itsSize;
}
void CompositeItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
{
qDebug()<<"Test";
}
This code works good with painting but when it comes to item events it is problematic.
[QGraphicsScene][3] treats the composite item like a single item which is right for layout but not for events. Because each item has its own event implementation.(e.g. SignalItem has its special context menu event.)
I have to handle item events seperately. Also I need a composite item implementation for the layout. How can I overcome this dilemma?
[1]: http://doc.trolltech.com/4.4/qgraphicslinearlayout.html
[2]: http://img169.imageshack.us/img169/9079/composite1.jpg
[3]: http://doc.trolltech.com/4.2/qgraphicsscene.html | 0 |
750,719 | 04/15/2009 08:02:11 | 69,362 | 02/21/2009 17:00:37 | 3 | 1 | Entity Sql for a Many to Many relationship | Consider two tables Bill and Product with a many to many relationship. How do you get all the bills for a particular product using Entity Sql? | entity-framework | linq-to-entities | esql | ado.net-entity-data-model | null | null | open | Entity Sql for a Many to Many relationship
===
Consider two tables Bill and Product with a many to many relationship. How do you get all the bills for a particular product using Entity Sql? | 0 |
9,813,636 | 03/21/2012 22:11:13 | 351,975 | 05/27/2010 12:56:41 | 36 | 4 | CLR managed threads: lightweight vs heavy process | I'm working on an application that process pipelines in separate threads. During my tests I have seen that if a process is "lightweight" or the CLR determines that this is going to end quickly CLR recycle this thread rapidly and various units of work can share at the same time the same thread.
On the contrary if a process take's some time or has more load CLR open different threads.
To me all that difficult [TLS Thread local storage](http://en.wikipedia.org/wiki/Thread-local_storage) programming.
In fact my application pipelines take some time to process and it seems that CLR is always assigning one managed thread for each other. BTW if in some case two pipelines share one managed thread they will collide because they use TLS variables.
After all that here comes the real question... Can I do the assumption that If a process takes some time/load it will always use it's own thread, or am I crazy doing that?
For what I have been reading managed threads in .net 3.5 is like acting with a kind of black box. So perhaps this question can never really be responded.
| c# | .net | multithreading | threadpool | null | null | open | CLR managed threads: lightweight vs heavy process
===
I'm working on an application that process pipelines in separate threads. During my tests I have seen that if a process is "lightweight" or the CLR determines that this is going to end quickly CLR recycle this thread rapidly and various units of work can share at the same time the same thread.
On the contrary if a process take's some time or has more load CLR open different threads.
To me all that difficult [TLS Thread local storage](http://en.wikipedia.org/wiki/Thread-local_storage) programming.
In fact my application pipelines take some time to process and it seems that CLR is always assigning one managed thread for each other. BTW if in some case two pipelines share one managed thread they will collide because they use TLS variables.
After all that here comes the real question... Can I do the assumption that If a process takes some time/load it will always use it's own thread, or am I crazy doing that?
For what I have been reading managed threads in .net 3.5 is like acting with a kind of black box. So perhaps this question can never really be responded.
| 0 |
11,453,953 | 07/12/2012 14:23:20 | 1,120,145 | 12/28/2011 22:52:49 | 735 | 69 | How to simplify multiple mouseover and mouseout functions? | Sorry if my title isn't very clear. I wasn't sure what I should post this as. So here is the issue...
I have this jQuery Code.
$('.remove').eq(0).mouseover(function(){
$('.tooltip').eq(0).show();
});
$('.remove').eq(0).mouseout(function(){
$('.tooltip').eq(0).hide();
});
$('.remove').eq(1).mouseover(function(){
$('.tooltip').eq(1).show();
});
$('.remove').eq(1).mouseout(function(){
$('.tooltip').eq(1).hide();
});
What I am trying to do is hide and show tooltips depending on what element is hovered over. This works as expected and I could continue to rinse and repeat. However I am wondering if there is a good way to simplify this or make it more compact. Also I was assuming I could use `.hover()`, but that didn't seem to work for me. So instead I am using mouseover and mouseout. Thanks for your help.
-Kris | jquery | null | null | null | null | 07/12/2012 16:05:26 | off topic | How to simplify multiple mouseover and mouseout functions?
===
Sorry if my title isn't very clear. I wasn't sure what I should post this as. So here is the issue...
I have this jQuery Code.
$('.remove').eq(0).mouseover(function(){
$('.tooltip').eq(0).show();
});
$('.remove').eq(0).mouseout(function(){
$('.tooltip').eq(0).hide();
});
$('.remove').eq(1).mouseover(function(){
$('.tooltip').eq(1).show();
});
$('.remove').eq(1).mouseout(function(){
$('.tooltip').eq(1).hide();
});
What I am trying to do is hide and show tooltips depending on what element is hovered over. This works as expected and I could continue to rinse and repeat. However I am wondering if there is a good way to simplify this or make it more compact. Also I was assuming I could use `.hover()`, but that didn't seem to work for me. So instead I am using mouseover and mouseout. Thanks for your help.
-Kris | 2 |
2,043,301 | 01/11/2010 16:49:53 | 27,404 | 10/13/2008 12:40:47 | 209 | 6 | iPhone Core Data does not fetch any data from Sqlite3 | I copied a filled, existing sqlite3-file to my project; it is found (I check that with
- (void)createEditableCopyOfDatabaseIfNeeded {
NSLog(@"Checking if we have to create editable copy of database");
// First, test for existence.
BOOL success;
NSFileManager *fileManager = [NSFileManager defaultManager];
NSError *error;
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *writableDBPath = [documentsDirectory stringByAppendingPathComponent:@"hvw.sqlite"];
success = [fileManager fileExistsAtPath:writableDBPath];
if (success) return;
NSLog(@"Creating editable copy of database");
// The writable database does not exist, so copy the default to the appropriate location.
NSString *defaultDBPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"hvw.sqlite"];
success = [fileManager copyItemAtPath:defaultDBPath toPath:writableDBPath error:&error];
if (!success) {
NSAssert1(0, @"Failed to create writable database file with message '%@'.", [error localizedDescription]);
}
}
I do not come to the "Creating editable copy of database"-part, so the file is there and found.
But my fetch does not return any results:
NSFetchRequest *request = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Game" inManagedObjectContext:managedObjectContext];
[request setEntity:entity];
NSError *error;
NSMutableArray *mutableFetchResults = [[managedObjectContext executeFetchRequest:request error:&error] mutableCopy];
No error is thrown, but the resulting array is empty... | iphone | core-data | sqlite3 | null | null | null | open | iPhone Core Data does not fetch any data from Sqlite3
===
I copied a filled, existing sqlite3-file to my project; it is found (I check that with
- (void)createEditableCopyOfDatabaseIfNeeded {
NSLog(@"Checking if we have to create editable copy of database");
// First, test for existence.
BOOL success;
NSFileManager *fileManager = [NSFileManager defaultManager];
NSError *error;
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *writableDBPath = [documentsDirectory stringByAppendingPathComponent:@"hvw.sqlite"];
success = [fileManager fileExistsAtPath:writableDBPath];
if (success) return;
NSLog(@"Creating editable copy of database");
// The writable database does not exist, so copy the default to the appropriate location.
NSString *defaultDBPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"hvw.sqlite"];
success = [fileManager copyItemAtPath:defaultDBPath toPath:writableDBPath error:&error];
if (!success) {
NSAssert1(0, @"Failed to create writable database file with message '%@'.", [error localizedDescription]);
}
}
I do not come to the "Creating editable copy of database"-part, so the file is there and found.
But my fetch does not return any results:
NSFetchRequest *request = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Game" inManagedObjectContext:managedObjectContext];
[request setEntity:entity];
NSError *error;
NSMutableArray *mutableFetchResults = [[managedObjectContext executeFetchRequest:request error:&error] mutableCopy];
No error is thrown, but the resulting array is empty... | 0 |
9,202,877 | 02/08/2012 22:59:48 | 963,546 | 09/25/2011 11:36:52 | 123 | 6 | how to write comments/documenation for Django methods/classes | I am quite new with Django, and i was wondering if i could document my methods or classes.
In C# you would have somthing like
///
<summary>
this is my method xy
</summary
public void xy(){
}
How do i document or describe methods in Django?
I have seen something like
def xy(self):
""" this is my method xy """
but when i use this in my django code, i get an error.
How can i enable this kind of documentation? And where do i see the documentation? Only IDE with autocompletion or is django collectin all the descriptions of my methods and showing them in a html, placed within my django project? | django | null | null | null | null | null | open | how to write comments/documenation for Django methods/classes
===
I am quite new with Django, and i was wondering if i could document my methods or classes.
In C# you would have somthing like
///
<summary>
this is my method xy
</summary
public void xy(){
}
How do i document or describe methods in Django?
I have seen something like
def xy(self):
""" this is my method xy """
but when i use this in my django code, i get an error.
How can i enable this kind of documentation? And where do i see the documentation? Only IDE with autocompletion or is django collectin all the descriptions of my methods and showing them in a html, placed within my django project? | 0 |
1,482,700 | 09/27/2009 03:06:26 | 50,225 | 12/30/2008 16:44:53 | 247 | 18 | visual studio extensibility - how to add folder to database project? | I'm trying to add a folder to a database project in visual studio 2008. I've found out that database projects don't implement the full EnvDTE.Project interface. Specifically the ProjectItems property is not implemented so I can't do this:
dbProj.ProjectItems.AddFolder("test")
Does anyone know of a workaround? Is there another API available for extending visual studio? | visual-studio | extensibility | null | null | null | null | open | visual studio extensibility - how to add folder to database project?
===
I'm trying to add a folder to a database project in visual studio 2008. I've found out that database projects don't implement the full EnvDTE.Project interface. Specifically the ProjectItems property is not implemented so I can't do this:
dbProj.ProjectItems.AddFolder("test")
Does anyone know of a workaround? Is there another API available for extending visual studio? | 0 |
9,123,820 | 02/03/2012 04:48:39 | 832,866 | 07/07/2011 05:14:07 | -1 | 0 | Android with thread shows error | In the application i called the Thread in the alerdialog click listener.
It shows the Error "Force to close the application" in the Mobile Samsung pro.
but when i execute the same code in the another application then code works correctly... | android | google | thread-safety | null | null | null | open | Android with thread shows error
===
In the application i called the Thread in the alerdialog click listener.
It shows the Error "Force to close the application" in the Mobile Samsung pro.
but when i execute the same code in the another application then code works correctly... | 0 |
5,118,600 | 02/25/2011 14:49:53 | 562,440 | 01/04/2011 11:04:53 | 381 | 56 | How about sending '$this->' to hell? (In PHP) | Pretty much everytime I am coding OO code in PHP I wonder about the syntactical necessity of preluding attributes with $this.
It's not common in C++ nor in Java.
What makes it necassary in PHP? Am I missing something? | php | oop | null | null | null | 02/25/2011 14:55:02 | not a real question | How about sending '$this->' to hell? (In PHP)
===
Pretty much everytime I am coding OO code in PHP I wonder about the syntactical necessity of preluding attributes with $this.
It's not common in C++ nor in Java.
What makes it necassary in PHP? Am I missing something? | 1 |
1,705,709 | 11/10/2009 04:59:39 | 153,557 | 08/10/2009 07:16:04 | 27 | 0 | SQL Server 2008 x64bit Mode | I am attempting to query a SQL 2008 x64 database from a SQL 2008 x64 database. All attempts have failed, whether using Linked Server or OpenQuery. To create the Linked Server entry I have used the linked server dialog, the script it creates and the sp_AddLinkedServer procedure. The error occurs whether I use Windows Authentication or the SQL Authentication with sa user credentials.
In security tab i have selected the remote user name and password
in bottom of the page 4 options available
Not be made
Be made without using security context
Be made using the login's current security context
Be made using security context
i have seleced the "Be made without using security context" this options
It says The login failed
thanks
| sql-server | null | null | null | null | null | open | SQL Server 2008 x64bit Mode
===
I am attempting to query a SQL 2008 x64 database from a SQL 2008 x64 database. All attempts have failed, whether using Linked Server or OpenQuery. To create the Linked Server entry I have used the linked server dialog, the script it creates and the sp_AddLinkedServer procedure. The error occurs whether I use Windows Authentication or the SQL Authentication with sa user credentials.
In security tab i have selected the remote user name and password
in bottom of the page 4 options available
Not be made
Be made without using security context
Be made using the login's current security context
Be made using security context
i have seleced the "Be made without using security context" this options
It says The login failed
thanks
| 0 |
11,572,520 | 07/20/2012 03:38:10 | 1,527,791 | 07/16/2012 02:49:56 | 27 | 0 | PHP - Re-sizing Image | the stated code is to copy images from URL, please let me know how to re-size the image by 250x250.
required size:
width =250
height =250
<?php
file_put_contents('tmp.jpg', file_get_contents('http://static.adzerk.net/Advertisers/3603.jpg'));
?>
regards, | php | null | null | null | null | 07/20/2012 17:12:23 | not constructive | PHP - Re-sizing Image
===
the stated code is to copy images from URL, please let me know how to re-size the image by 250x250.
required size:
width =250
height =250
<?php
file_put_contents('tmp.jpg', file_get_contents('http://static.adzerk.net/Advertisers/3603.jpg'));
?>
regards, | 4 |
4,922,774 | 02/07/2011 15:04:06 | 352,157 | 04/28/2010 15:30:52 | 742 | 35 | share point portal customization | How can I customize share point portal and do it in a way that is easy to create and maintain. Below is a sample of the portal I inherited from someone else who was using images all over. I outlined in red each image. This image method introduces a lot of rigidity and loads of manual labor to make updates and changes.
can this be done using CSS or somethign other than images?
I tried using [this site][1] but i think it falls short and only allows customization of basic share point objects.
As a bonus i would like to see if its possible for each portal in the group that represents a particular project pull project related details like "milestones" from a SQL driven project management system we had home grown. Our team has about 25 projects at any given time.
![enter image description here][2]
[1]: http://sharepointcanvas.com/spc/
[2]: http://i.stack.imgur.com/2deDC.gif | sharepoint | sharepoint2007 | null | null | null | null | open | share point portal customization
===
How can I customize share point portal and do it in a way that is easy to create and maintain. Below is a sample of the portal I inherited from someone else who was using images all over. I outlined in red each image. This image method introduces a lot of rigidity and loads of manual labor to make updates and changes.
can this be done using CSS or somethign other than images?
I tried using [this site][1] but i think it falls short and only allows customization of basic share point objects.
As a bonus i would like to see if its possible for each portal in the group that represents a particular project pull project related details like "milestones" from a SQL driven project management system we had home grown. Our team has about 25 projects at any given time.
![enter image description here][2]
[1]: http://sharepointcanvas.com/spc/
[2]: http://i.stack.imgur.com/2deDC.gif | 0 |
10,333,116 | 04/26/2012 12:11:07 | 487,113 | 10/26/2010 01:38:07 | 355 | 3 | differences between phpthumb and wideimage | i'm just interested in general and specific differences between phpthumb and wideimage (and any other approaches, including the native functions). I would just like to survey the field as much as possible before investing time in a given approach. Give people who have used both a chance to come forward before voting to close. | php | gd | image-manipulation | phpthumb | null | 04/26/2012 12:17:17 | not constructive | differences between phpthumb and wideimage
===
i'm just interested in general and specific differences between phpthumb and wideimage (and any other approaches, including the native functions). I would just like to survey the field as much as possible before investing time in a given approach. Give people who have used both a chance to come forward before voting to close. | 4 |
8,023,035 | 11/05/2011 20:23:45 | 1,024,858 | 11/02/2011 03:01:02 | 10 | 0 | Get value in grails | *Hi all,*
def bid= Book.findAllBy(params.bname)<br>
println(bid.id)<br>
I got the result is [58]<br>
How can i just get the value without quote.<br>
And how can i convert 'bid' to integer<br>
Thanks!!!
| hibernate | grails | null | null | null | null | open | Get value in grails
===
*Hi all,*
def bid= Book.findAllBy(params.bname)<br>
println(bid.id)<br>
I got the result is [58]<br>
How can i just get the value without quote.<br>
And how can i convert 'bid' to integer<br>
Thanks!!!
| 0 |
2,271,338 | 02/16/2010 07:51:19 | 274,157 | 02/16/2010 07:51:19 | 1 | 0 | web browser in C# | How can I create an apps using C# to login to a website automaticlly ? | c# | null | null | null | null | 02/16/2010 08:02:42 | not a real question | web browser in C#
===
How can I create an apps using C# to login to a website automaticlly ? | 1 |
11,678,937 | 07/26/2012 22:25:32 | 751,121 | 05/12/2011 18:30:48 | 91 | 1 | MVC AntiForgeryToken Issues - IE9 and Chrome | We have a real Heisenbug on our hands: we've implemented the MVC 3 AntiForgeryToken technology on our websites and are running into intermittent but extremely frustrating bad request errors. They seem to be mostly on IE9 (less so on Chrome, not on Firefox), and sometimes, but not always, disappear when the user clears their cache and then closes and restarts their browser.
The main coder on this (no longer with the company) did a few non-standard things in the implementation that I'm wondering about:
1) Instead of a [ValidateAntiForgeryToken] attribute decorating each controller method, he put an explicit declaration of the attribute in a base controller class that all our controllers descend from. I'm wondering if that might have something to do with how the tokens get generated.
2) We have the tokens in our AJAX calls which in many cases return entire HTML pages (mostly popups). This results in two or more <form> tags an a page, each with their own verification tokens - which are different from each other as well as from the cookie value that's used to verify. We have included code in our jQuery AJAX calls to include the value of the VerificationToken (see http://stackoverflow.com/questions/1346070/asp-net-mvc-antiforgerytoken-over-ajax). The fact that the pages work most of the time is telling me that the proper hidden token is getting posted to be authorized, but I'd like to know what is going wrong when it doesn't.
I'm trying to put a try-catch block in the verification method that would at least give us the cookie value and the token to see if they both exist. Can anyone think of other values that would be useful in the debugging process? Are there time limits on the tokens - we have had some errors when just sitting on a page for a certain amount of time.
Finally, why would the errors suddenly appear on a production server and nowhere else in the development lifecycle?
Any clues to this would me most helpful.
Thanks
Jim Stanley | ajax | asp.net-mvc-3 | antiforgerytoken | null | null | null | open | MVC AntiForgeryToken Issues - IE9 and Chrome
===
We have a real Heisenbug on our hands: we've implemented the MVC 3 AntiForgeryToken technology on our websites and are running into intermittent but extremely frustrating bad request errors. They seem to be mostly on IE9 (less so on Chrome, not on Firefox), and sometimes, but not always, disappear when the user clears their cache and then closes and restarts their browser.
The main coder on this (no longer with the company) did a few non-standard things in the implementation that I'm wondering about:
1) Instead of a [ValidateAntiForgeryToken] attribute decorating each controller method, he put an explicit declaration of the attribute in a base controller class that all our controllers descend from. I'm wondering if that might have something to do with how the tokens get generated.
2) We have the tokens in our AJAX calls which in many cases return entire HTML pages (mostly popups). This results in two or more <form> tags an a page, each with their own verification tokens - which are different from each other as well as from the cookie value that's used to verify. We have included code in our jQuery AJAX calls to include the value of the VerificationToken (see http://stackoverflow.com/questions/1346070/asp-net-mvc-antiforgerytoken-over-ajax). The fact that the pages work most of the time is telling me that the proper hidden token is getting posted to be authorized, but I'd like to know what is going wrong when it doesn't.
I'm trying to put a try-catch block in the verification method that would at least give us the cookie value and the token to see if they both exist. Can anyone think of other values that would be useful in the debugging process? Are there time limits on the tokens - we have had some errors when just sitting on a page for a certain amount of time.
Finally, why would the errors suddenly appear on a production server and nowhere else in the development lifecycle?
Any clues to this would me most helpful.
Thanks
Jim Stanley | 0 |
6,849,884 | 07/27/2011 19:11:41 | 866,145 | 07/27/2011 19:11:41 | 1 | 0 | Which Python book to choose for absolute beginner? | Is it worth to read "Hello world! Computer programming for kids and other beginners." to learn Python? I have no experience in programming, Python is my first programming language. I tried to read Head First Programming/Learning Python 4th/Head First Python but all of them teaches Python 3. And yes, I know that in older questions was written about Python books but I didn't found any information about "Hello world! Computer programming for kids and other beginners.". I'm so sorry if I missed something. And sorry for my bad English. | python | null | null | null | null | 07/27/2011 19:15:21 | off topic | Which Python book to choose for absolute beginner?
===
Is it worth to read "Hello world! Computer programming for kids and other beginners." to learn Python? I have no experience in programming, Python is my first programming language. I tried to read Head First Programming/Learning Python 4th/Head First Python but all of them teaches Python 3. And yes, I know that in older questions was written about Python books but I didn't found any information about "Hello world! Computer programming for kids and other beginners.". I'm so sorry if I missed something. And sorry for my bad English. | 2 |
5,899,417 | 05/05/2011 14:30:08 | 501,166 | 11/08/2010 21:12:02 | 123 | 21 | Saving images from a WebBrowser Control | The following code runs, but the Bitmap generated is shifted down about half an inch and cutoff at the bottom. I checked the image width and height and it is creating an image of the correct size, just the image contents are shifted down and cutoff. I'm stumped... any ideas?
using mshtml;
using System.Drawing;
using System.Runtime.InteropServices;
[ComImport, InterfaceType((short)1), Guid("3050F669-98B5-11CF-BB82-00AA00BDCE0B")]
private interface IHTMLElementRenderFixed
{
void DrawToDC(IntPtr hdc);
void SetDocumentPrinter(string bstrPrinterName, IntPtr hdc);
}
public Bitmap GetImage(string id)
{
HtmlElement e = webBrowser1.Document.GetElementById(id);
IHTMLImgElement img = (IHTMLImgElement)e.DomElement;
IHTMLElementRenderFixed render = (IHTMLElementRenderFixed)img;
Bitmap bmp = new Bitmap(img.width, img.height);
Graphics g = Graphics.FromImage(bmp);
IntPtr hdc = g.GetHdc();
render.DrawToDC(hdc);
g.ReleaseHdc(hdc);
return bmp;
}
| c# | .net | webbrowser | null | null | null | open | Saving images from a WebBrowser Control
===
The following code runs, but the Bitmap generated is shifted down about half an inch and cutoff at the bottom. I checked the image width and height and it is creating an image of the correct size, just the image contents are shifted down and cutoff. I'm stumped... any ideas?
using mshtml;
using System.Drawing;
using System.Runtime.InteropServices;
[ComImport, InterfaceType((short)1), Guid("3050F669-98B5-11CF-BB82-00AA00BDCE0B")]
private interface IHTMLElementRenderFixed
{
void DrawToDC(IntPtr hdc);
void SetDocumentPrinter(string bstrPrinterName, IntPtr hdc);
}
public Bitmap GetImage(string id)
{
HtmlElement e = webBrowser1.Document.GetElementById(id);
IHTMLImgElement img = (IHTMLImgElement)e.DomElement;
IHTMLElementRenderFixed render = (IHTMLElementRenderFixed)img;
Bitmap bmp = new Bitmap(img.width, img.height);
Graphics g = Graphics.FromImage(bmp);
IntPtr hdc = g.GetHdc();
render.DrawToDC(hdc);
g.ReleaseHdc(hdc);
return bmp;
}
| 0 |
372,652 | 12/16/2008 20:46:18 | 38,626 | 11/18/2008 16:44:24 | 242 | 9 | What are the Ruby Gotchas a newbie should be warned about? | I have recently learned the Ruby programming language, and all in all it is a good language. But I was quite surprised to see that it was not as simple as I had expected. More precisely, the "rule of least-surprise" did not seem very respected to me (of course this is quite subjective). For example:
x = true and false
puts x # displays true!
and the famous:
puts "zero is true!" if 0 # zero is true!
What are the other "Gotchas" you would warn a Ruby newbie about? | ruby | newbie | null | null | null | 04/06/2012 16:53:56 | not constructive | What are the Ruby Gotchas a newbie should be warned about?
===
I have recently learned the Ruby programming language, and all in all it is a good language. But I was quite surprised to see that it was not as simple as I had expected. More precisely, the "rule of least-surprise" did not seem very respected to me (of course this is quite subjective). For example:
x = true and false
puts x # displays true!
and the famous:
puts "zero is true!" if 0 # zero is true!
What are the other "Gotchas" you would warn a Ruby newbie about? | 4 |
5,539,793 | 04/04/2011 14:17:04 | 404,568 | 07/28/2010 13:41:24 | 960 | 38 | Tunnelling TCP over HTTP | For assorted obscure reasons I have a situation where I need to tunnel a TCP connection across an HTTP connection: the local client wants a raw stream to a remote server, but the only way of getting to the remote server is via HTTP.
Note that I **don't** have access to the HTTP CONNECT verb, so I have to use a stream of GET/POST requests for this.
So far I've found software like GNU httptunnel, which almost does what I want but is buggy and rather limited in that it only supports a single tunnel; attempting to communicate with it without tearing down the tunnel first causes problems. And most of the other things I've found all expect CONNECT to work, and so are unsuitable for me.
Can anyone suggest some other software I should look at? Ideally I'd like something that runs as a server rather than bolting on to Apache (because I don't use Apache), but I'm not picky.
For extra points, my client is actually running Java (a really clunky PBP profile), and so I'm going to need an access library. I'm willing to write one, but obviously would rather not... | http | networking | tcp | recommendation | tunneling | 07/27/2011 23:09:55 | off topic | Tunnelling TCP over HTTP
===
For assorted obscure reasons I have a situation where I need to tunnel a TCP connection across an HTTP connection: the local client wants a raw stream to a remote server, but the only way of getting to the remote server is via HTTP.
Note that I **don't** have access to the HTTP CONNECT verb, so I have to use a stream of GET/POST requests for this.
So far I've found software like GNU httptunnel, which almost does what I want but is buggy and rather limited in that it only supports a single tunnel; attempting to communicate with it without tearing down the tunnel first causes problems. And most of the other things I've found all expect CONNECT to work, and so are unsuitable for me.
Can anyone suggest some other software I should look at? Ideally I'd like something that runs as a server rather than bolting on to Apache (because I don't use Apache), but I'm not picky.
For extra points, my client is actually running Java (a really clunky PBP profile), and so I'm going to need an access library. I'm willing to write one, but obviously would rather not... | 2 |
7,123,293 | 08/19/2011 14:44:53 | 114,386 | 05/29/2009 16:09:51 | 340 | 8 | What is causing PGError: ERROR: there is no parameter $1 in my Rails app | ![enter image description here][1]
I started getting this error on edit/show of a Rank object. I've never seen it before and am not sure how to resolve it. Any input?
[1]: http://i.stack.imgur.com/SWaKD.png | sql | ruby-on-rails | ruby-on-rails-3 | postgresql | rails-postgresql | null | open | What is causing PGError: ERROR: there is no parameter $1 in my Rails app
===
![enter image description here][1]
I started getting this error on edit/show of a Rank object. I've never seen it before and am not sure how to resolve it. Any input?
[1]: http://i.stack.imgur.com/SWaKD.png | 0 |
2,741,399 | 04/29/2010 23:28:28 | 15,721 | 09/17/2008 12:11:54 | 8,838 | 386 | Python: pyximporting a pyx that depends on a native library | My pyx depends upon a native library
How can I `pyxinstall` it? The auto-build in pyxinstall doesn't know to link with the native library, so the build fails... | python | cython | null | null | null | null | open | Python: pyximporting a pyx that depends on a native library
===
My pyx depends upon a native library
How can I `pyxinstall` it? The auto-build in pyxinstall doesn't know to link with the native library, so the build fails... | 0 |
10,080,645 | 04/09/2012 22:23:50 | 1,322,801 | 04/09/2012 22:03:36 | 1 | 0 | issues with splitting the screen using LinearLayout | I have encountered an issue while splitting the screen using a linearLayout,
My target is to split it into 9 Pisces -
When I started playing with the LinearLayout I have came to the following result:
http://imageshack.us/photo/my-images/4/firstna.png/
with the following xml code:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:baselineAligned="false">
<FrameLayout
android:gravity="center_horizontal"
android:background="#aa0000"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="1">
</FrameLayout>
<FrameLayout
android:gravity="center_horizontal"
android:background="#00aa00"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="4"/>
<FrameLayout
android:gravity="center_horizontal"
android:background="#aaaa00"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="1"/>
</LinearLayout>
</LinearLayout>
later on when I tried to add content to the left FrameLayout it changed the ratio of this FrameLayout (which Is the problem..):
http://imageshack.us/photo/my-images/692/secondp.png/
using the following code:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:baselineAligned="false">
<FrameLayout
android:gravity="center_horizontal"
android:background="#aa0000"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="1">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1">
<TextView
android:text="row one"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<TextView
android:text="row two"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<TextView
android:text="row three"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<TextView
android:text="row four"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</LinearLayout>
</FrameLayout>
<FrameLayout
android:gravity="center_horizontal"
android:background="#00aa00"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="4"/>
<FrameLayout
android:gravity="center_horizontal"
android:background="#aaaa00"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="1"/>
</LinearLayout>
</LinearLayout>
I would like to have the ability to control the layouts just with the layout_weight attribute - if adding content to the FrameLayout changes its ratio I would need your help finding another container that the ratio will be saved in.
Thanks. | android | android-layout | null | null | null | null | open | issues with splitting the screen using LinearLayout
===
I have encountered an issue while splitting the screen using a linearLayout,
My target is to split it into 9 Pisces -
When I started playing with the LinearLayout I have came to the following result:
http://imageshack.us/photo/my-images/4/firstna.png/
with the following xml code:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:baselineAligned="false">
<FrameLayout
android:gravity="center_horizontal"
android:background="#aa0000"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="1">
</FrameLayout>
<FrameLayout
android:gravity="center_horizontal"
android:background="#00aa00"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="4"/>
<FrameLayout
android:gravity="center_horizontal"
android:background="#aaaa00"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="1"/>
</LinearLayout>
</LinearLayout>
later on when I tried to add content to the left FrameLayout it changed the ratio of this FrameLayout (which Is the problem..):
http://imageshack.us/photo/my-images/692/secondp.png/
using the following code:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:baselineAligned="false">
<FrameLayout
android:gravity="center_horizontal"
android:background="#aa0000"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="1">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1">
<TextView
android:text="row one"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<TextView
android:text="row two"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<TextView
android:text="row three"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<TextView
android:text="row four"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</LinearLayout>
</FrameLayout>
<FrameLayout
android:gravity="center_horizontal"
android:background="#00aa00"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="4"/>
<FrameLayout
android:gravity="center_horizontal"
android:background="#aaaa00"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="1"/>
</LinearLayout>
</LinearLayout>
I would like to have the ability to control the layouts just with the layout_weight attribute - if adding content to the FrameLayout changes its ratio I would need your help finding another container that the ratio will be saved in.
Thanks. | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.