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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8,321,149 | 11/30/2011 04:26:41 | 478,018 | 10/16/2010 16:21:22 | 53 | 3 | How to increase/decrease the space between the text and play button | Here's a sample code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Yahoo! Media Player</title>
</head>
<body>
<a href="http://www.example.com/song.mp3">Song Title</a>
<script type="text/javascript" src="http://mediaplayer.yahoo.com/js"></script>
</body>
</html>
Many thanks in advance!
Mike | css | null | null | null | null | 11/30/2011 05:20:24 | too localized | How to increase/decrease the space between the text and play button
===
Here's a sample code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Yahoo! Media Player</title>
</head>
<body>
<a href="http://www.example.com/song.mp3">Song Title</a>
<script type="text/javascript" src="http://mediaplayer.yahoo.com/js"></script>
</body>
</html>
Many thanks in advance!
Mike | 3 |
2,406,111 | 03/09/2010 01:46:13 | 289,295 | 03/09/2010 01:46:13 | 1 | 0 | Using .NET C#, I need to create a simple program that responds whenever it picks up any sound from the microphone input. | I am trying to create a program that will sit and wait until it picks up on any sound (i.e. a doorbell), and in response, triggers an event function that I can use to run some code.
My exact goal is to have it run wmplayer playing a sound of a dog barking whenever it picks up something as loud as a doorbell from the microphone input.
Thanks!
--David | .net | c# | audio | null | null | 03/11/2010 15:40:10 | not a real question | Using .NET C#, I need to create a simple program that responds whenever it picks up any sound from the microphone input.
===
I am trying to create a program that will sit and wait until it picks up on any sound (i.e. a doorbell), and in response, triggers an event function that I can use to run some code.
My exact goal is to have it run wmplayer playing a sound of a dog barking whenever it picks up something as loud as a doorbell from the microphone input.
Thanks!
--David | 1 |
2,709,064 | 04/25/2010 17:05:18 | 325,468 | 04/25/2010 17:05:18 | 1 | 0 | Setting the vim color theme for highlighted braces | How do you change the vim color scheme for highlighted braces? I'm looking to actually edit the .vim theme file to make the change permanent.
Regards,
Craig | python | vim | null | null | null | null | open | Setting the vim color theme for highlighted braces
===
How do you change the vim color scheme for highlighted braces? I'm looking to actually edit the .vim theme file to make the change permanent.
Regards,
Craig | 0 |
3,073,745 | 06/18/2010 23:53:14 | 4,227 | 09/02/2008 13:08:22 | 1,793 | 159 | hierarchical statecharts designer with code generation | What is the best free and the best commercial tool that lets me draw uml hierarchical statechats like in the picture below. It would also be cool if it could generate the c# source code stubs.
![alt text][1]
[1]: http://www.netrino.com/images/articles/IntroHierarchicalStateMachines02UmlStateDiagram.gif | c# | uml | designer | statechart | null | 06/17/2012 14:41:40 | not constructive | hierarchical statecharts designer with code generation
===
What is the best free and the best commercial tool that lets me draw uml hierarchical statechats like in the picture below. It would also be cool if it could generate the c# source code stubs.
![alt text][1]
[1]: http://www.netrino.com/images/articles/IntroHierarchicalStateMachines02UmlStateDiagram.gif | 4 |
6,691,363 | 07/14/2011 09:54:32 | 102,588 | 05/07/2009 02:12:20 | 314 | 6 | How to Generate a new GUID from a given GUID in C# or T-Sql? | I want to copy a sqlserver table rows and insert into this table self ,this table have this fields:
Id :uniqueidentifier
ParentId: uniqueidentifier
Name: varchar(50)
Sort: float
UserId: uniqueidentifier
Id and ParentId Existing relationships.
I came up with a solution:
Insert into table1 (Id, ParentId,Name,Sort)
Select dbo.gen(id,1) as id, dbo.gen(ParentId,1,Sort) as ParentId ,Name from table1
where UserId='XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'
the gen function is method that Generate a new GUID from a given GUID
follow is a C# description:
public Guid GenerateNewGuid(Guid from,int seed)
{
return .....
}
please help me how can i do?
Regards.
Jim
| c# | sql | guid | uniqueidentifier | null | 07/14/2011 13:38:38 | not a real question | How to Generate a new GUID from a given GUID in C# or T-Sql?
===
I want to copy a sqlserver table rows and insert into this table self ,this table have this fields:
Id :uniqueidentifier
ParentId: uniqueidentifier
Name: varchar(50)
Sort: float
UserId: uniqueidentifier
Id and ParentId Existing relationships.
I came up with a solution:
Insert into table1 (Id, ParentId,Name,Sort)
Select dbo.gen(id,1) as id, dbo.gen(ParentId,1,Sort) as ParentId ,Name from table1
where UserId='XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'
the gen function is method that Generate a new GUID from a given GUID
follow is a C# description:
public Guid GenerateNewGuid(Guid from,int seed)
{
return .....
}
please help me how can i do?
Regards.
Jim
| 1 |
2,979,603 | 06/05/2010 07:48:53 | 102,441 | 05/06/2009 19:45:03 | 2,337 | 141 | How can I strip line breaks from my XML with XSLT? | I have this XSLT:
<xsl:strip-space elements="*" />
<xsl:template match="math">
<img class="math">
<xsl:attribute name="src">http://latex.codecogs.com/gif.latex?<xsl:value-of
select="text()" /></xsl:attribute>
</img>
</xsl:template>
Which is being applied to this XML (notice the line break):
<math>\text{average} = \alpha \times \text{data} + (1-\alpha) \times
\text{average}</math>
Unfortunately, the transform creates this:
<img
class="math"
src="http://latex.codecogs.com/gif.latex?\text{average} = \alpha \times \text{data} + (1-\alpha) \times 					\text{average}" />
Notice the whitespace character literals. Although it works, it's awfully messy. How can I prevent this?
| xml | xslt | whitespace | null | null | null | open | How can I strip line breaks from my XML with XSLT?
===
I have this XSLT:
<xsl:strip-space elements="*" />
<xsl:template match="math">
<img class="math">
<xsl:attribute name="src">http://latex.codecogs.com/gif.latex?<xsl:value-of
select="text()" /></xsl:attribute>
</img>
</xsl:template>
Which is being applied to this XML (notice the line break):
<math>\text{average} = \alpha \times \text{data} + (1-\alpha) \times
\text{average}</math>
Unfortunately, the transform creates this:
<img
class="math"
src="http://latex.codecogs.com/gif.latex?\text{average} = \alpha \times \text{data} + (1-\alpha) \times 					\text{average}" />
Notice the whitespace character literals. Although it works, it's awfully messy. How can I prevent this?
| 0 |
7,206,752 | 08/26/2011 15:06:05 | 839,280 | 07/11/2011 16:29:04 | 135 | 1 | How to use AST in our own C program? | We are about to write dead-code remover in C.
For that we have to use AST.
**We doesn't know**, how
AST parse the C file,and **how to retrieve those tokens in our dead-code remover.**
We came to know **CLANG** library does this but **we need a practical examples in C that implements AST**.
Does we can include this CLANG libraries in Windows based compiler like Dev-c++? | c | parsing | clang | ast | code-examples | 08/26/2011 18:41:34 | not a real question | How to use AST in our own C program?
===
We are about to write dead-code remover in C.
For that we have to use AST.
**We doesn't know**, how
AST parse the C file,and **how to retrieve those tokens in our dead-code remover.**
We came to know **CLANG** library does this but **we need a practical examples in C that implements AST**.
Does we can include this CLANG libraries in Windows based compiler like Dev-c++? | 1 |
7,686,494 | 10/07/2011 11:16:03 | 874,647 | 08/02/2011 12:53:48 | 1 | 0 | Software Testing approach | I would like to know what in your opinion should be included in approach and recommendation on testing for existing issues and planned activities ( as a part of the software strategy ). Thank You | unit-testing | testing | functional-testing | null | null | 10/07/2011 15:05:24 | not a real question | Software Testing approach
===
I would like to know what in your opinion should be included in approach and recommendation on testing for existing issues and planned activities ( as a part of the software strategy ). Thank You | 1 |
3,919,903 | 10/12/2010 23:54:27 | 371,077 | 06/19/2010 15:51:42 | 3 | 2 | Android Listview Items not redrawn when they scroll off the screen in Froyo | I have a listview that when scrolled and the items go off of the screen they are not redrawn when I scroll back to them (the text and checkbox). In fact, items that are off the bottom of the screen in the listview never get drawn when scrolling to them. This only happens in Froyo. Any other version it works just fine. I have checked and the data is there as expected in the adapter when the getItem method is called, it is just not visible. The listview item is there (it's occupying the same amount of screen space per item), I just cannot see the text or checkbox once scrolled off screen and back on again.
My code is such:
for (checklist cl : checkLists) {
ArrayList<checklistItem> ChecklistItems = database.getChecklistItems(cl.getId());
ListView lv = new ListView(this);
lv.setScrollingCacheEnabled(true);
lv.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
la = new checklistItemAdapter(this, layoutItem, ChecklistItems);
la.setActivity(this);
lv.setAdapter(la);
TextView tv = new TextView(this);
tv.setText(cl.getItemText());
tv.setGravity(1);
tv.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, 50));
tv.setBackgroundColor(Color.BLUE);
tv.setTextSize(28);
tv.setTextScaleX(2);
tv.setTypeface(Typeface.DEFAULT_BOLD);
tv.setTypeface(Typeface.SANS_SERIF);
layoutChecklist = new LinearLayout(this);
layoutChecklist.setOrientation(1);
layoutChecklist.addView(tv);
layoutChecklist.addView(lv);
layoutChecklists.addView(layoutChecklist);
} | android | listview | froyo | null | null | null | open | Android Listview Items not redrawn when they scroll off the screen in Froyo
===
I have a listview that when scrolled and the items go off of the screen they are not redrawn when I scroll back to them (the text and checkbox). In fact, items that are off the bottom of the screen in the listview never get drawn when scrolling to them. This only happens in Froyo. Any other version it works just fine. I have checked and the data is there as expected in the adapter when the getItem method is called, it is just not visible. The listview item is there (it's occupying the same amount of screen space per item), I just cannot see the text or checkbox once scrolled off screen and back on again.
My code is such:
for (checklist cl : checkLists) {
ArrayList<checklistItem> ChecklistItems = database.getChecklistItems(cl.getId());
ListView lv = new ListView(this);
lv.setScrollingCacheEnabled(true);
lv.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
la = new checklistItemAdapter(this, layoutItem, ChecklistItems);
la.setActivity(this);
lv.setAdapter(la);
TextView tv = new TextView(this);
tv.setText(cl.getItemText());
tv.setGravity(1);
tv.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, 50));
tv.setBackgroundColor(Color.BLUE);
tv.setTextSize(28);
tv.setTextScaleX(2);
tv.setTypeface(Typeface.DEFAULT_BOLD);
tv.setTypeface(Typeface.SANS_SERIF);
layoutChecklist = new LinearLayout(this);
layoutChecklist.setOrientation(1);
layoutChecklist.addView(tv);
layoutChecklist.addView(lv);
layoutChecklists.addView(layoutChecklist);
} | 0 |
9,061,140 | 01/30/2012 08:27:38 | 992,947 | 10/13/2011 07:43:55 | 56 | 0 | image and video brouwser for local intranet? | Hi I would like to make my own browser application for a home intranet which allows me to search the local network for media like photos or videos and displays thumbnails of the image on a results page (just like Googel only I want to have the feature in a browser I’m building to suit my situation).
I use VB.NET to create the brouwser
How can this be done?
| vb.net | image | browser | intranet | null | 01/31/2012 15:35:03 | not a real question | image and video brouwser for local intranet?
===
Hi I would like to make my own browser application for a home intranet which allows me to search the local network for media like photos or videos and displays thumbnails of the image on a results page (just like Googel only I want to have the feature in a browser I’m building to suit my situation).
I use VB.NET to create the brouwser
How can this be done?
| 1 |
11,691,963 | 07/27/2012 16:32:50 | 1,433,900 | 06/03/2012 18:51:19 | 23 | 0 | Having trouble in removing extra or special chars from a string using javascript | I have a function for removing extra or special chars:
function escapeHtml(unsafe) {
return unsafe
.replace(/\r?\n|\r/g, "")
.replace(/(\r\n|\n|\r)/gm," ")
.replace(/\s+/g," ")
.replace(/&/g, "&")
.replace(/</g, "<")
.replace(/>/g, ">")
.replace(/"/g, """)
.replace(/'/g, "'")
.replace(/!/g, "");
}
While I am calling it and this part of my code looks like:
$(".product_json", data).each(function(){
var thisH = $(this).html();
var myNewString = eval( '('+ thisH +')');
var toBeEscaped = myNewString.item_description;
var escapedString = escapeHtml(toBeEscaped);
myNewString.item_description = escapedString;
myNewString = JSON.stringify(myNewString);
console.log(myNewString);
//product_json.push( jQuery.parseJSON( myNewString ) );
});
But some how it says in console: [SyntaxError: unterminated string literal][1]
[1]: http://bit.ly/Mpy8gy | javascript | jquery | json | string | eval | 07/27/2012 16:54:23 | too localized | Having trouble in removing extra or special chars from a string using javascript
===
I have a function for removing extra or special chars:
function escapeHtml(unsafe) {
return unsafe
.replace(/\r?\n|\r/g, "")
.replace(/(\r\n|\n|\r)/gm," ")
.replace(/\s+/g," ")
.replace(/&/g, "&")
.replace(/</g, "<")
.replace(/>/g, ">")
.replace(/"/g, """)
.replace(/'/g, "'")
.replace(/!/g, "");
}
While I am calling it and this part of my code looks like:
$(".product_json", data).each(function(){
var thisH = $(this).html();
var myNewString = eval( '('+ thisH +')');
var toBeEscaped = myNewString.item_description;
var escapedString = escapeHtml(toBeEscaped);
myNewString.item_description = escapedString;
myNewString = JSON.stringify(myNewString);
console.log(myNewString);
//product_json.push( jQuery.parseJSON( myNewString ) );
});
But some how it says in console: [SyntaxError: unterminated string literal][1]
[1]: http://bit.ly/Mpy8gy | 3 |
8,060,469 | 11/09/2011 04:50:30 | 834,764 | 07/08/2011 05:03:33 | 128 | 1 | Who should own wordpress/drupal files on my webserver? | I have a Centos server running apache, php, and pure-ftp.
I have 2 sites (domains) through apache, one of them wordpress and one of them drupal. I uploaded them using my ftp account as user "ftpuser" and group "ftpgroup". Apache is running as user "apache" and php the same (apache).
I have not changes the file permissions for anything, but I did realize that I needed to supply FTP credentials for both wordpress and drupal when downloading modules, which i didn't have to do when I had everything set to 777 permissions (a long time ago, before I knew about permissions)
What user and groups should the files have. I know that directories should be 755 (or 775?) and files should be 644 (or 664?). But what user/groups should they be under? | wordpress | drupal | file-permissions | null | null | 11/09/2011 09:51:16 | off topic | Who should own wordpress/drupal files on my webserver?
===
I have a Centos server running apache, php, and pure-ftp.
I have 2 sites (domains) through apache, one of them wordpress and one of them drupal. I uploaded them using my ftp account as user "ftpuser" and group "ftpgroup". Apache is running as user "apache" and php the same (apache).
I have not changes the file permissions for anything, but I did realize that I needed to supply FTP credentials for both wordpress and drupal when downloading modules, which i didn't have to do when I had everything set to 777 permissions (a long time ago, before I knew about permissions)
What user and groups should the files have. I know that directories should be 755 (or 775?) and files should be 644 (or 664?). But what user/groups should they be under? | 2 |
7,648,320 | 10/04/2011 13:02:59 | 815,395 | 06/25/2011 14:15:58 | 1 | 0 | VIM, recognize .pyp as a python file | I'm doing some plugin programming for cinema 4d in python and decided to man up and start using a *real* code editor, VIM. followed the instructions on this page:
http://sontek.net/turning-vim-into-a-modern-python-ide
my question is what changes do i have to make to the .vimrc file to get vim to recognize cinema 4d python files, they have a .pyp suffix. I'm sure this is an easy fix, but i'm just starting out on vim and would sure appreciate a leg up here. | python | vim | cinema-4d | null | null | null | open | VIM, recognize .pyp as a python file
===
I'm doing some plugin programming for cinema 4d in python and decided to man up and start using a *real* code editor, VIM. followed the instructions on this page:
http://sontek.net/turning-vim-into-a-modern-python-ide
my question is what changes do i have to make to the .vimrc file to get vim to recognize cinema 4d python files, they have a .pyp suffix. I'm sure this is an easy fix, but i'm just starting out on vim and would sure appreciate a leg up here. | 0 |
7,012,071 | 08/10/2011 14:03:18 | 888,034 | 08/10/2011 13:59:25 | 1 | 0 | Synchronisation issue between different processes? | Hey there I'm doing my homework and I've already found out some things about synchronisation issues but if anyone could tell me in a little more detail why synchronisation between different processes belonging to the same or different programs is an important task in parallel computing?
Thanks in advance.
| image-processing | synchronization | parallel-processing | issues | null | 08/10/2011 15:06:15 | not a real question | Synchronisation issue between different processes?
===
Hey there I'm doing my homework and I've already found out some things about synchronisation issues but if anyone could tell me in a little more detail why synchronisation between different processes belonging to the same or different programs is an important task in parallel computing?
Thanks in advance.
| 1 |
7,282,065 | 09/02/2011 10:17:58 | 602,488 | 02/04/2011 01:08:22 | 131 | 12 | Hiding products behind a form | I’m building a webshop that sells tires. I think it would be best user-friendly-wise to hide my products behind a search form, where you can select tire dimension, price range etc.
I’ve been told that Google will never submit a form, when crawling a site, so if I “hide” the products by using a form, does Google ever index my products?
If no, how do I best work around this? I’ve been thinking about doing a regular menu with category submenus (By brand, price range, speed limit etc.), so that Google can crawl my links and then replace the menu with a form using javascript. Then Google will crawl the links and the user will browse by form. But if I have 3000 products, could it cause duplicate content, flag for link spam (if there is such a thing) etc. ? | seo | indexing | e-commerce | crawling | null | null | open | Hiding products behind a form
===
I’m building a webshop that sells tires. I think it would be best user-friendly-wise to hide my products behind a search form, where you can select tire dimension, price range etc.
I’ve been told that Google will never submit a form, when crawling a site, so if I “hide” the products by using a form, does Google ever index my products?
If no, how do I best work around this? I’ve been thinking about doing a regular menu with category submenus (By brand, price range, speed limit etc.), so that Google can crawl my links and then replace the menu with a form using javascript. Then Google will crawl the links and the user will browse by form. But if I have 3000 products, could it cause duplicate content, flag for link spam (if there is such a thing) etc. ? | 0 |
8,565,271 | 12/19/2011 17:48:06 | 1,106,437 | 12/19/2011 17:44:17 | 1 | 0 | How to change an UIImage using an UISlider | i would like to know if i can load different images using an UISlider.
The best will be to have the same slider ( let say it is a slider... ) as the application photo of the ipad ( the mini photo slider at the bottom ).
Do you think i can do the same as the application photo and how ?
Thanks you !
| ipad | uiimage | slider | photo | uislider | null | open | How to change an UIImage using an UISlider
===
i would like to know if i can load different images using an UISlider.
The best will be to have the same slider ( let say it is a slider... ) as the application photo of the ipad ( the mini photo slider at the bottom ).
Do you think i can do the same as the application photo and how ?
Thanks you !
| 0 |
1,120,117 | 07/13/2009 15:20:57 | 135,020 | 07/08/2009 15:09:22 | 553 | 51 | Not object although var_dump() says otherwise? | When I create controller, I load model (AccountModel) to class variable "Model" and check if user is logged in:
function __construct()
{
parent::__construct();
$this->loadModel("AccountModel", "Model");
$account = $this->getUserAccount();
...
}
Fatal error occurs in getUserAccount():
Fatal error: Call to a member function getAccount() on a non-object in wwwroot/lib/account/account.php on line 57
That's line 57, I call getAccount() on my previously loaded model:
$account = $this->Model->getAccount($_SESSION["account"]["user_account_id"]);
So, looks like $this->Model is not object, but when I put var_dump($this->Model) before calling getAccount(), it says object(AccountModel)#26 (2) ...
I also did var_dump($this), which dumped controller and found that class variable $Model exists and is instance of AccountModel.
Can anybody tell me what the hell is going on?
Btw, model is assigned like that (method of controller):
function loadModel($model_name, $var_name)
{
// blah blah blah
$obj = new $class_name();
$this->$var_name = $obj;
} | php | var-dump | null | null | null | null | open | Not object although var_dump() says otherwise?
===
When I create controller, I load model (AccountModel) to class variable "Model" and check if user is logged in:
function __construct()
{
parent::__construct();
$this->loadModel("AccountModel", "Model");
$account = $this->getUserAccount();
...
}
Fatal error occurs in getUserAccount():
Fatal error: Call to a member function getAccount() on a non-object in wwwroot/lib/account/account.php on line 57
That's line 57, I call getAccount() on my previously loaded model:
$account = $this->Model->getAccount($_SESSION["account"]["user_account_id"]);
So, looks like $this->Model is not object, but when I put var_dump($this->Model) before calling getAccount(), it says object(AccountModel)#26 (2) ...
I also did var_dump($this), which dumped controller and found that class variable $Model exists and is instance of AccountModel.
Can anybody tell me what the hell is going on?
Btw, model is assigned like that (method of controller):
function loadModel($model_name, $var_name)
{
// blah blah blah
$obj = new $class_name();
$this->$var_name = $obj;
} | 0 |
3,334,250 | 07/26/2010 11:07:43 | 290,535 | 03/10/2010 13:22:51 | 119 | 0 | javascript dialogbox without opening page | I have to display dialog box from servlet but without opening new window.
Below is code
PrintWriter printWriter =response.getWriter();
String s ="<HTML><HEAD><TITLE>JavaScript Example</TITLE>"+
"<SCRIPT LANGUAGE=JavaScript>"+
"alert('File Uploaded');"+
"</SCRIPT>"+
"</HEAD>"+
"</HTML>";
printWriter.print(s);
This code open dialog in new window but I want dialog in current window. | javascript | servlets | null | null | null | null | open | javascript dialogbox without opening page
===
I have to display dialog box from servlet but without opening new window.
Below is code
PrintWriter printWriter =response.getWriter();
String s ="<HTML><HEAD><TITLE>JavaScript Example</TITLE>"+
"<SCRIPT LANGUAGE=JavaScript>"+
"alert('File Uploaded');"+
"</SCRIPT>"+
"</HEAD>"+
"</HTML>";
printWriter.print(s);
This code open dialog in new window but I want dialog in current window. | 0 |
6,155,126 | 05/27/2011 16:25:25 | 760,095 | 05/18/2011 22:55:10 | 88 | 1 | Choosing a Development Process | I am a student in the terminal and I have to present a project graduation. I maked a RESTful web service and an iphone application who use the web service . I finished the développment and here I must write a report (normally i should do the report in the same time) .And now i don't know what development process choose in my report , can you help me to choose please ? I know normally i should choose a development process and then code my app but they will not see the code so there are no problem ... Help please | iphone | web-services | development-process | null | null | 05/27/2011 16:57:44 | not a real question | Choosing a Development Process
===
I am a student in the terminal and I have to present a project graduation. I maked a RESTful web service and an iphone application who use the web service . I finished the développment and here I must write a report (normally i should do the report in the same time) .And now i don't know what development process choose in my report , can you help me to choose please ? I know normally i should choose a development process and then code my app but they will not see the code so there are no problem ... Help please | 1 |
5,154,663 | 03/01/2011 12:43:49 | 159,118 | 08/19/2009 09:58:54 | 1,184 | 3 | Silverlight - Expander Control with ListBox, 100% Height | Im trying to put 4 expander controls inside a Grid with 4 rows, the expander control contains a Grid and a ListBox (Currently holding some sample data).
Ideally when an expander is expanded I want it to fill all the available space without pushing the remaining expanders off the screen or the list box going off the screen. Can anyone think of a way of adapting the XAML below or updating the XAML below to achieve this?
<Grid x:Name="LayoutRoot" Background="White" DataContext="{Binding Source={StaticResource ExpanderData}}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.246*"/>
<RowDefinition Height="0.754*"/>
</Grid.RowDefinitions>
<Grid Margin="0" Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.275*"/>
<ColumnDefinition Width="0.725*"/>
</Grid.ColumnDefinitions>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<toolkit:Expander x:Name="Expander1" Header="One" IsExpanded="False">
<Grid Background="#FFE5E5E5">
<ListBox Margin="0" ItemTemplate="{StaticResource ItemTemplate}" ItemsSource="{Binding Collection}"/>
</Grid>
</toolkit:Expander>
<toolkit:Expander x:Name="Expander2" Header="Two" IsExpanded="True" VerticalAlignment="Top" Grid.Row="1">
<Grid Background="#FFE5E5E5">
<ListBox Margin="0" ItemTemplate="{StaticResource ItemTemplate1}" ItemsSource="{Binding Collection}"/>
</Grid>
</toolkit:Expander>
<toolkit:Expander x:Name="Expander3" Header="Three" VerticalAlignment="Top" Grid.Row="2" IsExpanded="False">
<Grid Background="#FFE5E5E5">
<ListBox Margin="0" ItemTemplate="{StaticResource ItemTemplate2}" ItemsSource="{Binding Collection}"/>
</Grid>
</toolkit:Expander>
<toolkit:Expander x:Name="Expander4" Header="Four" VerticalAlignment="Top" Grid.Row="3" IsExpanded="False">
<Grid Background="#FFE5E5E5">
<ListBox Margin="0" ItemTemplate="{StaticResource ItemTemplate3}" ItemsSource="{Binding Collection}"/>
</Grid>
</toolkit:Expander>
</Grid>
</Grid>
</Grid>
</Grid>
</UserControl> | silverlight | xaml | expression-blend | blend | null | null | open | Silverlight - Expander Control with ListBox, 100% Height
===
Im trying to put 4 expander controls inside a Grid with 4 rows, the expander control contains a Grid and a ListBox (Currently holding some sample data).
Ideally when an expander is expanded I want it to fill all the available space without pushing the remaining expanders off the screen or the list box going off the screen. Can anyone think of a way of adapting the XAML below or updating the XAML below to achieve this?
<Grid x:Name="LayoutRoot" Background="White" DataContext="{Binding Source={StaticResource ExpanderData}}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.246*"/>
<RowDefinition Height="0.754*"/>
</Grid.RowDefinitions>
<Grid Margin="0" Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.275*"/>
<ColumnDefinition Width="0.725*"/>
</Grid.ColumnDefinitions>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<toolkit:Expander x:Name="Expander1" Header="One" IsExpanded="False">
<Grid Background="#FFE5E5E5">
<ListBox Margin="0" ItemTemplate="{StaticResource ItemTemplate}" ItemsSource="{Binding Collection}"/>
</Grid>
</toolkit:Expander>
<toolkit:Expander x:Name="Expander2" Header="Two" IsExpanded="True" VerticalAlignment="Top" Grid.Row="1">
<Grid Background="#FFE5E5E5">
<ListBox Margin="0" ItemTemplate="{StaticResource ItemTemplate1}" ItemsSource="{Binding Collection}"/>
</Grid>
</toolkit:Expander>
<toolkit:Expander x:Name="Expander3" Header="Three" VerticalAlignment="Top" Grid.Row="2" IsExpanded="False">
<Grid Background="#FFE5E5E5">
<ListBox Margin="0" ItemTemplate="{StaticResource ItemTemplate2}" ItemsSource="{Binding Collection}"/>
</Grid>
</toolkit:Expander>
<toolkit:Expander x:Name="Expander4" Header="Four" VerticalAlignment="Top" Grid.Row="3" IsExpanded="False">
<Grid Background="#FFE5E5E5">
<ListBox Margin="0" ItemTemplate="{StaticResource ItemTemplate3}" ItemsSource="{Binding Collection}"/>
</Grid>
</toolkit:Expander>
</Grid>
</Grid>
</Grid>
</Grid>
</UserControl> | 0 |
9,653,971 | 03/11/2012 09:56:42 | 997,392 | 10/16/2011 00:18:17 | 16 | 0 | Scanning two separate barcodes in one action? | How to Scanning two separate barcodes (in one line near together) in one action?
Thanks. | barcode | null | null | null | null | 03/14/2012 17:34:12 | not a real question | Scanning two separate barcodes in one action?
===
How to Scanning two separate barcodes (in one line near together) in one action?
Thanks. | 1 |
6,462,423 | 06/24/2011 01:33:12 | 530,041 | 12/04/2010 00:18:54 | 1 | 1 | Selective AppWidgets | I have a app which has 2 widgets, lets call them SimpleWidget and ListWidget.
ListWidget makes use of android 3.1 (api level 12) features.
What I would like to do is register both widgets if the device is 3.1 or above.
If it is not than I would only want to register SimpleWidget.
As the code stands now the widgets are defined in my app's AndroidManifest.xml file.
I can't figure out how I could filter this by sdk level.
The only solution I have found so far would still display both widgets (in android's add widget page) even on pre 3.1 devices (in which case I relegate ListWidget to a SimpleWidget).
Am I missing something?
For example can I register widgets in Java code (maybe in the app's onCreate method) instead of in the manifest file? (seems unlikely since the info is needed before the app is ever run). | android | null | null | null | null | null | open | Selective AppWidgets
===
I have a app which has 2 widgets, lets call them SimpleWidget and ListWidget.
ListWidget makes use of android 3.1 (api level 12) features.
What I would like to do is register both widgets if the device is 3.1 or above.
If it is not than I would only want to register SimpleWidget.
As the code stands now the widgets are defined in my app's AndroidManifest.xml file.
I can't figure out how I could filter this by sdk level.
The only solution I have found so far would still display both widgets (in android's add widget page) even on pre 3.1 devices (in which case I relegate ListWidget to a SimpleWidget).
Am I missing something?
For example can I register widgets in Java code (maybe in the app's onCreate method) instead of in the manifest file? (seems unlikely since the info is needed before the app is ever run). | 0 |
6,357,909 | 06/15/2011 12:51:00 | 797,643 | 06/14/2011 12:26:03 | 3 | 0 | LocatonManager and telephonyManager | I am currently working on an app which enhances the mobile security. I am using location Manager to determine the location of the phone using GPS. Also i am using telephony manager to detect the change of sim. These two things i have done in two separate .java files as two activities. Here is my code
one activity:
LocationManager locationManager = (LocationManager)this.getSystemService(LOCATION_SERVICE);
Criteria criteria = new Criteria();
criteria.setAccuracy(Criteria.ACCURACY_COARSE);
String bestProvider= locationManager.getBestProvider(criteria, true);
Location loc = locationManager.getLastKnownLocation(bestProvider);
Toast Toast1=Toast.makeText(getBaseContext(),"The location is"+(CharSequence) loc,Toast.LENGTH_LONG);
Toast1.show();
Intent startServiceIntent=new Intent();
startServiceIntent.setClass(getApplicationContext(),sim.class);
startService(startServiceIntent);
another activity:
TelephonyManager tMgr=(TelephonyManager)mAppContext.getSystemService(Context.TELEPHONY_SERVICE);
String mPhoneNumber = tMgr.getLine1Number();
Toast myToast=Toast.makeText(getBaseContext(),"sim changed and new number is"+(CharSequence) mPhoneNumber,Toast.LENGTH_LONG);
myToast.show();
As i cannot check this with the emulator is my code right?
will it work?
| android | null | null | null | null | 06/15/2011 15:57:15 | too localized | LocatonManager and telephonyManager
===
I am currently working on an app which enhances the mobile security. I am using location Manager to determine the location of the phone using GPS. Also i am using telephony manager to detect the change of sim. These two things i have done in two separate .java files as two activities. Here is my code
one activity:
LocationManager locationManager = (LocationManager)this.getSystemService(LOCATION_SERVICE);
Criteria criteria = new Criteria();
criteria.setAccuracy(Criteria.ACCURACY_COARSE);
String bestProvider= locationManager.getBestProvider(criteria, true);
Location loc = locationManager.getLastKnownLocation(bestProvider);
Toast Toast1=Toast.makeText(getBaseContext(),"The location is"+(CharSequence) loc,Toast.LENGTH_LONG);
Toast1.show();
Intent startServiceIntent=new Intent();
startServiceIntent.setClass(getApplicationContext(),sim.class);
startService(startServiceIntent);
another activity:
TelephonyManager tMgr=(TelephonyManager)mAppContext.getSystemService(Context.TELEPHONY_SERVICE);
String mPhoneNumber = tMgr.getLine1Number();
Toast myToast=Toast.makeText(getBaseContext(),"sim changed and new number is"+(CharSequence) mPhoneNumber,Toast.LENGTH_LONG);
myToast.show();
As i cannot check this with the emulator is my code right?
will it work?
| 3 |
363,209 | 12/12/2008 16:14:45 | 1,246,613 | 03/03/2012 09:25:03 | 31 | 3 | bash scripting..copying files without overwriting | I would like to know if it is possible to copy/move files to a destination based on the origin name.
Basically, I have a /mail folder, which has several subfolders such as cur and new etc. I then have an extracted backup in /mail/home/username that is a duplicate. mv -f will not work, as I do not have permission to overwrite the directories, but only the files within.
I get errors such as mv: cannot overwrite directory `/home/username/mail/username.com'
What I want to do is for each file in the directory username.com, move it to the folder of the same name in /mail. There could be any number of folders in place of username.com, with seperate sub sirectories of their own.
What is the best way to do this?
I have to do it this way as due to circumstances I only have access to my host with ftp and bash via php.
| bash | null | null | null | null | 12/15/2008 10:46:51 | off topic | bash scripting..copying files without overwriting
===
I would like to know if it is possible to copy/move files to a destination based on the origin name.
Basically, I have a /mail folder, which has several subfolders such as cur and new etc. I then have an extracted backup in /mail/home/username that is a duplicate. mv -f will not work, as I do not have permission to overwrite the directories, but only the files within.
I get errors such as mv: cannot overwrite directory `/home/username/mail/username.com'
What I want to do is for each file in the directory username.com, move it to the folder of the same name in /mail. There could be any number of folders in place of username.com, with seperate sub sirectories of their own.
What is the best way to do this?
I have to do it this way as due to circumstances I only have access to my host with ftp and bash via php.
| 2 |
2,094,635 | 01/19/2010 15:37:50 | 68,591 | 02/19/2009 19:55:45 | 617 | 28 | How to profile JQuery/JQGrid |
I am using JQGrid component for displaying ajax tree grid.
With some quantity of data (tree with 200 branches, 2-3 items in each) - the grid begins to freeze in FireFox. Then I get a window asking whether to stop the script or continue.
What is the prescription to debug and resolve this?
I can debug my code, but I am not sure how to debug js libraries and their nuances.
Is it more likely JQuery, JQGrid or FireFox problem? | jquery | jqgrid | javascript | debugging | null | null | open | How to profile JQuery/JQGrid
===
I am using JQGrid component for displaying ajax tree grid.
With some quantity of data (tree with 200 branches, 2-3 items in each) - the grid begins to freeze in FireFox. Then I get a window asking whether to stop the script or continue.
What is the prescription to debug and resolve this?
I can debug my code, but I am not sure how to debug js libraries and their nuances.
Is it more likely JQuery, JQGrid or FireFox problem? | 0 |
6,245,793 | 06/05/2011 20:55:22 | 768,767 | 05/25/2011 01:57:34 | 26 | 1 | Using strtoul in C | In C, why does
`strtoul(argv[1])`
just doesn't work? It looks like more parameters are needed but I can't prevent how long the number will be.
Thanks!
p.s. (argv[1] is properly setted). | c | strtol | null | null | null | 06/06/2011 05:42:52 | not a real question | Using strtoul in C
===
In C, why does
`strtoul(argv[1])`
just doesn't work? It looks like more parameters are needed but I can't prevent how long the number will be.
Thanks!
p.s. (argv[1] is properly setted). | 1 |
9,807,327 | 03/21/2012 15:07:53 | 1,118,143 | 12/27/2011 19:00:51 | 52 | 8 | Using static methods in objects PHP - is it advantage? | I was reading some articles and discussions on the use of `static methods` on objects and it struck me how much the views differ.
Someone say that using static methods is an **advantage**. Someone says that use is a big **mistake**.
I wonder how is it?
My question is **when** to use static methods and when not?
I would like to hear answers from **experts in this field** (PHP OOP). This is because I know how it really is.
The following code should be analogous. Just call the static method is **simpler** (my opinion):
<?php
class A
{
public function write($a) {
echo $a;
}
}
class B
{
public static function write($a) {
echo $a;
}
}
$a = new A;
$a->write(5); // 5
B::write(5); // 5
?>
Thank you.
| php | null | null | null | null | 03/22/2012 14:54:03 | not constructive | Using static methods in objects PHP - is it advantage?
===
I was reading some articles and discussions on the use of `static methods` on objects and it struck me how much the views differ.
Someone say that using static methods is an **advantage**. Someone says that use is a big **mistake**.
I wonder how is it?
My question is **when** to use static methods and when not?
I would like to hear answers from **experts in this field** (PHP OOP). This is because I know how it really is.
The following code should be analogous. Just call the static method is **simpler** (my opinion):
<?php
class A
{
public function write($a) {
echo $a;
}
}
class B
{
public static function write($a) {
echo $a;
}
}
$a = new A;
$a->write(5); // 5
B::write(5); // 5
?>
Thank you.
| 4 |
5,793,927 | 04/26/2011 17:13:10 | 245,926 | 01/07/2010 20:59:05 | 464 | 8 | Do I need a splash screen for an app to be submitted to app store | Is a splash screen required to submit your app into the app store? | iphone | iphone-sdk-4.0 | null | null | null | 04/28/2011 05:01:19 | off topic | Do I need a splash screen for an app to be submitted to app store
===
Is a splash screen required to submit your app into the app store? | 2 |
1,149,945 | 07/19/2009 13:54:08 | 42,749 | 12/03/2008 08:44:10 | 1,072 | 88 | How to make a WCF service support multiple callback? | I have a nettcp WCF service that supports single callback method.
I want to add new callback methods by adding new interface that contains the new methods
I tried to add new interface that inherits from the old one but the gerenated proxy in the the client application does not contain the old callback interface.
the code is as follows
interface IOldCallback
{
[OperationContract(IsOneWay = true)]
void OnMethod1(int x);
}
interface INewCallback : IOldCallback
{
[OperationContract(IsOneWay = true)]
void OnMethod2(float x);
[OperationContract(IsOneWay = true)]
void OnMethod3(bool x);
}
[ServiceContract(SessionMode = SessionMode.Required, CallbackContract = typeof(INewCallback))]
public interface IMyService
{
}
| wcf | c# | null | null | null | null | open | How to make a WCF service support multiple callback?
===
I have a nettcp WCF service that supports single callback method.
I want to add new callback methods by adding new interface that contains the new methods
I tried to add new interface that inherits from the old one but the gerenated proxy in the the client application does not contain the old callback interface.
the code is as follows
interface IOldCallback
{
[OperationContract(IsOneWay = true)]
void OnMethod1(int x);
}
interface INewCallback : IOldCallback
{
[OperationContract(IsOneWay = true)]
void OnMethod2(float x);
[OperationContract(IsOneWay = true)]
void OnMethod3(bool x);
}
[ServiceContract(SessionMode = SessionMode.Required, CallbackContract = typeof(INewCallback))]
public interface IMyService
{
}
| 0 |
7,836,545 | 10/20/2011 13:19:51 | 939,937 | 09/12/2011 05:51:25 | 63 | 20 | can we manipulate the scroll view , Navigation in iPad to Android? | Is it possible that in Android we can implement the scroll view ,navigation as in iPad | android | iphone | null | null | null | 10/20/2011 18:04:54 | not a real question | can we manipulate the scroll view , Navigation in iPad to Android?
===
Is it possible that in Android we can implement the scroll view ,navigation as in iPad | 1 |
8,423,613 | 12/07/2011 22:36:29 | 1,086,610 | 12/07/2011 22:11:19 | 1 | 0 | How to call a javascript function that's in a separate file, from within a drupal form | I am a javascript newbie, as well as a php newbie. I have been working on this thing for weeks, and just can't figure out how to get my javascript fuction to be called within a form.
A form that is will eventually be filled in with the javascript form below.
function input_more_form($form, &$form_state) {
drupal_add_js(drupal_get_path('module', 'input') .'/input.js');
$form['event'] = array(
'#title' => 'Event Form',
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#states' => array(
'expanded' => array(
':input[name="something"]' => array('value' => 'Rock climbing'),
),),);
$form['event']['something'] = array(
'#title' => t(''),
'#type' => 'textfield',
'#default_value' => 'do something',
'#required' => TRUE,
);
$form['event']['someone'] = array(
'#title' => t(''),
'#type' => 'textfield',
'#default_value' => 'cool people',
'#required' => TRUE,
);
$form['event']['somewhere'] = array(
'#title' => t(''),
'#type' => 'textfield',
'#default_value' => 'go somewhere',
'#required' => TRUE,
);
$form['event']['sometime'] = array(
'#title' => t(''),
'#type' => 'textfield',
'#default_value' => 'soon',
'#required' => TRUE,
);
This is the part that I am having trouble with.
$form['jsform'] = array(
'#type' => 'markup',
'#value' => 'Here is my markup',
'#prefix' => "<div id='myCode'><script type='text/javascript'>function hollaback(word){alert('Take that' + word)} function verbArray(){document.getElementById('edit-something').value = 'Rock climbing';document.getElementById('edit-something').method = 'post'}function peopleArray(){document.getElementById('edit-os').value = 'Linux';}</script>
<div id='maincontent' class='content' style='text-align:center;'>
<br><div class='innertube'>
<form name='eventform' style='inline-block'>I want to go <input type='button' name='button1' class='btn primary' value='Do Something' onClick='hollaback(working)'> with <input type='button' name='button2' class='btn primary' value='Cool People' onClick='peopleArray(this.form.name,this.name)'>.<br><br>
Lets go <input type='button' name='button3' class='btn primary' value='Somewhere' onClick='whereArray(this.form.name,this.name)'> <input type='button' name='button4' class='btn primary' value='Soon' onClick='fillWhen(this.form.name,this.name)'>.
</form>
</div>
<div id='framecontentBottom' style='display:inline-block'></div></div>",
'#suffix' => '</br>',
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
);
return $form;
}
From input.js
//This should cause a pop-up window when the Do Something button is pushed
function hollaback(x)
{
alert("Take that Chris" + x);
}
Let me know if you need more info, or this post was confusing. Thanks so much. | javascript | forms | drupal-7 | null | null | 12/11/2011 14:35:24 | not a real question | How to call a javascript function that's in a separate file, from within a drupal form
===
I am a javascript newbie, as well as a php newbie. I have been working on this thing for weeks, and just can't figure out how to get my javascript fuction to be called within a form.
A form that is will eventually be filled in with the javascript form below.
function input_more_form($form, &$form_state) {
drupal_add_js(drupal_get_path('module', 'input') .'/input.js');
$form['event'] = array(
'#title' => 'Event Form',
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#states' => array(
'expanded' => array(
':input[name="something"]' => array('value' => 'Rock climbing'),
),),);
$form['event']['something'] = array(
'#title' => t(''),
'#type' => 'textfield',
'#default_value' => 'do something',
'#required' => TRUE,
);
$form['event']['someone'] = array(
'#title' => t(''),
'#type' => 'textfield',
'#default_value' => 'cool people',
'#required' => TRUE,
);
$form['event']['somewhere'] = array(
'#title' => t(''),
'#type' => 'textfield',
'#default_value' => 'go somewhere',
'#required' => TRUE,
);
$form['event']['sometime'] = array(
'#title' => t(''),
'#type' => 'textfield',
'#default_value' => 'soon',
'#required' => TRUE,
);
This is the part that I am having trouble with.
$form['jsform'] = array(
'#type' => 'markup',
'#value' => 'Here is my markup',
'#prefix' => "<div id='myCode'><script type='text/javascript'>function hollaback(word){alert('Take that' + word)} function verbArray(){document.getElementById('edit-something').value = 'Rock climbing';document.getElementById('edit-something').method = 'post'}function peopleArray(){document.getElementById('edit-os').value = 'Linux';}</script>
<div id='maincontent' class='content' style='text-align:center;'>
<br><div class='innertube'>
<form name='eventform' style='inline-block'>I want to go <input type='button' name='button1' class='btn primary' value='Do Something' onClick='hollaback(working)'> with <input type='button' name='button2' class='btn primary' value='Cool People' onClick='peopleArray(this.form.name,this.name)'>.<br><br>
Lets go <input type='button' name='button3' class='btn primary' value='Somewhere' onClick='whereArray(this.form.name,this.name)'> <input type='button' name='button4' class='btn primary' value='Soon' onClick='fillWhen(this.form.name,this.name)'>.
</form>
</div>
<div id='framecontentBottom' style='display:inline-block'></div></div>",
'#suffix' => '</br>',
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
);
return $form;
}
From input.js
//This should cause a pop-up window when the Do Something button is pushed
function hollaback(x)
{
alert("Take that Chris" + x);
}
Let me know if you need more info, or this post was confusing. Thanks so much. | 1 |
10,484,780 | 05/07/2012 15:29:43 | 627,969 | 02/22/2011 08:41:26 | 27 | 1 | Filter the results using n-hibernate via matching with another Db table | I have already written Hbn & code to fetch the users from db.
with following info
userid, name,email,phone
now we have new requirement in which new table has been created with following fields
Table 1
- userid -- foreign key to above user table
- workinglocation
- WorkingStatusId
table 2
- WorkingStatusId
- workingstatus
filter criteria is workinglocation and workingstatus
i can not change my existing code.
either i have to write new hbn file and write the code
or should i fetch the data using earlier created hbn and filter it
Please suggest me with the code using linq etc (if possible)
| nhibernate | linq-to-nhibernate | nhibernate-criteria | null | null | null | open | Filter the results using n-hibernate via matching with another Db table
===
I have already written Hbn & code to fetch the users from db.
with following info
userid, name,email,phone
now we have new requirement in which new table has been created with following fields
Table 1
- userid -- foreign key to above user table
- workinglocation
- WorkingStatusId
table 2
- WorkingStatusId
- workingstatus
filter criteria is workinglocation and workingstatus
i can not change my existing code.
either i have to write new hbn file and write the code
or should i fetch the data using earlier created hbn and filter it
Please suggest me with the code using linq etc (if possible)
| 0 |
327,274 | 11/29/2008 06:43:23 | 41,757 | 11/29/2008 06:30:56 | 1 | 0 | MySQL Prepared statements with a variable size variable list | How would you write a prepared MySQL statement in PHP that takes a differing number of arguments each time. An example such query is:
<code>SELECT `age`, `name` FROM `people` WHERE id IN (12, 45, 65, 33)</code>
The IN CLAUSE will have a different number of id's each time it is run.
I have two possible solutions in my mind but want to see if there is a better way.
**Possible Solution 1** Make the statement accept 100 variables and fill the rest with dummy values guaranteed not to be in the table, make multiple calls for more than 100 values.
**Possible Solution 2** Don't use a prepared statement, build and run the query checking stringently for possible injection attacks. | php | mysql | prepared-statement | null | null | null | open | MySQL Prepared statements with a variable size variable list
===
How would you write a prepared MySQL statement in PHP that takes a differing number of arguments each time. An example such query is:
<code>SELECT `age`, `name` FROM `people` WHERE id IN (12, 45, 65, 33)</code>
The IN CLAUSE will have a different number of id's each time it is run.
I have two possible solutions in my mind but want to see if there is a better way.
**Possible Solution 1** Make the statement accept 100 variables and fill the rest with dummy values guaranteed not to be in the table, make multiple calls for more than 100 values.
**Possible Solution 2** Don't use a prepared statement, build and run the query checking stringently for possible injection attacks. | 0 |
7,469,544 | 09/19/2011 10:32:41 | 911,423 | 08/25/2011 07:17:44 | 52 | 0 | How to process large PHP code or How to design Cron Job? | I'm working on a MLM project where there are around 15500+ registered users.
As I'm very first in MLM project, I'm getting some problem while trying to run a script (**updatedata.php**).
My Script works for:
1. Updating Total Downline of member (script need to run through 15500+ users)
2. Updating daily Payout of each users
3. Cleaning Chat History
4. Cleaning Old Private Messages (1 month old)
5. Calculating Total Income of Company.
The script need to run through entire 15500+ members to do this (As I'm continuing learning easy process- *i'm 6 month old in PHP*).
But my Shared Host provides maximum 30 seconds of execution time, so my scripts always fails.
Then I tried to use the below code:
<?php
/*
*====== A part of process here=======
*/
sleep ( 2 ); /// Now the script will be sleep for 2 second
/*
* Then other part of process will run here
*/
sleep ( 2 ); /// Again will sleep
/*
* Then another part of process will run here
*/
// Thus so on...
?>
But I thought sleep() will stop the PHP script. i was a dull, (*Now I know that **sleep()** also a component of the PHP script*) may anyone help me what should I do for it ? -I'm using Apache Server
Or How to design a Cron Job ? | php | cron | null | null | null | 09/20/2011 11:36:51 | not a real question | How to process large PHP code or How to design Cron Job?
===
I'm working on a MLM project where there are around 15500+ registered users.
As I'm very first in MLM project, I'm getting some problem while trying to run a script (**updatedata.php**).
My Script works for:
1. Updating Total Downline of member (script need to run through 15500+ users)
2. Updating daily Payout of each users
3. Cleaning Chat History
4. Cleaning Old Private Messages (1 month old)
5. Calculating Total Income of Company.
The script need to run through entire 15500+ members to do this (As I'm continuing learning easy process- *i'm 6 month old in PHP*).
But my Shared Host provides maximum 30 seconds of execution time, so my scripts always fails.
Then I tried to use the below code:
<?php
/*
*====== A part of process here=======
*/
sleep ( 2 ); /// Now the script will be sleep for 2 second
/*
* Then other part of process will run here
*/
sleep ( 2 ); /// Again will sleep
/*
* Then another part of process will run here
*/
// Thus so on...
?>
But I thought sleep() will stop the PHP script. i was a dull, (*Now I know that **sleep()** also a component of the PHP script*) may anyone help me what should I do for it ? -I'm using Apache Server
Or How to design a Cron Job ? | 1 |
6,146,406 | 05/26/2011 23:59:26 | 772,247 | 05/26/2011 23:59:26 | 1 | 0 | python read/write csv file by lookup changes needed from other csv file | I'm new to Python. How can I read changes needed from rename.csv file, then change naming and value accordingly in my.csv file. If no new value in rename.csv file, default value will be remain. My csv files as below:
rename.csv
OLD NAME,NEW NAME,NEW VALUE
AA,BB,22
CC,DD
XX,KK,99
my.csv (before)
XX,YY,ZZ,AA,CC,EE
1,2,3,4,5,6
3,2,1,4,5,7
my.csv (after/expect result)
KK,YY,ZZ,BB,DD,EE
99,2,3,22,5,6
99,2,1,22,5,7
| python | csv | null | null | null | 07/16/2012 01:53:47 | not a real question | python read/write csv file by lookup changes needed from other csv file
===
I'm new to Python. How can I read changes needed from rename.csv file, then change naming and value accordingly in my.csv file. If no new value in rename.csv file, default value will be remain. My csv files as below:
rename.csv
OLD NAME,NEW NAME,NEW VALUE
AA,BB,22
CC,DD
XX,KK,99
my.csv (before)
XX,YY,ZZ,AA,CC,EE
1,2,3,4,5,6
3,2,1,4,5,7
my.csv (after/expect result)
KK,YY,ZZ,BB,DD,EE
99,2,3,22,5,6
99,2,1,22,5,7
| 1 |
10,323,783 | 04/25/2012 21:05:13 | 591,035 | 01/26/2011 17:39:25 | 64 | 0 | Google Analytics not tracking directories correctly | I have an issue with setting up Google Analytics for a domain with several directories. Here is what I have:
www.mydomain.com
www.mydomain.com/site-one/
www.mydomain.com/site-two/
www.mydomain.com/site-three/
www.mydomain.com/site-four/
www.mydomain.com/site-five/
Each of these directories are effectively separate websites, but they all come under mydomain.com. My issue is that I've set them up so that mydomain.com is the main account, with site-one, site-two, site-three etc each being a property under that account.
For each of the properties, I have the relevant url. For example:
For the mydomain.com/site-one/ Default URL I have set it to http://www.mydomain.com/site-one/
What I've noticed is that since doing this, I only seem to be getting visits tracked on mydomain.com, but none of the sub-domain properties.
I'm sure there is probably something I'm not doing right...so if anyone can help I would really appreciated it.
Thanks | google-analytics | google-analytics-api | web-analytics | null | null | null | open | Google Analytics not tracking directories correctly
===
I have an issue with setting up Google Analytics for a domain with several directories. Here is what I have:
www.mydomain.com
www.mydomain.com/site-one/
www.mydomain.com/site-two/
www.mydomain.com/site-three/
www.mydomain.com/site-four/
www.mydomain.com/site-five/
Each of these directories are effectively separate websites, but they all come under mydomain.com. My issue is that I've set them up so that mydomain.com is the main account, with site-one, site-two, site-three etc each being a property under that account.
For each of the properties, I have the relevant url. For example:
For the mydomain.com/site-one/ Default URL I have set it to http://www.mydomain.com/site-one/
What I've noticed is that since doing this, I only seem to be getting visits tracked on mydomain.com, but none of the sub-domain properties.
I'm sure there is probably something I'm not doing right...so if anyone can help I would really appreciated it.
Thanks | 0 |
6,345,739 | 06/14/2011 15:06:59 | 615,503 | 02/13/2011 22:47:16 | 1 | 0 | Symfony components backend | I have a problem with components in the backend application.
I want to include a component, I followed step by step the jobeet tutorial, but I have an error:
"The component "language lang" does not exist.
I have a module language in which I have a components.class.php in actions/ and a partial _lang.php in language/templates.
I don't get why I have this kind of error
Can you help me ?
Thanks | symfony | null | null | null | null | null | open | Symfony components backend
===
I have a problem with components in the backend application.
I want to include a component, I followed step by step the jobeet tutorial, but I have an error:
"The component "language lang" does not exist.
I have a module language in which I have a components.class.php in actions/ and a partial _lang.php in language/templates.
I don't get why I have this kind of error
Can you help me ?
Thanks | 0 |
9,971,505 | 04/02/2012 05:56:40 | 1,307,242 | 04/02/2012 04:53:31 | 1 | 0 | Background Images in HTML Email | I just want to add background image and want to write text over it. I have tried everything. Please give me full proof method for this.
Thank You | html | null | null | null | null | 04/02/2012 12:11:59 | not a real question | Background Images in HTML Email
===
I just want to add background image and want to write text over it. I have tried everything. Please give me full proof method for this.
Thank You | 1 |
8,148,715 | 11/16/2011 08:32:27 | 710,818 | 02/10/2010 09:50:08 | 818 | 14 | How to set limit on directory size in Linux? | I have read about limiting size of directory - like creating big files, formatting,mount,.. etc.
But this all very complicated. Does exist utility or something else to set limit on already existing directory?
| linux | directory | size | limit | null | 11/16/2011 09:01:03 | off topic | How to set limit on directory size in Linux?
===
I have read about limiting size of directory - like creating big files, formatting,mount,.. etc.
But this all very complicated. Does exist utility or something else to set limit on already existing directory?
| 2 |
10,533,046 | 05/10/2012 11:28:33 | 1,386,924 | 05/10/2012 11:17:41 | 1 | 0 | PreviousPage is null on one machine, not on the other | I have a website with a page that does a crosspage postback using an ASP:Button with a PostBackUrl as such:
<asp:Button ID="FindButton" runat="server" Text="Find" CssClass="button" PostBackUrl="~/TGS/BusinessResults.aspx" meta:resourcekey="FindButtonResource1" />
I do not need information about the previous page other than PreviousPage.IsCrossPagePostBack, so adding a PreviousPageType should not be neccesary.
**Problem**
I have two machines, one laptop and one desktop. My code works as intended (PreviousPage is not null) on the laptop, but PreviousPage is always null on my desktop with identicical code.
I have the same Visual Studio 2010 installations with the same .NET versions (Used System.Environment.Version to check) on both machines.
Any thoughts? | asp.net | null | previouspagetype | null | null | null | open | PreviousPage is null on one machine, not on the other
===
I have a website with a page that does a crosspage postback using an ASP:Button with a PostBackUrl as such:
<asp:Button ID="FindButton" runat="server" Text="Find" CssClass="button" PostBackUrl="~/TGS/BusinessResults.aspx" meta:resourcekey="FindButtonResource1" />
I do not need information about the previous page other than PreviousPage.IsCrossPagePostBack, so adding a PreviousPageType should not be neccesary.
**Problem**
I have two machines, one laptop and one desktop. My code works as intended (PreviousPage is not null) on the laptop, but PreviousPage is always null on my desktop with identicical code.
I have the same Visual Studio 2010 installations with the same .NET versions (Used System.Environment.Version to check) on both machines.
Any thoughts? | 0 |
5,084,341 | 02/22/2011 21:43:56 | 471,512 | 10/10/2010 12:24:38 | 18 | 0 | Resource file cannot be found | I'm new in Java. I use Eclipse IDE. I have such structure of packages :
Java src:
-1)org.pdfbox;
-2)org.pdfbox.util;
-3)org.pdfbox.pdmodel.interactive.documentnavigation.outline
- .....
-4)org.pdfbox.util;
-4.1)ResourceLoader.java - loads data from .properties file ;
-4.2).....
-4.3).....
-5)org.pdfbox.Resources;
-5.1)files to be downloaded (*.properties).
Package with Resources has gray icon, others packages have brown icons. ResourceLoader throws an exception "file cannot be found" when I try to load file from org.pdfbox.Resources. Is trere way to include package with properties into project or something else? I have tried to set ab absolute or relative paths to my properties file. Would be very greatful for help.
| java | resources | properties | null | null | null | open | Resource file cannot be found
===
I'm new in Java. I use Eclipse IDE. I have such structure of packages :
Java src:
-1)org.pdfbox;
-2)org.pdfbox.util;
-3)org.pdfbox.pdmodel.interactive.documentnavigation.outline
- .....
-4)org.pdfbox.util;
-4.1)ResourceLoader.java - loads data from .properties file ;
-4.2).....
-4.3).....
-5)org.pdfbox.Resources;
-5.1)files to be downloaded (*.properties).
Package with Resources has gray icon, others packages have brown icons. ResourceLoader throws an exception "file cannot be found" when I try to load file from org.pdfbox.Resources. Is trere way to include package with properties into project or something else? I have tried to set ab absolute or relative paths to my properties file. Would be very greatful for help.
| 0 |
7,641,545 | 10/03/2011 22:47:52 | 977,165 | 10/03/2011 17:50:35 | 1 | 0 | Force SD-Card rescan using activity manager? | I am trying to scan the sd-card after adding some files using the activity manager but it doesn't seem to work. Is there an alternative intent action that can trigger the scan?
user#am broadcast -a android.intent.action.MEDIA_MOUNTED --ez read-only false -d file:///sdcard
| android | null | null | null | null | 10/06/2011 13:30:52 | off topic | Force SD-Card rescan using activity manager?
===
I am trying to scan the sd-card after adding some files using the activity manager but it doesn't seem to work. Is there an alternative intent action that can trigger the scan?
user#am broadcast -a android.intent.action.MEDIA_MOUNTED --ez read-only false -d file:///sdcard
| 2 |
11,098,755 | 06/19/2012 10:04:55 | 274,677 | 02/16/2010 19:47:54 | 489 | 9 | IDE for JBoss JSF development | I am planning to develop a medium to large size web application using JSF (plus PrimeFaces or other) for the view layer and EJB3 for business logic. The reason we've chosen EJB3 over more lightweight JSF beans that might only require a Servlet container (as opposed to an EJB3 container) is for additional EJB3 features like security. Since we are targeting deployment on JBoss AS I was wondering what IDE solution you would recommend. I've seen that both Eclipse and Netbeans support JBoss either out-of-the-box or with plugins. | eclipse | jsf | netbeans | jboss | null | null | open | IDE for JBoss JSF development
===
I am planning to develop a medium to large size web application using JSF (plus PrimeFaces or other) for the view layer and EJB3 for business logic. The reason we've chosen EJB3 over more lightweight JSF beans that might only require a Servlet container (as opposed to an EJB3 container) is for additional EJB3 features like security. Since we are targeting deployment on JBoss AS I was wondering what IDE solution you would recommend. I've seen that both Eclipse and Netbeans support JBoss either out-of-the-box or with plugins. | 0 |
11,710,045 | 07/29/2012 14:32:57 | 1,435,785 | 06/04/2012 18:28:24 | 23 | 1 | jQuery working really bad in IE8 | I've tried for numerous hours to fix my _[site][1]_ for IE8 now, with little luck. If you open it it any other browser (IE9, FF, Chrome, ...) it works fine, but in IE8 it's complete chaos. I can only check it in IETester and it gives me "Invalid procedure call or argument" at char 23853 line 4 in jquery.min.js when I visit the site. Shadowbox isn't initiated. The popups aren't hidden and the markup looks like sh*t.
I've tried everything I can think of - checking all the trailing commas in the jquery, using IE7 compatibility-tag, disabling "unnecessary" scripts etc etc.. I haven't got a clue whats wrong. Any help is greatly appreciated, thank you very much in advance! If you check the source you can check the jQuerydocuments, their at the top of the document.
[1]: http://carlssonmedia.se | jquery | internet-explorer-8 | null | null | null | 07/30/2012 05:24:59 | not a real question | jQuery working really bad in IE8
===
I've tried for numerous hours to fix my _[site][1]_ for IE8 now, with little luck. If you open it it any other browser (IE9, FF, Chrome, ...) it works fine, but in IE8 it's complete chaos. I can only check it in IETester and it gives me "Invalid procedure call or argument" at char 23853 line 4 in jquery.min.js when I visit the site. Shadowbox isn't initiated. The popups aren't hidden and the markup looks like sh*t.
I've tried everything I can think of - checking all the trailing commas in the jquery, using IE7 compatibility-tag, disabling "unnecessary" scripts etc etc.. I haven't got a clue whats wrong. Any help is greatly appreciated, thank you very much in advance! If you check the source you can check the jQuerydocuments, their at the top of the document.
[1]: http://carlssonmedia.se | 1 |
8,231,321 | 11/22/2011 17:50:10 | 1,060,337 | 11/22/2011 17:39:48 | 1 | 0 | Android App: Python or Java? | I am new to android and was seeking for an app (email client) which have a nice filter system, but after a lot of Googling and Android market browsing, its seems none of the email client available for Android provide such features. (at least the free ones dont). So, finally I concluded to develop myself. Now the problem is I wish to develop this in Python. But I am concerned about the efficiency issue. Thus, the questions are:
1. Apart from limited API exposure for Python on Android what all factors do I need to watch-out before choosing between JAVA and Python?
2. Moreover, I guess we need to install Python compiler on user machince with our python app, so does means more memory usage and reduced performance? | java | android | python | performance | application | 11/22/2011 20:23:54 | not constructive | Android App: Python or Java?
===
I am new to android and was seeking for an app (email client) which have a nice filter system, but after a lot of Googling and Android market browsing, its seems none of the email client available for Android provide such features. (at least the free ones dont). So, finally I concluded to develop myself. Now the problem is I wish to develop this in Python. But I am concerned about the efficiency issue. Thus, the questions are:
1. Apart from limited API exposure for Python on Android what all factors do I need to watch-out before choosing between JAVA and Python?
2. Moreover, I guess we need to install Python compiler on user machince with our python app, so does means more memory usage and reduced performance? | 4 |
3,316,061 | 07/23/2010 07:18:35 | 369,161 | 06/17/2010 09:29:38 | 35 | 1 | How do I use this source on my application? | Here Is Source Of a game that a saw in internet.
i was copy that in my Application.
But it does not work.
Any button is not made.
how can i fix it?
Here Is link of source : http://www.dreamincode.net/forums/topic/61017-backgammon-game-mouse-events-in-c%23/page__p__402781&#entry402781
| c# | source-code | copy-paste | null | null | 07/24/2010 00:51:20 | not a real question | How do I use this source on my application?
===
Here Is Source Of a game that a saw in internet.
i was copy that in my Application.
But it does not work.
Any button is not made.
how can i fix it?
Here Is link of source : http://www.dreamincode.net/forums/topic/61017-backgammon-game-mouse-events-in-c%23/page__p__402781&#entry402781
| 1 |
3,551,977 | 08/23/2010 21:49:07 | 428,870 | 08/23/2010 21:36:58 | 1 | 0 | Google's username policies vs Facebook, Twitter and others... | I have a question I've been trying to understand for awhile now. Google has terrible username policies for accounts and services. You are unable to change your username, recover a deleted account or link usernames to various accounts. It's not possible to do anything. These issues have comes up numerous times with accounts that I manage and take care of.
I understand the security issues such as hackers retrieving deleted email accounts and stuff like that. But I don't quite understand why it's against policies to make general username changes without having to delete your entire accounts and start over from scratch. Most of the responses I've seen is that there's simply too much data that is tied to each username and service. I find that hard to believe when the some of the most popular sites in the world such as Facebook and Twitter offer the ability to swap usernames in an instant.
What do you guys think? Is it BS on Google's part or is there a lot of technical details involved in making changes to things like that? | database | facebook | google | twitter | username | 08/24/2010 02:18:37 | off topic | Google's username policies vs Facebook, Twitter and others...
===
I have a question I've been trying to understand for awhile now. Google has terrible username policies for accounts and services. You are unable to change your username, recover a deleted account or link usernames to various accounts. It's not possible to do anything. These issues have comes up numerous times with accounts that I manage and take care of.
I understand the security issues such as hackers retrieving deleted email accounts and stuff like that. But I don't quite understand why it's against policies to make general username changes without having to delete your entire accounts and start over from scratch. Most of the responses I've seen is that there's simply too much data that is tied to each username and service. I find that hard to believe when the some of the most popular sites in the world such as Facebook and Twitter offer the ability to swap usernames in an instant.
What do you guys think? Is it BS on Google's part or is there a lot of technical details involved in making changes to things like that? | 2 |
7,004,986 | 08/10/2011 01:35:39 | 861,578 | 07/25/2011 12:39:07 | 1 | 0 | Is there something html "for" attribute event flag? | How to I know event occured by "for" attribute??
Is there something like flag??
| javascript | html | javascript-events | null | null | 08/10/2011 02:32:51 | not a real question | Is there something html "for" attribute event flag?
===
How to I know event occured by "for" attribute??
Is there something like flag??
| 1 |
8,284,118 | 11/27/2011 06:55:02 | 273,656 | 02/15/2010 16:39:02 | 3 | 1 | Why is this variable is listed as unassigned local variable in C# through Mono | I am unable to determine why the code here will not compile in MonoDevelop 2.8.2 on Win32 using Mono 2.10.6. Monodevelop indicates that found_image_paths is an unassigned local variable?
Am I missing something here? I am new to C#
string path = this.DirectoryChooser.CurrentFolder;
Console.WriteLine ("Selected Path: " + path);
//Iterate over all DAE files in this folder
string[] model_paths = Directory.GetFiles(path,"*.dae");
HashSet<string> found_image_paths;
foreach (string dae_path in model_paths)
{
XmlDocument xmlDoc= new XmlDocument(); //* create an xml document object.
xmlDoc.Load(dae_path); //* load the XML document from the specified file.
//* Get elements.
XmlNodeList library_images = xmlDoc.GetElementsByTagName("library_images");
System.Console.WriteLine(dae_path);
foreach (XmlNode image_node in library_images[0].ChildNodes) {
string image_path = image_node.FirstChild.InnerText;
found_image_paths.Add(image_path);
Console.WriteLine(image_path);
}
}
//The next line returns the error "Use of unassigned local variable 'found_image_paths'
foreach (var item in found_image_paths) {
| c# | monodevelop | null | null | null | 11/27/2011 21:50:28 | too localized | Why is this variable is listed as unassigned local variable in C# through Mono
===
I am unable to determine why the code here will not compile in MonoDevelop 2.8.2 on Win32 using Mono 2.10.6. Monodevelop indicates that found_image_paths is an unassigned local variable?
Am I missing something here? I am new to C#
string path = this.DirectoryChooser.CurrentFolder;
Console.WriteLine ("Selected Path: " + path);
//Iterate over all DAE files in this folder
string[] model_paths = Directory.GetFiles(path,"*.dae");
HashSet<string> found_image_paths;
foreach (string dae_path in model_paths)
{
XmlDocument xmlDoc= new XmlDocument(); //* create an xml document object.
xmlDoc.Load(dae_path); //* load the XML document from the specified file.
//* Get elements.
XmlNodeList library_images = xmlDoc.GetElementsByTagName("library_images");
System.Console.WriteLine(dae_path);
foreach (XmlNode image_node in library_images[0].ChildNodes) {
string image_path = image_node.FirstChild.InnerText;
found_image_paths.Add(image_path);
Console.WriteLine(image_path);
}
}
//The next line returns the error "Use of unassigned local variable 'found_image_paths'
foreach (var item in found_image_paths) {
| 3 |
1,617,364 | 10/24/2009 08:31:46 | 179,364 | 09/26/2009 02:25:54 | 170 | 1 | What does the head of smarty cache files mean? | 132
a:4:{s:8:"template";a:1:{s:10:"index.html";b:1;}s:9:"timestamp";i:1256373019;s:7:"expires";i:1256373079;s:13:"cache_serials";a:0:{}}<body>
php<br >
java<br >
c++<br >
</body>
Can someone explain this part:
132
a:4:{s:8:"template";a:1:{s:10:"index.html";b:1;}s:9:"timestamp";i:1256373019;s:7:"expires";i:1256373079;s:13:"cache_serials";a:0:{}} | smarty | caching | null | null | null | null | open | What does the head of smarty cache files mean?
===
132
a:4:{s:8:"template";a:1:{s:10:"index.html";b:1;}s:9:"timestamp";i:1256373019;s:7:"expires";i:1256373079;s:13:"cache_serials";a:0:{}}<body>
php<br >
java<br >
c++<br >
</body>
Can someone explain this part:
132
a:4:{s:8:"template";a:1:{s:10:"index.html";b:1;}s:9:"timestamp";i:1256373019;s:7:"expires";i:1256373079;s:13:"cache_serials";a:0:{}} | 0 |
9,508,533 | 02/29/2012 23:48:00 | 783,353 | 06/03/2011 20:41:42 | 379 | 8 | Opensource project based on Symfony 2 or Zend Framework 2 | I am looking for repositories with open project that are good examples for learning.
I will be grateful if somebody share any links here.
Regards | git | zend-framework | open-source | symfony-2.0 | null | 03/05/2012 04:42:55 | off topic | Opensource project based on Symfony 2 or Zend Framework 2
===
I am looking for repositories with open project that are good examples for learning.
I will be grateful if somebody share any links here.
Regards | 2 |
10,407,819 | 05/02/2012 04:40:06 | 1,235,988 | 02/27/2012 16:11:43 | 11 | 0 | Loading the dojo toolbar before page content loads | In my application i have toolbar/menubar created using dojo toolbar component and i have the code for it in dojo.ready() method. but this toolbar is getting loaded at the end after the page content loads. this behaviour is because iam using dojo.ready() method which waits until the dom is ready. i tried placing the toolbar code directly in script tag but no use its not loading it at all this time. please help me how can i resolve this. | javascript | dojo | null | null | null | null | open | Loading the dojo toolbar before page content loads
===
In my application i have toolbar/menubar created using dojo toolbar component and i have the code for it in dojo.ready() method. but this toolbar is getting loaded at the end after the page content loads. this behaviour is because iam using dojo.ready() method which waits until the dom is ready. i tried placing the toolbar code directly in script tag but no use its not loading it at all this time. please help me how can i resolve this. | 0 |
11,733,443 | 07/31/2012 05:07:22 | 1,564,640 | 07/31/2012 03:58:40 | 1 | 0 | Need suggestions on thesis (Android) | I'm new here
Well, long story short, I'm making an Android application for my thesis but still cant decide between two topics (initially three) that I've discussed with my adviser.
- Kids tracker
There are two modes here; Parents mode (Register a kid, Track now) and Kids mode (will make the app to work in background if activated. Will not show any icons). My adviser also wants that the kids' phone will send an sms to the parents phone every time the kids does not stay in a place for a period of time. The locations of the kids are taken from the service provider. By doing this, the parents can still know their kids whereabouts even if there isn't any internet connection available
- Lyrics reader
The app will show the lyrics of the played song, taken from either the ID3V2 tag of the mp3 file or the internet. User can also save the lyrics to the tag and edit other kinds of attributes like title, artist, album, etc. The shown lyrics will also be synchronized with the played song (doesn't have to be that exact)
So...which one do you guys think will be simpler? I need to finish this in two months (yes, two months for a thesis =.=) and I'm not that familiar with Android programming (only learnt the most basics back then). What will be the hard parts in the development? What kind of codes or features or whatever we call them - will I need to use? Any help will be appreciated. Thanks so much | android | tracker | id3v2 | null | null | 08/01/2012 02:49:02 | too localized | Need suggestions on thesis (Android)
===
I'm new here
Well, long story short, I'm making an Android application for my thesis but still cant decide between two topics (initially three) that I've discussed with my adviser.
- Kids tracker
There are two modes here; Parents mode (Register a kid, Track now) and Kids mode (will make the app to work in background if activated. Will not show any icons). My adviser also wants that the kids' phone will send an sms to the parents phone every time the kids does not stay in a place for a period of time. The locations of the kids are taken from the service provider. By doing this, the parents can still know their kids whereabouts even if there isn't any internet connection available
- Lyrics reader
The app will show the lyrics of the played song, taken from either the ID3V2 tag of the mp3 file or the internet. User can also save the lyrics to the tag and edit other kinds of attributes like title, artist, album, etc. The shown lyrics will also be synchronized with the played song (doesn't have to be that exact)
So...which one do you guys think will be simpler? I need to finish this in two months (yes, two months for a thesis =.=) and I'm not that familiar with Android programming (only learnt the most basics back then). What will be the hard parts in the development? What kind of codes or features or whatever we call them - will I need to use? Any help will be appreciated. Thanks so much | 3 |
9,778,541 | 03/19/2012 21:55:02 | 1,279,322 | 03/19/2012 18:53:58 | 1 | 0 | Converting from Structured English to Python | It is easy, yes. But I'm stuck on a line which doesn't seem to work for what it should do. The structured English line is:
FOR NoOfGamesPlayed <- 1 TO NoOfGamesInMatch Do
I know this should be a for loop but can't seem to make a valid one. Any help? | python | null | null | null | null | 03/19/2012 22:02:28 | not a real question | Converting from Structured English to Python
===
It is easy, yes. But I'm stuck on a line which doesn't seem to work for what it should do. The structured English line is:
FOR NoOfGamesPlayed <- 1 TO NoOfGamesInMatch Do
I know this should be a for loop but can't seem to make a valid one. Any help? | 1 |
7,199,396 | 08/26/2011 02:21:27 | 873,839 | 08/02/2011 04:18:24 | 6 | 0 | A good Lua editor for Mac? | Whats a good Lua text editor for the Mac? All I need is just to edit the code. Not a Compiler or anything. | text | ide | editor | lua | null | 08/28/2011 12:15:30 | not constructive | A good Lua editor for Mac?
===
Whats a good Lua text editor for the Mac? All I need is just to edit the code. Not a Compiler or anything. | 4 |
4,826,619 | 01/28/2011 09:28:02 | 555,763 | 12/28/2010 08:03:51 | 5 | 0 | how to execute a javascript or render html on after_filter | or perhaps a work around?
Basically, my goal is, once the action has been completed, on my ApplicationController after_filter method, I want to modify/show something on the template with a javascript call that gets sent to the user's browser.
I'm okay with other solutions, need not be using the after_filter if there is no way you can do that in after_filter.
So a scenarion would be, after the controller action/all actions/methods have been processed, I'd do this:
document.getElementById("#errors").innerHTML = "Some error".
Thanks in advance. | ruby-on-rails | ruby | null | null | null | null | open | how to execute a javascript or render html on after_filter
===
or perhaps a work around?
Basically, my goal is, once the action has been completed, on my ApplicationController after_filter method, I want to modify/show something on the template with a javascript call that gets sent to the user's browser.
I'm okay with other solutions, need not be using the after_filter if there is no way you can do that in after_filter.
So a scenarion would be, after the controller action/all actions/methods have been processed, I'd do this:
document.getElementById("#errors").innerHTML = "Some error".
Thanks in advance. | 0 |
5,331,464 | 03/16/2011 20:40:59 | 71,830 | 02/24/2009 14:59:51 | 720 | 67 | IE6 and box model with padding | I have a box that is width:600px
i like to have text left, with padding of 20px
that box is flot with another at it side (sidebar/content)
in other browser it play fine, content-sidebar with define
in ie6 it see the content to be 600 + 20, witch push the sidebat to the bottom...
How do you use padding, that work in all the browser including ie6
thanks in advance | css | internet-explorer-6 | box | null | null | null | open | IE6 and box model with padding
===
I have a box that is width:600px
i like to have text left, with padding of 20px
that box is flot with another at it side (sidebar/content)
in other browser it play fine, content-sidebar with define
in ie6 it see the content to be 600 + 20, witch push the sidebat to the bottom...
How do you use padding, that work in all the browser including ie6
thanks in advance | 0 |
9,157,696 | 02/06/2012 09:01:03 | 1,190,937 | 02/05/2012 17:46:35 | 7 | 0 | Javascript code to get the html code of a webpage | Can u please tell me the javascript code to get the html code of a webpage? | javascript | html | null | null | null | 02/06/2012 09:04:32 | not a real question | Javascript code to get the html code of a webpage
===
Can u please tell me the javascript code to get the html code of a webpage? | 1 |
7,580,959 | 09/28/2011 09:18:58 | 717,058 | 04/20/2011 11:44:54 | 182 | 4 | CQRS and service bus | CQRS is about separating commmands and queries. We can add it easily several patterns & technologies like Event Sourcing, DDD, NoSQL, etc... but is serviceBus a mandatory ?
For example: I develop an application with the following project
- UI
- Commands
- Query
- BLL (simple methods with logics)
- Repository
Can we still say it is CQRS ? | cqrs | null | null | null | null | null | open | CQRS and service bus
===
CQRS is about separating commmands and queries. We can add it easily several patterns & technologies like Event Sourcing, DDD, NoSQL, etc... but is serviceBus a mandatory ?
For example: I develop an application with the following project
- UI
- Commands
- Query
- BLL (simple methods with logics)
- Repository
Can we still say it is CQRS ? | 0 |
6,466,644 | 06/24/2011 10:39:20 | 804,128 | 06/18/2011 00:46:58 | 26 | 0 | Running php script after page loaded | Everytime a user visits a wordpress single-post page, the script update_comments.php is executed. It works the way it should, but the user won't see the wordpress post, or anything for that matter, until the script has finished executing. I simply want to initiate the script without the user noticing a single thing. **ignore_user_abort(true)** is on in update_comments.php.
<?php
global $post;
$theid= $post->ID;
$url = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
preg_match('/http(.*):\/\/(.*)\/(.*)/',
$url, $matches4);
$url = trim($matches4[2]);
preg_match('/(.*)\/(.*)/',
$url, $matches5);
$url = trim($matches5[1]);
$url = 'http://'.$url.'/update_comments.php?theid='.$theid;
$myresult = file_get_contents($url);
?> | php | wordpress | null | null | null | 06/25/2011 10:15:44 | off topic | Running php script after page loaded
===
Everytime a user visits a wordpress single-post page, the script update_comments.php is executed. It works the way it should, but the user won't see the wordpress post, or anything for that matter, until the script has finished executing. I simply want to initiate the script without the user noticing a single thing. **ignore_user_abort(true)** is on in update_comments.php.
<?php
global $post;
$theid= $post->ID;
$url = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
preg_match('/http(.*):\/\/(.*)\/(.*)/',
$url, $matches4);
$url = trim($matches4[2]);
preg_match('/(.*)\/(.*)/',
$url, $matches5);
$url = trim($matches5[1]);
$url = 'http://'.$url.'/update_comments.php?theid='.$theid;
$myresult = file_get_contents($url);
?> | 2 |
7,446,962 | 09/16/2011 15:27:40 | 458,742 | 09/26/2010 14:45:11 | 3,983 | 242 | Generate a coredump from crashed process attached to ddd/dbx | I'm running dbx in ddd on Solaris. The attached process has crashed and I can examine the stack in the debugger.
I want to save this core dump to disk for later.
Google shows me several ways to create a core dump but none of them are ddd/dbx commands. `gcore` can't grab the process because dbx is already holding it.
So how do I do this? Thanks. | unix | solaris | coredump | dbx | ddd-debugger | null | open | Generate a coredump from crashed process attached to ddd/dbx
===
I'm running dbx in ddd on Solaris. The attached process has crashed and I can examine the stack in the debugger.
I want to save this core dump to disk for later.
Google shows me several ways to create a core dump but none of them are ddd/dbx commands. `gcore` can't grab the process because dbx is already holding it.
So how do I do this? Thanks. | 0 |
11,614,004 | 07/23/2012 13:57:48 | 1,545,823 | 07/23/2012 12:23:47 | 1 | 0 | How can I switch between views programmatically? | I have the following problem. I want to go from a view to another view, not with a button, but writing code. I have a view in which there are, among other things, some buttons. When I press one of them runs an if - else. From else I want to go to another view.
I have tried this
GameOverViewController *gOver = [[GameOverViewController alloc]initWithNibName:@"GameOverViewController" bundle:nil];
[self.view removeFromSuperview];
gOver.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:gOver animated:YES];
this
GameOverViewController *gOver = [[GameOverViewController alloc]initWithNibName:@"GameOverViewController" bundle:nil];
[self.view removeFromSuperview];
[self.view insertSubview:gOver.view atIndex:0];
and this
GameOverViewController *gOver = [[GameOverViewController alloc]initWithNibName:@"GameOverViewController" bundle:nil];
[self.view removeFromSuperview];
[self.view addSubview:gOver.view];
but nothing worked. Any ideas ?
Thanks in advance
| iphone | objective-c | uiviewcontroller | null | null | null | open | How can I switch between views programmatically?
===
I have the following problem. I want to go from a view to another view, not with a button, but writing code. I have a view in which there are, among other things, some buttons. When I press one of them runs an if - else. From else I want to go to another view.
I have tried this
GameOverViewController *gOver = [[GameOverViewController alloc]initWithNibName:@"GameOverViewController" bundle:nil];
[self.view removeFromSuperview];
gOver.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:gOver animated:YES];
this
GameOverViewController *gOver = [[GameOverViewController alloc]initWithNibName:@"GameOverViewController" bundle:nil];
[self.view removeFromSuperview];
[self.view insertSubview:gOver.view atIndex:0];
and this
GameOverViewController *gOver = [[GameOverViewController alloc]initWithNibName:@"GameOverViewController" bundle:nil];
[self.view removeFromSuperview];
[self.view addSubview:gOver.view];
but nothing worked. Any ideas ?
Thanks in advance
| 0 |
8,812,195 | 01/10/2012 23:42:12 | 339,946 | 05/13/2010 04:57:26 | 87 | 0 | How to achieve continuous drag drop menu effect? | I'm trying to achieve a Drag and Drop menu affect. I'm not sure how to go about this, perhaps someone has experience with this exact effect.
Quite simply, when a user touches down on a menu item, I want a graphic to appear at their touch location. Their touch will now control the panning of the graphic. Upon releasing the touch, the graphic will sit in its place and assume full alpha.
I'm already familiar with creating pan gestures and instantiating a graphic. So far, I can create the graphic where the menu item is touched. The biggest issue is how I "pass over" the touch gesture so it is a single and continuous motion.
Also, should the menu item be UIButton or UIImageView?
Any help appreciated. Thanks
![enter image description here][1]
[1]: http://i.stack.imgur.com/RtdE1.png | iphone | ios | xcode | ipad | null | null | open | How to achieve continuous drag drop menu effect?
===
I'm trying to achieve a Drag and Drop menu affect. I'm not sure how to go about this, perhaps someone has experience with this exact effect.
Quite simply, when a user touches down on a menu item, I want a graphic to appear at their touch location. Their touch will now control the panning of the graphic. Upon releasing the touch, the graphic will sit in its place and assume full alpha.
I'm already familiar with creating pan gestures and instantiating a graphic. So far, I can create the graphic where the menu item is touched. The biggest issue is how I "pass over" the touch gesture so it is a single and continuous motion.
Also, should the menu item be UIButton or UIImageView?
Any help appreciated. Thanks
![enter image description here][1]
[1]: http://i.stack.imgur.com/RtdE1.png | 0 |
4,704,079 | 01/16/2011 05:58:40 | 236,924 | 12/22/2009 14:50:13 | 544 | 2 | Rails 3 jquery autocomplete | So I followed this tutorial:
https://github.com/crowdint/rails3-jquery-autocomplete-app
However I am only getting a textbox and no autocomplete help when I type. Does anyone know what can be the problem? | ruby-on-rails-3 | null | null | null | null | null | open | Rails 3 jquery autocomplete
===
So I followed this tutorial:
https://github.com/crowdint/rails3-jquery-autocomplete-app
However I am only getting a textbox and no autocomplete help when I type. Does anyone know what can be the problem? | 0 |
6,300,750 | 06/10/2011 00:25:22 | 648,566 | 03/07/2011 17:29:44 | 79 | 0 | Straight poker hand logic | I need some help implementing a straight hand poker in my program, so basically we have 2,3,4,5,6,7,8,9 and 0 is ten and J,Q,K,A. I'm using a array of 5 elements. How do I write a function that when a user enter a hand, lets say 23456 or 67890, or 42315, it will know it's a straight hand. I'm not required to check the suit of the card, and it's not a wrap around straight...Could somebody help me implement this using something like a for loop? I tried writing a for loop with a switch to switch the J,Q,K and A to a value of 11,12,13,14 but it's not working for me. | c | program | null | null | null | 06/10/2011 19:52:44 | not a real question | Straight poker hand logic
===
I need some help implementing a straight hand poker in my program, so basically we have 2,3,4,5,6,7,8,9 and 0 is ten and J,Q,K,A. I'm using a array of 5 elements. How do I write a function that when a user enter a hand, lets say 23456 or 67890, or 42315, it will know it's a straight hand. I'm not required to check the suit of the card, and it's not a wrap around straight...Could somebody help me implement this using something like a for loop? I tried writing a for loop with a switch to switch the J,Q,K and A to a value of 11,12,13,14 but it's not working for me. | 1 |
4,584,974 | 01/03/2011 13:50:59 | 469,110 | 10/07/2010 13:03:33 | 10 | 1 | Simple: replace div with ajax content (jquery) | I followed [this thread][1]. I now have:
<a href="#" onclick="$('#gc').load('test');">reload</a>... </span>
<div id="gc">
empty
</div>
This is what I am getting:
Uncaught exception: TypeError: Cannot convert '$('#gc')' to object
Error thrown at line 1, column 0 in <anonymous function>(event):
$('#gc').load('test');
What is that? I thought I would be able to select a div and replace the contents with load()?
[1]: http://stackoverflow.com/questions/483745/replace-html-page-with-contents-retrieved-via-ajax
| javascript | jquery | ajax | null | null | null | open | Simple: replace div with ajax content (jquery)
===
I followed [this thread][1]. I now have:
<a href="#" onclick="$('#gc').load('test');">reload</a>... </span>
<div id="gc">
empty
</div>
This is what I am getting:
Uncaught exception: TypeError: Cannot convert '$('#gc')' to object
Error thrown at line 1, column 0 in <anonymous function>(event):
$('#gc').load('test');
What is that? I thought I would be able to select a div and replace the contents with load()?
[1]: http://stackoverflow.com/questions/483745/replace-html-page-with-contents-retrieved-via-ajax
| 0 |
6,312,125 | 06/10/2011 21:13:26 | 793,401 | 06/10/2011 21:13:26 | 1 | 0 | C# set Event From string | I have a form,a button in form,and a dll file.dll file have a method like
mybuttonclick(object sender,eventargs e)
{
//some code
}
and myform code like that
public static Formk : System.Windows.Forms.form
{
public void load
{
}
}
I am using my dll file with reclection and I want to that add event with event name from string like "Click" , button."Click"+=my recletion code.How can I make?thanks
| c# | null | null | null | null | 06/11/2011 10:02:47 | not a real question | C# set Event From string
===
I have a form,a button in form,and a dll file.dll file have a method like
mybuttonclick(object sender,eventargs e)
{
//some code
}
and myform code like that
public static Formk : System.Windows.Forms.form
{
public void load
{
}
}
I am using my dll file with reclection and I want to that add event with event name from string like "Click" , button."Click"+=my recletion code.How can I make?thanks
| 1 |
5,812,113 | 04/28/2011 00:00:06 | 479,478 | 10/18/2010 15:47:25 | 8 | 0 | Pygtk: Change a widget's border color | I have looked everywhere but couldn't seem to find a way to change the color of the border.
For example I need a button like this:
gb = gtk.Button("Hi")
gb.set_border_width(50)
Now I wish to color the border red (this is a non-existent call):
gb.set_border_color('red')
I tried gb.modify_bg(...) but it only changes the background of the button, not the BORDER surrounding it. The closet thing I can get is adding this GtkButton to a GtkFrame, and use the frame's shadow color. However the shadow box's width is fixed - it's a thin line way below my desired thickness.
It's intuitive to me that if you can change the width of a border, you should be able to set more styles on it. I am open to other ways to achieve the same thick-colored-border effect, such as laying the button on top of some big, colored background?
Thanks for any help here. | colors | width | pygtk | border | shadow | null | open | Pygtk: Change a widget's border color
===
I have looked everywhere but couldn't seem to find a way to change the color of the border.
For example I need a button like this:
gb = gtk.Button("Hi")
gb.set_border_width(50)
Now I wish to color the border red (this is a non-existent call):
gb.set_border_color('red')
I tried gb.modify_bg(...) but it only changes the background of the button, not the BORDER surrounding it. The closet thing I can get is adding this GtkButton to a GtkFrame, and use the frame's shadow color. However the shadow box's width is fixed - it's a thin line way below my desired thickness.
It's intuitive to me that if you can change the width of a border, you should be able to set more styles on it. I am open to other ways to achieve the same thick-colored-border effect, such as laying the button on top of some big, colored background?
Thanks for any help here. | 0 |
11,274,036 | 06/30/2012 12:22:09 | 1,115,102 | 12/25/2011 06:00:11 | 6 | 0 | Track GPS Device | I am about to develop gps tracking system. Please give me some information how to monitor gps device install on my car in my desktop application on real time basis.
Thnaks | java | null | null | null | null | 06/30/2012 22:28:44 | not a real question | Track GPS Device
===
I am about to develop gps tracking system. Please give me some information how to monitor gps device install on my car in my desktop application on real time basis.
Thnaks | 1 |
5,324,985 | 03/16/2011 12:06:00 | 168,796 | 09/04/2009 21:44:45 | 228 | 6 | Using a view as a join table with Hibernate | I've got two entities which I want to join via a common String.
I've created a view which I want to use as the join table. This all works fine except for when I try to delete an entity. Hibernate then tries to delete from that view which of course fails. The database used is MySQL.
So I've got
@Entity
public class Event {
...
String productId;
Date eventDatetime;
...
}
@Entity
public class Stock {
...
String productId;
...
}
I've created a view in MySQL
DROP VIEW IF EXISTS EVENT_STOCK_VIEW;
create view EVENT_STOCK_VIEW AS
SELECT EVENT.EVENT_ID, STOCK.STOCK_ID
FROM EVENT, STOCK
where STOCK.PRODUCT_ID = EVENT.PRODUCT_ID;
in Event I've added:
@ManyToOne(fetch=FetchType.LAZY)
@JoinTable(name="EVENT_STOCK_VIEW",
joinColumns=@JoinColumn(name="EVENT_ID"),
inverseJoinColumns=@JoinColumn(name="STOCK_ID",updatable=false,insertable=false))
public Stock getStock(){
return this.stock;
}
and in Stock:
@OneToMany(fetch=FetchType.LAZY)
@JoinTable(name="EVENT_STOCK_VIEW",
joinColumns=@JoinColumn(name="STOCK_ID",updatable=false,insertable=false), inverseJoinColumns=@JoinColumn(name="EVENT_ID",updatable=false,insertable=false))
@OrderBy("eventDatetime DESC")
public List<Event> getEvents(){
return events;
}
I've googled a bit and found this https://forum.hibernate.org/viewtopic.php?t=985505
But the solution isn't really that nice (you have to use entity in between stock and event).
Are there any other solutions?
I could use a Hibernate Interceptor and override onPrepareStatement(String sql) and check whether the SQL string contains delete from EVENT_STOCK_VIEW and return an dummy command. Clearly a hack which I try to avoid.
| java | mysql | hibernate | java-ee | view | null | open | Using a view as a join table with Hibernate
===
I've got two entities which I want to join via a common String.
I've created a view which I want to use as the join table. This all works fine except for when I try to delete an entity. Hibernate then tries to delete from that view which of course fails. The database used is MySQL.
So I've got
@Entity
public class Event {
...
String productId;
Date eventDatetime;
...
}
@Entity
public class Stock {
...
String productId;
...
}
I've created a view in MySQL
DROP VIEW IF EXISTS EVENT_STOCK_VIEW;
create view EVENT_STOCK_VIEW AS
SELECT EVENT.EVENT_ID, STOCK.STOCK_ID
FROM EVENT, STOCK
where STOCK.PRODUCT_ID = EVENT.PRODUCT_ID;
in Event I've added:
@ManyToOne(fetch=FetchType.LAZY)
@JoinTable(name="EVENT_STOCK_VIEW",
joinColumns=@JoinColumn(name="EVENT_ID"),
inverseJoinColumns=@JoinColumn(name="STOCK_ID",updatable=false,insertable=false))
public Stock getStock(){
return this.stock;
}
and in Stock:
@OneToMany(fetch=FetchType.LAZY)
@JoinTable(name="EVENT_STOCK_VIEW",
joinColumns=@JoinColumn(name="STOCK_ID",updatable=false,insertable=false), inverseJoinColumns=@JoinColumn(name="EVENT_ID",updatable=false,insertable=false))
@OrderBy("eventDatetime DESC")
public List<Event> getEvents(){
return events;
}
I've googled a bit and found this https://forum.hibernate.org/viewtopic.php?t=985505
But the solution isn't really that nice (you have to use entity in between stock and event).
Are there any other solutions?
I could use a Hibernate Interceptor and override onPrepareStatement(String sql) and check whether the SQL string contains delete from EVENT_STOCK_VIEW and return an dummy command. Clearly a hack which I try to avoid.
| 0 |
11,407,063 | 07/10/2012 05:22:02 | 1,438,364 | 06/05/2012 21:02:56 | 3 | 0 | jCarousel scroll | Now the selector (the red border) is moving on the small images. How can I do it so the selector to not hiding? I need it in that way so when it (the selector) comes to the end of the small images they should be scrolling too.
My other question is how to make the small image’s scroller to moving in both directions? Now the little images are moving only in the right direction when you click on them. Can I do it like it’s in the example – when you click on the image depending on the location of the image to move left or right.
Please, if you have a time, help me to optimize this code for my needs. I really want to have maximum correct code.
Download All files: http://tranzit.dir.bg/load.php?id=WAI2w4RujjSQbfDd1275372
Thank you! | javascript | jquery | jcarousel | null | null | 07/13/2012 11:56:29 | too localized | jCarousel scroll
===
Now the selector (the red border) is moving on the small images. How can I do it so the selector to not hiding? I need it in that way so when it (the selector) comes to the end of the small images they should be scrolling too.
My other question is how to make the small image’s scroller to moving in both directions? Now the little images are moving only in the right direction when you click on them. Can I do it like it’s in the example – when you click on the image depending on the location of the image to move left or right.
Please, if you have a time, help me to optimize this code for my needs. I really want to have maximum correct code.
Download All files: http://tranzit.dir.bg/load.php?id=WAI2w4RujjSQbfDd1275372
Thank you! | 3 |
369,519 | 12/15/2008 20:00:35 | 38,695 | 11/18/2008 20:52:12 | 21 | 5 | Is it better to use NOT or <> when comparing values ? | Is it better to use NOT or to use <> when comparing values in VBScript?<br>
is this:
<pre><code>
If NOT value1 = value2 Then
</code></pre>
or this:
<pre><code>
If value1 <> value2 Then
</code></pre>
better? | vbscript | null | null | null | null | null | open | Is it better to use NOT or <> when comparing values ?
===
Is it better to use NOT or to use <> when comparing values in VBScript?<br>
is this:
<pre><code>
If NOT value1 = value2 Then
</code></pre>
or this:
<pre><code>
If value1 <> value2 Then
</code></pre>
better? | 0 |
7,664,400 | 10/05/2011 16:14:05 | 933,074 | 09/07/2011 15:30:34 | 8 | 0 | Don't apply style to my button | I want to put a button without style inside a big page that use several CSS. So, I don't want to apply these styles to my button.
Thanks! | css | null | null | null | null | 10/05/2011 18:55:11 | not a real question | Don't apply style to my button
===
I want to put a button without style inside a big page that use several CSS. So, I don't want to apply these styles to my button.
Thanks! | 1 |
9,057,681 | 01/29/2012 23:16:11 | 1,177,058 | 01/29/2012 23:13:59 | 1 | 0 | simple programming? | void square(double* x)
i dont understand the (double * x) part of it
if it was without the * i would understand it, because it just like declaring a variable, but now i dont get it. I read that its a pointer but how does it work, can someone please give an example.
is it instead of declaring a variable "x" of type "double", pointing to another variable called x, which has type double.
so to call the variable the he referenced he would write
*x.
| java | c++ | null | null | null | 01/29/2012 23:19:28 | not a real question | simple programming?
===
void square(double* x)
i dont understand the (double * x) part of it
if it was without the * i would understand it, because it just like declaring a variable, but now i dont get it. I read that its a pointer but how does it work, can someone please give an example.
is it instead of declaring a variable "x" of type "double", pointing to another variable called x, which has type double.
so to call the variable the he referenced he would write
*x.
| 1 |
7,937,667 | 10/29/2011 07:53:40 | 630,908 | 02/23/2011 19:09:04 | 400 | 2 | The directive #pragma, why it is called as such? | I would ask about the directive `#pragma`, it is stand fot what? And why it is called as such? | c++ | null | null | null | null | 10/29/2011 11:11:33 | not constructive | The directive #pragma, why it is called as such?
===
I would ask about the directive `#pragma`, it is stand fot what? And why it is called as such? | 4 |
10,837,081 | 05/31/2012 15:55:49 | 1,414,745 | 05/24/2012 10:19:42 | 8 | 0 | function defined in .cpp, but used in .h | I have an inline function defined in a header file. The inline function makes a call to another function, which is defined later in the .cpp file. My compiler gives an error. Which is the best way to fix that?
thanks! | c++ | header | null | null | null | 06/11/2012 15:11:58 | not a real question | function defined in .cpp, but used in .h
===
I have an inline function defined in a header file. The inline function makes a call to another function, which is defined later in the .cpp file. My compiler gives an error. Which is the best way to fix that?
thanks! | 1 |
3,087,377 | 06/21/2010 18:31:10 | 39,677 | 11/03/2008 21:48:03 | 4,747 | 3 | grails has some strange syntax, how is that java? | grails has some strange syntax, how is that java?
is it a custom templating language that then gets compiled down to java? | java | grails | null | null | null | 05/14/2012 17:06:49 | not constructive | grails has some strange syntax, how is that java?
===
grails has some strange syntax, how is that java?
is it a custom templating language that then gets compiled down to java? | 4 |
11,275,785 | 06/30/2012 16:37:12 | 1,493,263 | 06/30/2012 16:32:53 | 1 | 0 | Azure login issue for Turkish users | (Turkce bilgi asagida)
As of June 2012 the old Windows Azure management portal have some issues with Turkish.
You might get the following error
Sorry, Windows Azure was unable to complete your request. Please refer to theWindows Azure forum where current issues and topics are discussed.
Until this is resolved I suggest you do one of the following.
Use the new preview portal instead: https://manage.windowsazure.com/
Or decrease the priority of Turkish in your browser: For Internet Explorer, open Internet Optrions, click Languages button. And then make sure Turkish is not the highest priority language.
In Turkish
Hekese merhaba,
Haziran 2012 itibari ile eski yönetim portalının Türkçe ile ilgili bazı sorunları var.
Sorun çözülene kadar aşağıdakilerden bir tanesini yapmanızı tavsiye ediyoruz.
Yeni yönetim portalını kullanın: https://manage.windowsazure.com/
Veya tarayıcınızın ayarlarından Türkçe'nin önceliğini düşürün. Internet Explorer için, Ayarlar, Diller düğmesine tıklayın. Sonra Türkçe'nin en yukarıda görünmediğinden emin olun.
Hakan Eren
| azure | turkish | null | null | null | 07/01/2012 21:12:59 | not a real question | Azure login issue for Turkish users
===
(Turkce bilgi asagida)
As of June 2012 the old Windows Azure management portal have some issues with Turkish.
You might get the following error
Sorry, Windows Azure was unable to complete your request. Please refer to theWindows Azure forum where current issues and topics are discussed.
Until this is resolved I suggest you do one of the following.
Use the new preview portal instead: https://manage.windowsazure.com/
Or decrease the priority of Turkish in your browser: For Internet Explorer, open Internet Optrions, click Languages button. And then make sure Turkish is not the highest priority language.
In Turkish
Hekese merhaba,
Haziran 2012 itibari ile eski yönetim portalının Türkçe ile ilgili bazı sorunları var.
Sorun çözülene kadar aşağıdakilerden bir tanesini yapmanızı tavsiye ediyoruz.
Yeni yönetim portalını kullanın: https://manage.windowsazure.com/
Veya tarayıcınızın ayarlarından Türkçe'nin önceliğini düşürün. Internet Explorer için, Ayarlar, Diller düğmesine tıklayın. Sonra Türkçe'nin en yukarıda görünmediğinden emin olun.
Hakan Eren
| 1 |
4,163,343 | 11/12/2010 09:47:06 | 266,908 | 02/05/2010 09:03:06 | 30 | 2 | put method in the json object adds value to the first of the jsonobject; | Consider following piece of code:
JSONObject json=new JSONObject();
json.put("one"1);
json.put("two"2);
json.put("three"3);
If i print the jsonobject it prints like this
{"three":"1","two":"2","one":"1"}
But i want like this.
{"one":"1","two":"2","three":"1"}
Please help. Thanks in advance.
| json | null | null | null | null | null | open | put method in the json object adds value to the first of the jsonobject;
===
Consider following piece of code:
JSONObject json=new JSONObject();
json.put("one"1);
json.put("two"2);
json.put("three"3);
If i print the jsonobject it prints like this
{"three":"1","two":"2","one":"1"}
But i want like this.
{"one":"1","two":"2","three":"1"}
Please help. Thanks in advance.
| 0 |
8,024,411 | 11/06/2011 00:37:06 | 27,305 | 10/13/2008 03:41:50 | 2,464 | 27 | How to mimic the user experience of native application while building for cross mobile? | I'm building an application which I intend to deploy to iphone, android and blackberry. There's a unique characteristic I've noticed about my blackberry bold 9700, which uses an optical track pad for maneuvering around the screen. As an experiment, I deployed a simple phone gap application to my blackberry. I used the optical track pad to move a "small arrow cursor" around the screen to select and click on elements. When I compared my experimental app to some of the other native blackberry applications on my device, I noticed that none of them use this "small arrow cursor". Instead, sliding my thumb across the optical track pad will cause a "hi-light selector" to jump from one available link/button/field/image/list-item/tab etc... to another. This "hi-light selector" is much faster and user-friendly than the "small arrow cursor".
Now I need advice on the best technology to achieve the following:
- I would like to write one set of code for an application to deploy to
iOS 4+ , android 2.2+ and Blackberry OS6+
- On android and ios devices, you can simply scroll and touch buttons
for call to actions. On blackberry, I would like to replace the
"small arrow cursor" with the "hi-light selector".
- I would like to use slide screen effects on android and ios devices.
On the blackberry, I would need a good substitute.
So my question is: Is there a practical way for a solo developer to achieve all the criteria above? If not, then what is the closest I can achieve to the criteria above? And what mobile javascript library would be best for the job[1]? Or do I really have to consider building with native technology (obj c for ios, java for android, java for bbos)?
1. I've only looked at sencha touch and didn't see anything relevant to the "hi-light selector".
| mobile | phonegap | null | null | null | null | open | How to mimic the user experience of native application while building for cross mobile?
===
I'm building an application which I intend to deploy to iphone, android and blackberry. There's a unique characteristic I've noticed about my blackberry bold 9700, which uses an optical track pad for maneuvering around the screen. As an experiment, I deployed a simple phone gap application to my blackberry. I used the optical track pad to move a "small arrow cursor" around the screen to select and click on elements. When I compared my experimental app to some of the other native blackberry applications on my device, I noticed that none of them use this "small arrow cursor". Instead, sliding my thumb across the optical track pad will cause a "hi-light selector" to jump from one available link/button/field/image/list-item/tab etc... to another. This "hi-light selector" is much faster and user-friendly than the "small arrow cursor".
Now I need advice on the best technology to achieve the following:
- I would like to write one set of code for an application to deploy to
iOS 4+ , android 2.2+ and Blackberry OS6+
- On android and ios devices, you can simply scroll and touch buttons
for call to actions. On blackberry, I would like to replace the
"small arrow cursor" with the "hi-light selector".
- I would like to use slide screen effects on android and ios devices.
On the blackberry, I would need a good substitute.
So my question is: Is there a practical way for a solo developer to achieve all the criteria above? If not, then what is the closest I can achieve to the criteria above? And what mobile javascript library would be best for the job[1]? Or do I really have to consider building with native technology (obj c for ios, java for android, java for bbos)?
1. I've only looked at sencha touch and didn't see anything relevant to the "hi-light selector".
| 0 |
4,730,405 | 01/18/2011 23:55:53 | 241,654 | 12/31/2009 17:56:43 | 211 | 2 | How to extract apple's 1 billion countdown? | I've been trying to figure it out for hours and i didn't success, This count *up* [counter][1] from apple 1 billion downloads prize. doesn't use flash at all, only javascript and 0-9 images, which makes it really cool. Now after stackoverflow successed to extract google's pacman, can we do that?
P.S I can't even know if this is using prototype or scriptaculous since they're both included.
[1]: http://www.apple.com/itunes/10-billion-app-countdown/ | javascript | null | null | null | null | 01/19/2011 00:33:08 | not a real question | How to extract apple's 1 billion countdown?
===
I've been trying to figure it out for hours and i didn't success, This count *up* [counter][1] from apple 1 billion downloads prize. doesn't use flash at all, only javascript and 0-9 images, which makes it really cool. Now after stackoverflow successed to extract google's pacman, can we do that?
P.S I can't even know if this is using prototype or scriptaculous since they're both included.
[1]: http://www.apple.com/itunes/10-billion-app-countdown/ | 1 |
11,475,314 | 07/13/2012 17:20:14 | 1,507,213 | 07/06/2012 15:37:04 | 59 | 0 | If statement with two condition and file header? | So my goal here is to use an if statement with two conditions to test before writing a header of a file. However for some reason, my if statement with two testing conditions didn't even go though some at some point in the run something should have pass the if statement test.
Here is my code below: Thanks in advance.
<code>uniprotID ='Q14591'
makeList = createRef()
for i, (start, end) in enumerate(searchPFAM(fname)):
print start, end
for item in lookup[uniprotID]:
if start <=end:
if (start <= item) and (item <=end):
with open('newfile-%s.txt' % i,'w') as fileinput:
fileinput.write(">"+uniprotID+' | '+ int(item-start)+' at position')
text=''.join(makeList[(start-1):(end)])
fileinput.write(text)
else:
with open('newfile-%s.txt' % i,'w') as fileinput:
fileinput.write(">"+uniprotID+' | '+ 'There is no mutation position')
text=''.join(makeList[(start-1):(end)])
fileinput.write(text)</code> | python | testing | if-statement | header | null | 07/14/2012 05:02:37 | too localized | If statement with two condition and file header?
===
So my goal here is to use an if statement with two conditions to test before writing a header of a file. However for some reason, my if statement with two testing conditions didn't even go though some at some point in the run something should have pass the if statement test.
Here is my code below: Thanks in advance.
<code>uniprotID ='Q14591'
makeList = createRef()
for i, (start, end) in enumerate(searchPFAM(fname)):
print start, end
for item in lookup[uniprotID]:
if start <=end:
if (start <= item) and (item <=end):
with open('newfile-%s.txt' % i,'w') as fileinput:
fileinput.write(">"+uniprotID+' | '+ int(item-start)+' at position')
text=''.join(makeList[(start-1):(end)])
fileinput.write(text)
else:
with open('newfile-%s.txt' % i,'w') as fileinput:
fileinput.write(">"+uniprotID+' | '+ 'There is no mutation position')
text=''.join(makeList[(start-1):(end)])
fileinput.write(text)</code> | 3 |
5,483,546 | 03/30/2011 08:01:18 | 683,426 | 03/30/2011 06:54:18 | 1 | 0 | Why do only 2 apps on 1 PC fail to connect to my SQL Server? All else will connect. | There are numerous relevant details here, so read carefully.
I'm helping a video rental store switch to a new POS (cash register) software. Their previous software came pre-installed on 3 PCs which were purchased from the software publisher. Computer #1 contains SQL Server which serves the POS software on all 3 computers. This was the old set-up. (This may or may not be relevant.)
The new software will be using a remote, offsite SQL Server. I've installed the new POS software on all 3 computers; they will simply point to a different SQL server than the previous software did.
Unfortunately, I cannot get the new software to connect to the new SQL Server from all 3 of the computers. On computer 1, which was previously the server for the old software, the new software fails to find the new server. Instantly, with no lag time whatsoever, the software simply reports that the target server could not be found. However, on that same computer, I have no trouble connecting to the new SQL Server using SQL Server Management Studio. Ping also has no trouble reaching the remote server. It's only the POS software that can't find/connect to the new SQL server.
On computers #2 and #3, the new POS software CAN connect successfully to my new SQL server. This tells me the POS software itself is probably not at fault. There's something else on Computer #1 stopping the connection from succeeding.
I disabled the McAfee firewall on computer #1 with no effect. The POS software still failed to connect. I checked the router settings for possible firewall issues there. Nothing. I disconnected the network cable from Computer #1 and connected it to my laptop where I was able to connect with no problem.
It's just this 1 application on this one computer that can't reach the remote SQL Server. Well actually, there is a companion app which has the same problem, but again, only on Computer #1. Since the companion app has the same problem I can't blame a corrupt installation. The companion app does not share installed components with the main app as it is a small standalone executable.
I've double-triple-quadruple-checked the server address, login, password, etc.
What could the problem possibly be? Besides the McAfee firewall software, is there somewhere else in the system that could be blocking this app from connecting to the remote SQL server? Some policy settings maybe? Since Computer #1 was designated as a server to the old POS system, could the software publishers have configured it with tighter security that is blocking the outbound connection from unknown 3rd party apps, but not from SQL Server Management Studio?
Is there maybe a network utility that can monitor a specific app's network connection attempts and identify where/why the connection is being blocked?
I'm not an expert at this stuff so if you reply, please be specific about where and how to fix the problem. Or at least some tips on how to diagnose it. | sql-server | null | null | null | null | 11/30/2011 03:34:36 | off topic | Why do only 2 apps on 1 PC fail to connect to my SQL Server? All else will connect.
===
There are numerous relevant details here, so read carefully.
I'm helping a video rental store switch to a new POS (cash register) software. Their previous software came pre-installed on 3 PCs which were purchased from the software publisher. Computer #1 contains SQL Server which serves the POS software on all 3 computers. This was the old set-up. (This may or may not be relevant.)
The new software will be using a remote, offsite SQL Server. I've installed the new POS software on all 3 computers; they will simply point to a different SQL server than the previous software did.
Unfortunately, I cannot get the new software to connect to the new SQL Server from all 3 of the computers. On computer 1, which was previously the server for the old software, the new software fails to find the new server. Instantly, with no lag time whatsoever, the software simply reports that the target server could not be found. However, on that same computer, I have no trouble connecting to the new SQL Server using SQL Server Management Studio. Ping also has no trouble reaching the remote server. It's only the POS software that can't find/connect to the new SQL server.
On computers #2 and #3, the new POS software CAN connect successfully to my new SQL server. This tells me the POS software itself is probably not at fault. There's something else on Computer #1 stopping the connection from succeeding.
I disabled the McAfee firewall on computer #1 with no effect. The POS software still failed to connect. I checked the router settings for possible firewall issues there. Nothing. I disconnected the network cable from Computer #1 and connected it to my laptop where I was able to connect with no problem.
It's just this 1 application on this one computer that can't reach the remote SQL Server. Well actually, there is a companion app which has the same problem, but again, only on Computer #1. Since the companion app has the same problem I can't blame a corrupt installation. The companion app does not share installed components with the main app as it is a small standalone executable.
I've double-triple-quadruple-checked the server address, login, password, etc.
What could the problem possibly be? Besides the McAfee firewall software, is there somewhere else in the system that could be blocking this app from connecting to the remote SQL server? Some policy settings maybe? Since Computer #1 was designated as a server to the old POS system, could the software publishers have configured it with tighter security that is blocking the outbound connection from unknown 3rd party apps, but not from SQL Server Management Studio?
Is there maybe a network utility that can monitor a specific app's network connection attempts and identify where/why the connection is being blocked?
I'm not an expert at this stuff so if you reply, please be specific about where and how to fix the problem. Or at least some tips on how to diagnose it. | 2 |
10,709,484 | 05/22/2012 20:13:50 | 781,332 | 06/02/2011 14:43:33 | 710 | 22 | How to configure AppWrench tools in Eclipse to work with maven-ized GAE project? | Before maven-izing a GAE application, I was able to use the AppWrench tools from OnPositive to view the datastore inside Eclipse.
After maven-izing, I can't get things working again. Here's what I've done so far:
I installed the auth.jar and baseViewerImpl.jar files into my local maven repository with associated pom files that list dependencies on commons-io-2.3 and commons-fileupload-1.2.1.jar. And I added dependencies for auth.jar and baseViewerImpl.jar to my project's pom file.
When the AppWrench plugin prompts me with "Do you want to configure project to add OnPositive Base Viewer support now?", I click OK, and it seems to do something. However, in my Eclipse Error Log view, I see
"Problems occurred when invoking code from plug-in: "org.eclipse.text".
and
"Could not ensure WAR argument existence for the unmanaged WAR project.
I thought maybe AppWrench doesn't like the fact that the war directory is now under "target". I'm on Windows 7, so I created a symbolic link at the top level of my Eclipse project directory called "war" that points to the war directory under "target", but no luck.
If anybody has got this working, could you share what you did?
| google-app-engine | maven | null | null | null | null | open | How to configure AppWrench tools in Eclipse to work with maven-ized GAE project?
===
Before maven-izing a GAE application, I was able to use the AppWrench tools from OnPositive to view the datastore inside Eclipse.
After maven-izing, I can't get things working again. Here's what I've done so far:
I installed the auth.jar and baseViewerImpl.jar files into my local maven repository with associated pom files that list dependencies on commons-io-2.3 and commons-fileupload-1.2.1.jar. And I added dependencies for auth.jar and baseViewerImpl.jar to my project's pom file.
When the AppWrench plugin prompts me with "Do you want to configure project to add OnPositive Base Viewer support now?", I click OK, and it seems to do something. However, in my Eclipse Error Log view, I see
"Problems occurred when invoking code from plug-in: "org.eclipse.text".
and
"Could not ensure WAR argument existence for the unmanaged WAR project.
I thought maybe AppWrench doesn't like the fact that the war directory is now under "target". I'm on Windows 7, so I created a symbolic link at the top level of my Eclipse project directory called "war" that points to the war directory under "target", but no luck.
If anybody has got this working, could you share what you did?
| 0 |
3,099,134 | 06/23/2010 05:29:57 | 291,772 | 03/11/2010 18:38:45 | 812 | 24 | Getting class value. | I have an image, onclick on wich i make some `ajax` requests.
i need to pass a variable from `$_GET[]` to my onclick function, so i deside to do the following
<img id="img1" class="<?=$_GET['value']"?> />
and jquery
$("#img").click(function()
{
how can i get the class value here???
});
Thanks | javascript | jquery | null | null | null | null | open | Getting class value.
===
I have an image, onclick on wich i make some `ajax` requests.
i need to pass a variable from `$_GET[]` to my onclick function, so i deside to do the following
<img id="img1" class="<?=$_GET['value']"?> />
and jquery
$("#img").click(function()
{
how can i get the class value here???
});
Thanks | 0 |
6,436,753 | 06/22/2011 08:05:00 | 784,606 | 06/05/2011 09:23:31 | 31 | 0 | Is there a way to refactor this javascript/jquery? |
switch (options.effect) {
case 'h-blinds-fadein':
$('.child').each(function (i) {
$(this).stop().css({opacity:0}).delay(100 * i).animate({
'opacity': 1
}, {
duration: options.speed,
complete: (i !== r * c - 1) ||
function () {
$(this).parent().replaceWith(prev);
options.cp.bind('click',{effect: options.effect},options.ch);
}
});
});
break;
case 'h-blinds-fadein-reverse':
$('.child').each(function (i) {
$(this).stop().css({opacity:0}).delay(100 * (r * c - i)).animate({
'opacity': 1
}, {
duration: options.speed,
complete: (i !== 0) ||
function () {
$(this).parent().replaceWith(prev);
options.cp.bind('click',{effect: options.effect},options.ch);
}
});
});
break;
....more cases
}
I have alot of similiar other cases. One way i could think of is to write functions ? i'm not sure i'm still fairly new to the language | javascript | jquery | refactoring | case | switch | 06/22/2011 09:47:52 | too localized | Is there a way to refactor this javascript/jquery?
===
switch (options.effect) {
case 'h-blinds-fadein':
$('.child').each(function (i) {
$(this).stop().css({opacity:0}).delay(100 * i).animate({
'opacity': 1
}, {
duration: options.speed,
complete: (i !== r * c - 1) ||
function () {
$(this).parent().replaceWith(prev);
options.cp.bind('click',{effect: options.effect},options.ch);
}
});
});
break;
case 'h-blinds-fadein-reverse':
$('.child').each(function (i) {
$(this).stop().css({opacity:0}).delay(100 * (r * c - i)).animate({
'opacity': 1
}, {
duration: options.speed,
complete: (i !== 0) ||
function () {
$(this).parent().replaceWith(prev);
options.cp.bind('click',{effect: options.effect},options.ch);
}
});
});
break;
....more cases
}
I have alot of similiar other cases. One way i could think of is to write functions ? i'm not sure i'm still fairly new to the language | 3 |
2,423,772 | 03/11/2010 09:24:39 | 61,096 | 02/01/2009 00:53:05 | 37 | 0 | Validation in ASP.net | I want only letters and special symbols only / and - in my textbox
HOw should be the expression like to give in custom validator?
Thanks In Advance | asp.net | null | null | null | null | null | open | Validation in ASP.net
===
I want only letters and special symbols only / and - in my textbox
HOw should be the expression like to give in custom validator?
Thanks In Advance | 0 |
127,156 | 09/24/2008 13:35:13 | 5,446 | 09/09/2008 16:05:23 | 33 | 8 | How do I check if index exists on a table field in mysql | I've needed to Google this a couple times, so I'm sharing my Q/A. | mysql | indexing | null | null | null | null | open | How do I check if index exists on a table field in mysql
===
I've needed to Google this a couple times, so I'm sharing my Q/A. | 0 |
5,339,627 | 03/17/2011 13:25:53 | 664,393 | 03/17/2011 13:25:53 | 1 | 0 | Where can I download this engine? | Is there a way where I can download this enginen in order to install it on my own server? | download | install | null | null | null | 03/19/2011 02:55:54 | not a real question | Where can I download this engine?
===
Is there a way where I can download this enginen in order to install it on my own server? | 1 |
9,419,298 | 02/23/2012 18:51:17 | 1,222,089 | 02/20/2012 21:42:57 | 16 | 1 | Is this class Right ? Hope you'd help :) | I've been wondering if the following class is right :
This class should make a mysql connection after gathering data of course , it also does mysql's different manipulations such as 'select', 'insert', 'update','delete' ...etc
class MySQL {
var $hostname;
var $username;
var $password;
var $database;
var $t_prefix;
protected $_connect;
protected $SQLquery;
public function mysql () {
$this->hostname = INNOPB_MYSQl_HOSTNAME;
$this->username = INNOPB_MYSQl_USERNAME;
$this->password = INNOPB_MYSQl_PASSWORD;
$this->database = INNOPB_MYSQl_DATABASE;
$this->t_prefix = INNOPB_MYSQL_T_PREFIX;
return $this;
}
public function connect( ) {
$this->_connect = mysql_connect(
$this->hostname,
$this->username,
$this->password
) or die ( mysql_error() );
mysql_select_db( $this->database , $this->_connect ) or die ( mysql_error() );
}
public function select ( $WHAT, $FROM, $WHERE = '', $ORDERBY = '', $ORDER = '', $LIMIT = '' ) {
$FROM = $this->t_prefix . $FROM;
$WHERE = ( !$WHERE ) ? '': " WHERE $WHERE";
$ORDERBY = ( !$ORDERBY ) ? '': " ORDER BY $ORDERBY";
$ORDER = ( !$ORDER ) ? '': " $ORDER";
$LIMIT = ( !$LIMIT ) ? '' : " LIMIT $LIMIT";
$FROM = str_replace( '"' , "'", $FROM );
$WHERE = str_replace( '"' , "'", $WHERE );
$ORDERBY = str_replace( '"' , "'", $ORDERBY );
$ORDER = str_replace( '"' , "'", $ORDER );
$LIMIT = str_replace( '"' , "'", $LIMIT );
$this->SQLquery = "SELECT $WHAT FROM $FROM$WHERE$ORDERBY$ORDER$LIMIT";
$this->SQLquery = mysql_query( $this->SQLquery );
return $this;
}
public function getQuery() { return $this->SQLquery; }
public function getRowsNum() {
return mysql_num_rows( $this->SQLquery );
}
public function delete( $FROM, $WHERE, $deleteAll = false ) {
if ( !$FROM || !$WHERE ) :
else :
$FROM = $this->t_prefix . $FROM;
$WHERE = ( !$WHERE ) ? '': " WHERE $WHERE";
$FROM = str_replace( '"' , "'", $FROM );
$WHERE = str_replace( '"' , "'", $WHERE );
( $deleteAll ) ? $this->SQLquery = "DELETE FROM $FROM" : $this->SQLquery = "DELETE FROM $FROM$WHERE";
$this->SQLquery = mysql_query( $this->SQLquery );
return $this->SQLquery;
endif;
}
public function insert( $WHAT , $INTO ) {
$INTO = " INTO ".$this->t_prefix . $INTO;
$WHAT = "INSERT $WHAT";
$INTO = str_replace( '"' , "'", $INTO );
$WHAT = str_replace( '"' , "'", $WHAT );
}
} | php | class | null | null | null | 02/24/2012 14:36:07 | too localized | Is this class Right ? Hope you'd help :)
===
I've been wondering if the following class is right :
This class should make a mysql connection after gathering data of course , it also does mysql's different manipulations such as 'select', 'insert', 'update','delete' ...etc
class MySQL {
var $hostname;
var $username;
var $password;
var $database;
var $t_prefix;
protected $_connect;
protected $SQLquery;
public function mysql () {
$this->hostname = INNOPB_MYSQl_HOSTNAME;
$this->username = INNOPB_MYSQl_USERNAME;
$this->password = INNOPB_MYSQl_PASSWORD;
$this->database = INNOPB_MYSQl_DATABASE;
$this->t_prefix = INNOPB_MYSQL_T_PREFIX;
return $this;
}
public function connect( ) {
$this->_connect = mysql_connect(
$this->hostname,
$this->username,
$this->password
) or die ( mysql_error() );
mysql_select_db( $this->database , $this->_connect ) or die ( mysql_error() );
}
public function select ( $WHAT, $FROM, $WHERE = '', $ORDERBY = '', $ORDER = '', $LIMIT = '' ) {
$FROM = $this->t_prefix . $FROM;
$WHERE = ( !$WHERE ) ? '': " WHERE $WHERE";
$ORDERBY = ( !$ORDERBY ) ? '': " ORDER BY $ORDERBY";
$ORDER = ( !$ORDER ) ? '': " $ORDER";
$LIMIT = ( !$LIMIT ) ? '' : " LIMIT $LIMIT";
$FROM = str_replace( '"' , "'", $FROM );
$WHERE = str_replace( '"' , "'", $WHERE );
$ORDERBY = str_replace( '"' , "'", $ORDERBY );
$ORDER = str_replace( '"' , "'", $ORDER );
$LIMIT = str_replace( '"' , "'", $LIMIT );
$this->SQLquery = "SELECT $WHAT FROM $FROM$WHERE$ORDERBY$ORDER$LIMIT";
$this->SQLquery = mysql_query( $this->SQLquery );
return $this;
}
public function getQuery() { return $this->SQLquery; }
public function getRowsNum() {
return mysql_num_rows( $this->SQLquery );
}
public function delete( $FROM, $WHERE, $deleteAll = false ) {
if ( !$FROM || !$WHERE ) :
else :
$FROM = $this->t_prefix . $FROM;
$WHERE = ( !$WHERE ) ? '': " WHERE $WHERE";
$FROM = str_replace( '"' , "'", $FROM );
$WHERE = str_replace( '"' , "'", $WHERE );
( $deleteAll ) ? $this->SQLquery = "DELETE FROM $FROM" : $this->SQLquery = "DELETE FROM $FROM$WHERE";
$this->SQLquery = mysql_query( $this->SQLquery );
return $this->SQLquery;
endif;
}
public function insert( $WHAT , $INTO ) {
$INTO = " INTO ".$this->t_prefix . $INTO;
$WHAT = "INSERT $WHAT";
$INTO = str_replace( '"' , "'", $INTO );
$WHAT = str_replace( '"' , "'", $WHAT );
}
} | 3 |
11,644,141 | 07/25/2012 06:50:33 | 1,531,001 | 07/17/2012 07:32:59 | 1 | 0 | What is mean by PHP accelerator (APC) ? How to use that ? What is its need | My Client has been asked to use the **PHP Accelerator** in my project. I dont know What it is. Can anyone describe me.
It will be helpful to complete the project | php | null | null | null | null | 07/25/2012 11:55:43 | not a real question | What is mean by PHP accelerator (APC) ? How to use that ? What is its need
===
My Client has been asked to use the **PHP Accelerator** in my project. I dont know What it is. Can anyone describe me.
It will be helpful to complete the project | 1 |
11,008,518 | 06/13/2012 05:09:02 | 569,711 | 01/10/2011 10:49:42 | 8 | 0 | LINQ: How to return all child elements? | For an application I am working on, I have to display data from an XML File. There's a few transformations being done, but eventually the end result will be displayed in a treeview. When a user then clicks on a node, I want to pop up the details in a listview.
When no node has been selected, I basically use LINQ to grab the details of the first item I encounter.
Here's a simplified version of my XML
<root>
<parent label="parent1">
<child label="child1">
<element1>data</element1>
<element2>data</element2>
...
</child>
<child label="child2">
<element1>data</element1>
<element2>data</element2>
...
</child>
</parent>
</root>
And here's the code used to grab it (After selecting the parent-node that the treeview has been set to by means of an XPAthSelectStatement):
protected void listsSource_Selecting(object sender, LinqDataSourceSelectEventArgs e) {
XElement rootElement = XElement.Load(MapPath(TreeSource.DataFile));
rootElement = rootElement.XPathSelectElement("//parent[@label='parent1']");
XElement parentElement;
parentElement = rootElement;
var query = (from itemElement in parentElement.Descendants("child")
select new {
varElement1= itemElement.Element("element1").Value,
varElement2= itemElement.Element("element2").Value,
...
}).Take(1);
e.result = Query;
This works a treat, and I can read out the "varElement1" and "varElement2" values from there. However, when I try and implement a similar mechanism for when the user actually did select a node, I seemt o run into a wall.
My approach was to use another XPatchSelectStatement to get to the actual node:
parentElement = rootElement.XPathSelectElement("//child[@label='" + tvwChildren.SelectedNode.Text + "']");
But I am kind of stumped on how to now get a proper LINQ query built up to read in all elements nested under the child node. I tried using parentElement.Elements(), but that was not yielding anything in the query result. I also looked at using Nodes(), but with similar results.
I suppose I could use a foreach loop to access the nodes, but then I'm not sure how to get the results into a LINQ query so I can return the same e.Result = query back.
I'm fairly new to LINQ, as you might have guessed, so any hints would be very much appreciated.
Thanks :-) | xml | linq | null | null | null | null | open | LINQ: How to return all child elements?
===
For an application I am working on, I have to display data from an XML File. There's a few transformations being done, but eventually the end result will be displayed in a treeview. When a user then clicks on a node, I want to pop up the details in a listview.
When no node has been selected, I basically use LINQ to grab the details of the first item I encounter.
Here's a simplified version of my XML
<root>
<parent label="parent1">
<child label="child1">
<element1>data</element1>
<element2>data</element2>
...
</child>
<child label="child2">
<element1>data</element1>
<element2>data</element2>
...
</child>
</parent>
</root>
And here's the code used to grab it (After selecting the parent-node that the treeview has been set to by means of an XPAthSelectStatement):
protected void listsSource_Selecting(object sender, LinqDataSourceSelectEventArgs e) {
XElement rootElement = XElement.Load(MapPath(TreeSource.DataFile));
rootElement = rootElement.XPathSelectElement("//parent[@label='parent1']");
XElement parentElement;
parentElement = rootElement;
var query = (from itemElement in parentElement.Descendants("child")
select new {
varElement1= itemElement.Element("element1").Value,
varElement2= itemElement.Element("element2").Value,
...
}).Take(1);
e.result = Query;
This works a treat, and I can read out the "varElement1" and "varElement2" values from there. However, when I try and implement a similar mechanism for when the user actually did select a node, I seemt o run into a wall.
My approach was to use another XPatchSelectStatement to get to the actual node:
parentElement = rootElement.XPathSelectElement("//child[@label='" + tvwChildren.SelectedNode.Text + "']");
But I am kind of stumped on how to now get a proper LINQ query built up to read in all elements nested under the child node. I tried using parentElement.Elements(), but that was not yielding anything in the query result. I also looked at using Nodes(), but with similar results.
I suppose I could use a foreach loop to access the nodes, but then I'm not sure how to get the results into a LINQ query so I can return the same e.Result = query back.
I'm fairly new to LINQ, as you might have guessed, so any hints would be very much appreciated.
Thanks :-) | 0 |
11,362,004 | 07/06/2012 12:14:05 | 1,506,699 | 07/06/2012 12:05:30 | 1 | 0 | How to set up email notification in SVN server(Windows) | I am using a windows SVN server, can anyone please help me to configure the email notification in the svn server.
Plz drop me to geroget@gmail.com
Thanks,
GeorgeKutty Thomas | svn | tortoisesvn | null | null | null | 07/07/2012 07:12:49 | off topic | How to set up email notification in SVN server(Windows)
===
I am using a windows SVN server, can anyone please help me to configure the email notification in the svn server.
Plz drop me to geroget@gmail.com
Thanks,
GeorgeKutty Thomas | 2 |
8,352,269 | 12/02/2011 05:49:40 | 1,063,372 | 11/24/2011 06:48:28 | 1 | 0 | error in loading as well as running the test project | Error loading c:\users\xyz\documents\visual studio 2010\Projects\TestProject1\TestProject1\bin\Debug\TestProject1.dll: Method not found: 'Microsoft.VisualStudio.TestTools.Resources.EqtMessage Microsoft.VisualStudio.TestTools.Resources.Messages.get_VSIP_TestProjectRetargetNeedConfigUpdate()'. | asp.net | null | null | null | null | 12/02/2011 14:49:37 | not a real question | error in loading as well as running the test project
===
Error loading c:\users\xyz\documents\visual studio 2010\Projects\TestProject1\TestProject1\bin\Debug\TestProject1.dll: Method not found: 'Microsoft.VisualStudio.TestTools.Resources.EqtMessage Microsoft.VisualStudio.TestTools.Resources.Messages.get_VSIP_TestProjectRetargetNeedConfigUpdate()'. | 1 |
6,671,236 | 07/12/2011 21:15:49 | 771,517 | 05/26/2011 14:44:03 | 18 | 1 | margin-right: auto but I want it would be maximal value. | I have a container about a width equals 70% of my page. In the container I put four boxes about a width equals 22%, and set the margin-right parameter to divide those boxes each other. However, those boxes don't cover all width of the parent element - the margin-right parameter which I set to "auto" is small, and it would be a bit bigger to justify those boxes for all the parent width (70% of the web page).
I know I can set the margin-right for "4%", but I want do it automatically, for two, three, four boxes.
Example code
<div id="parent" style="width: 70%;">
<div class="box" style="display: inline-block; margin-right: auto; width: 22%;">box 1</div>
<div class="box" style="display: inline-block; margin-right: auto; width: 22%;">box 2</div>
<div class="box" style="display: inline-block; margin-right: auto; width: 22%;">box 3</div>
<div class="box" style="display: inline-block; margin-right: 0; width: 22%;">box 4</div>
</div> | html | css | null | null | null | null | open | margin-right: auto but I want it would be maximal value.
===
I have a container about a width equals 70% of my page. In the container I put four boxes about a width equals 22%, and set the margin-right parameter to divide those boxes each other. However, those boxes don't cover all width of the parent element - the margin-right parameter which I set to "auto" is small, and it would be a bit bigger to justify those boxes for all the parent width (70% of the web page).
I know I can set the margin-right for "4%", but I want do it automatically, for two, three, four boxes.
Example code
<div id="parent" style="width: 70%;">
<div class="box" style="display: inline-block; margin-right: auto; width: 22%;">box 1</div>
<div class="box" style="display: inline-block; margin-right: auto; width: 22%;">box 2</div>
<div class="box" style="display: inline-block; margin-right: auto; width: 22%;">box 3</div>
<div class="box" style="display: inline-block; margin-right: 0; width: 22%;">box 4</div>
</div> | 0 |
11,090,129 | 06/18/2012 19:58:07 | 1,450,236 | 06/12/2012 02:55:46 | 18 | 0 | Coding Paradigm: Should I Return 0 if Function is Successful? | When I'm writing a user define function, should I return 0 if the function is successful or a non null value?
I personally like to return 0 if my function is successful, but I always see error handling more like `(!var)` and less like `(var != NULL)`. So would it be better to return some value like `1`, as known as `TRUE`, even in a non-Boolean situation?
What does Stack Overflow suggest?
Reason why I'm asking is because I wrote a wrapper for `WINAPI BOOL CreateProcessW` and it threw my code off because I was `returning 0` in the wrapper and before I was checking if `TRUE`. | c | paradigms | null | null | null | 06/18/2012 20:14:01 | not constructive | Coding Paradigm: Should I Return 0 if Function is Successful?
===
When I'm writing a user define function, should I return 0 if the function is successful or a non null value?
I personally like to return 0 if my function is successful, but I always see error handling more like `(!var)` and less like `(var != NULL)`. So would it be better to return some value like `1`, as known as `TRUE`, even in a non-Boolean situation?
What does Stack Overflow suggest?
Reason why I'm asking is because I wrote a wrapper for `WINAPI BOOL CreateProcessW` and it threw my code off because I was `returning 0` in the wrapper and before I was checking if `TRUE`. | 4 |
10,096,670 | 04/10/2012 21:22:25 | 480,870 | 10/17/2010 14:15:36 | 51 | 2 | Uploading and tagging photos disabled by Facebook on my application | I am very disappointed with Facebook. They do not have the slightest respect for the developers.
I had an application setted up on facebook, for I think over an year or close to this.
It was only used to allow my website users, to upload their photos to Facebook.
Last month for example, the App had 80.828 active users.
The reason for the app being denied of uploading photos, accoding to them, is that it was receiving a high amount of negative user feedback.
The ammount of apps removal daily, was about 5%¨of new installations, and it was blocked by only 8 users in the last month.
I guess this decision was made by a mistake, but they didn't accept my appeal.
| facebook | facebook-graph-api | upload | photos | image-uploading | 04/13/2012 03:25:35 | not a real question | Uploading and tagging photos disabled by Facebook on my application
===
I am very disappointed with Facebook. They do not have the slightest respect for the developers.
I had an application setted up on facebook, for I think over an year or close to this.
It was only used to allow my website users, to upload their photos to Facebook.
Last month for example, the App had 80.828 active users.
The reason for the app being denied of uploading photos, accoding to them, is that it was receiving a high amount of negative user feedback.
The ammount of apps removal daily, was about 5%¨of new installations, and it was blocked by only 8 users in the last month.
I guess this decision was made by a mistake, but they didn't accept my appeal.
| 1 |
6,471,196 | 06/24/2011 17:00:28 | 231,181 | 12/14/2009 10:56:13 | 1,613 | 108 | I ordered, downloaded and installed Delphi XE Prof today - do I have the latest version automatically ? | Today being: 24th of June, 2011
The about says : Embarcadero® Delphi® XE Version 15.0.3953.35171
Without having looked at every possible option, I don't immediately see a check for upgrade option. | delphi-xe | null | null | null | null | 06/24/2011 22:04:00 | too localized | I ordered, downloaded and installed Delphi XE Prof today - do I have the latest version automatically ?
===
Today being: 24th of June, 2011
The about says : Embarcadero® Delphi® XE Version 15.0.3953.35171
Without having looked at every possible option, I don't immediately see a check for upgrade option. | 3 |
11,164,787 | 06/22/2012 22:11:33 | 229,998 | 12/11/2009 22:08:20 | 4,700 | 296 | How to convert a PDF to Bitmap (rasterized) in C++ (*NO .NET*) | I've seen a lot of libraries for rasterizing PDF files, but all of them seem to require .NET. I need this to run on Mac as well as windows and I don't have the option of forcing all users to install the .NET framework. I'm willing to do a platform specific solution if I can't find a better option, but I'd much prefer to have something that works on both platforms.
I need to:
* Support multiple page PDFs and get a bitmap (as in an array of bytes, not a BMP) for each image that I can process
* Do this on both Windows and Mac
* Not be tied to a GPL license
* Keep the size as small as possible; this is being used from a Browser Plugin, so calling external applications or having large dependencies would be significant disadvantages.
Any ideas? | c++ | pdf | bitmap | resterize | null | 06/24/2012 16:29:38 | not constructive | How to convert a PDF to Bitmap (rasterized) in C++ (*NO .NET*)
===
I've seen a lot of libraries for rasterizing PDF files, but all of them seem to require .NET. I need this to run on Mac as well as windows and I don't have the option of forcing all users to install the .NET framework. I'm willing to do a platform specific solution if I can't find a better option, but I'd much prefer to have something that works on both platforms.
I need to:
* Support multiple page PDFs and get a bitmap (as in an array of bytes, not a BMP) for each image that I can process
* Do this on both Windows and Mac
* Not be tied to a GPL license
* Keep the size as small as possible; this is being used from a Browser Plugin, so calling external applications or having large dependencies would be significant disadvantages.
Any ideas? | 4 |
11,287,413 | 07/02/2012 03:11:33 | 1,287,219 | 03/23/2012 00:23:48 | 18 | 2 | Advance for each loop in Velocity | I am trying to insert a symbol between each item in the foreach loop, so there is no symbol at the beginning of 1st item and end of last item.
I got the info as http://wiki.ablecommerce.com/index.php/NVelocity#Looping, I know we should user #between, but how is the correct sytax?
#foreach($item in $items)${item}#end
so where should we put the #between % in?
many thanks
| c# | templates | foreach | velocity | template-engine | null | open | Advance for each loop in Velocity
===
I am trying to insert a symbol between each item in the foreach loop, so there is no symbol at the beginning of 1st item and end of last item.
I got the info as http://wiki.ablecommerce.com/index.php/NVelocity#Looping, I know we should user #between, but how is the correct sytax?
#foreach($item in $items)${item}#end
so where should we put the #between % in?
many thanks
| 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.