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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
163,162 | 10/02/2008 15:58:21 | 2,470 | 08/22/2008 12:42:38 | 772 | 69 | Can you call Directory.GetFiles() with multiple filters? | I am trying to use the Directory.GetFiles() method to retrieve a list of files of multiple types, such as mp3's and jpg's. I have tried both of the following with no luck:
Directory.GetFiles("C:\\path", "*.mp3|*.jpg", SearchOption.AllDirectories);
Directory.GetFiles("C:\\path", "*.mp3;*.jpg", SearchOption.AllDirectories);
Is there a way to do this in one call? | .net | null | null | null | null | null | open | Can you call Directory.GetFiles() with multiple filters?
===
I am trying to use the Directory.GetFiles() method to retrieve a list of files of multiple types, such as mp3's and jpg's. I have tried both of the following with no luck:
Directory.GetFiles("C:\\path", "*.mp3|*.jpg", SearchOption.AllDirectories);
Directory.GetFiles("C:\\path", "*.mp3;*.jpg", SearchOption.AllDirectories);
Is there a way to do this in one call? | 0 |
4,292,452 | 11/27/2010 15:47:56 | 422,039 | 08/16/2010 18:29:33 | 16 | 2 | Insert Fail because of wrong non-numeric character | hy
table:
create table Players (PlayerNo number (4) not null, Name varchar2(15), date_of_birth date,leagno varchar(4));
wrong insert:
insert into PLAYERS (PlayerNo,Name,date_of_birth,leagno) VALUES (1,'Philipp K','Jan-10-1999','1')
whats wrong?
error code:
Fehler beim Start in Zeile 1 in Befehl:
insert into PLAYERS (PlayerNo,Name,date_of_birth,leagno) VALUES (1,'Philipp K','Jan-10-1999','1')
Fehlerbericht:
SQL-Fehler: ORA-01858: Ein nicht-numerisches Zeichen wurde gefunden, während ein numerisches Zeichen erwartet wurde
01858. 00000 - "a non-numeric character was found where a numeric was expected"
*Cause: The input data to be converted using a date format model was
incorrect. The input data did not contain a number where a number was
required by the format model.
*Action: Fix the input data or the date format model to make sure the
elements match in number and type. Then retry the operation.
| sql | oracle | null | null | null | null | open | Insert Fail because of wrong non-numeric character
===
hy
table:
create table Players (PlayerNo number (4) not null, Name varchar2(15), date_of_birth date,leagno varchar(4));
wrong insert:
insert into PLAYERS (PlayerNo,Name,date_of_birth,leagno) VALUES (1,'Philipp K','Jan-10-1999','1')
whats wrong?
error code:
Fehler beim Start in Zeile 1 in Befehl:
insert into PLAYERS (PlayerNo,Name,date_of_birth,leagno) VALUES (1,'Philipp K','Jan-10-1999','1')
Fehlerbericht:
SQL-Fehler: ORA-01858: Ein nicht-numerisches Zeichen wurde gefunden, während ein numerisches Zeichen erwartet wurde
01858. 00000 - "a non-numeric character was found where a numeric was expected"
*Cause: The input data to be converted using a date format model was
incorrect. The input data did not contain a number where a number was
required by the format model.
*Action: Fix the input data or the date format model to make sure the
elements match in number and type. Then retry the operation.
| 0 |
9,981,751 | 04/02/2012 18:26:22 | 1,308,697 | 04/02/2012 18:04:38 | 1 | 0 | How to build C# without installing .net framework | We have tens of building machines that could be old or new. We need to build the C# code with .Net 3.5, but not all the Windows machines have this version. We cannot install any software onto the building machines either. Is there a way to achieve this? We are OK to copy files to the building machines and delete them after the building it done. I tried to copy v3.5 folder to the build machine and neither msbuild.exe nor csc.exe works. I guess the .net framework has entries in the registry. | c# | null | null | null | null | 04/02/2012 18:28:17 | not a real question | How to build C# without installing .net framework
===
We have tens of building machines that could be old or new. We need to build the C# code with .Net 3.5, but not all the Windows machines have this version. We cannot install any software onto the building machines either. Is there a way to achieve this? We are OK to copy files to the building machines and delete them after the building it done. I tried to copy v3.5 folder to the build machine and neither msbuild.exe nor csc.exe works. I guess the .net framework has entries in the registry. | 1 |
3,582,741 | 08/27/2010 09:13:09 | 432,744 | 08/27/2010 09:13:09 | 1 | 0 | VBA Textbox loses focus on 'Alt-Gr' | I am experiencing a funny behaviour of Textboxes on a VBA Userform: On pressing Alt-Gr the box loses focus. This happens after running a bit of VBA initialization code for the form. The text box has neither initialization code nor event listeners. Starting the user form straight out of the IDE everything is fine.
I suspect a MS Office or Windows update to be responsible for this change in behaviour but I can't pin it down.
Anyone with an idea what the problem is and how to fix that? Thanks for any suggestions.
BTW: The VBA runs within a CRM Application called Organice, which has an embedded VBA runtime environment.
stengbiegel | vba | textbox | userform | null | null | 04/16/2012 19:08:02 | too localized | VBA Textbox loses focus on 'Alt-Gr'
===
I am experiencing a funny behaviour of Textboxes on a VBA Userform: On pressing Alt-Gr the box loses focus. This happens after running a bit of VBA initialization code for the form. The text box has neither initialization code nor event listeners. Starting the user form straight out of the IDE everything is fine.
I suspect a MS Office or Windows update to be responsible for this change in behaviour but I can't pin it down.
Anyone with an idea what the problem is and how to fix that? Thanks for any suggestions.
BTW: The VBA runs within a CRM Application called Organice, which has an embedded VBA runtime environment.
stengbiegel | 3 |
151,974 | 09/30/2008 06:28:53 | 22,076 | 09/25/2008 09:44:49 | 73 | 2 | c++ blogs that you regularly follow? | What are all the c++ blogs that you follow
***Please add one url for one posting.*** | c++ | blogs | null | null | null | 08/19/2011 12:56:08 | not constructive | c++ blogs that you regularly follow?
===
What are all the c++ blogs that you follow
***Please add one url for one posting.*** | 4 |
5,501,730 | 03/31/2011 14:47:40 | 685,959 | 03/31/2011 14:47:40 | 1 | 0 | stl map with different value types? | Hello i stuck in a problem,
I eant to store References to different Objects in a map, but dont know how to define the map.
e.g:
map<string, & ObjectReferenceOfAnyKind> myList;
myList[ "keyA", stringA );
myList[ "keyBlist", vector );
myList[ "file", fileObject );
string &value = (string&) myList["keyA"];
CFile &fobj = (CFile&) myList["file"];
Any suggestion how to solve this?
| templates | stl | map | null | null | null | open | stl map with different value types?
===
Hello i stuck in a problem,
I eant to store References to different Objects in a map, but dont know how to define the map.
e.g:
map<string, & ObjectReferenceOfAnyKind> myList;
myList[ "keyA", stringA );
myList[ "keyBlist", vector );
myList[ "file", fileObject );
string &value = (string&) myList["keyA"];
CFile &fobj = (CFile&) myList["file"];
Any suggestion how to solve this?
| 0 |
9,044,851 | 01/28/2012 11:18:05 | 345,901 | 05/20/2010 08:43:29 | 89 | 7 | HTTPS connection valid with Chrome and not valid with Firefox | I have a hard time understand why my certificate for SSL connection is directly valid with Chrome where it isn't with Firefox 9.
Test URL here : https://www.tkwk.be
Any help would be much appreciated.
Cheers,
Jk_ | firefox | ssl | null | null | null | 03/23/2012 23:30:58 | off topic | HTTPS connection valid with Chrome and not valid with Firefox
===
I have a hard time understand why my certificate for SSL connection is directly valid with Chrome where it isn't with Firefox 9.
Test URL here : https://www.tkwk.be
Any help would be much appreciated.
Cheers,
Jk_ | 2 |
8,329,661 | 11/30/2011 16:45:58 | 1,073,816 | 11/30/2011 16:40:07 | 1 | 0 | In SQL Server, I want to use the same query for all the tables in a database | I need to find a way to perform the same query to all the tables in an specific database.
For example, if my database "DB" has the tables "Table1", "Table2", "Table3", "Table4" and "Table5". I want to perform the query 'Select * From <All 5 Tables> '
Anyone knows how to do this ??? | sql | query | table | server | all | 12/03/2011 17:57:29 | not a real question | In SQL Server, I want to use the same query for all the tables in a database
===
I need to find a way to perform the same query to all the tables in an specific database.
For example, if my database "DB" has the tables "Table1", "Table2", "Table3", "Table4" and "Table5". I want to perform the query 'Select * From <All 5 Tables> '
Anyone knows how to do this ??? | 1 |
413,114 | 01/05/2009 13:39:09 | 192,337 | 01/04/2009 20:52:52 | 1 | 0 | HTML vs XHTML does it still matter? | I'm wondering if I should bother at all about the markup language, as long as i produce valid markup.
I've read articles that point out HTML is the best choice and they come directly from the horse's mouth (the browsers implementors!):
- http://webkit.org/blog/68/understanding-html-xml-and-xhtml/
- https://developer.mozilla.org/en/Mozilla_Web_Developer_FAQ
Other articles, by James Bennet, make another point that if you're not serving XHTML as XML then you don't want XHTML but HTML.
- http://www.b-list.org/weblog/2008/jun/18/html/
- http://www.b-list.org/weblog/2008/jun/21/xhtml/
So i thought that if i wanted to trigger Standard Compliant Mode i should just use HTML strict validation. But that's not the case anymore with at least the most modern browsers (aka everything but IE6): if you have valid XHTML Strict you still trigger Standard Compliant Mode, hence, as long as i produce valid markup, why bother? | html | xhtml | null | null | null | 07/23/2012 21:50:42 | not constructive | HTML vs XHTML does it still matter?
===
I'm wondering if I should bother at all about the markup language, as long as i produce valid markup.
I've read articles that point out HTML is the best choice and they come directly from the horse's mouth (the browsers implementors!):
- http://webkit.org/blog/68/understanding-html-xml-and-xhtml/
- https://developer.mozilla.org/en/Mozilla_Web_Developer_FAQ
Other articles, by James Bennet, make another point that if you're not serving XHTML as XML then you don't want XHTML but HTML.
- http://www.b-list.org/weblog/2008/jun/18/html/
- http://www.b-list.org/weblog/2008/jun/21/xhtml/
So i thought that if i wanted to trigger Standard Compliant Mode i should just use HTML strict validation. But that's not the case anymore with at least the most modern browsers (aka everything but IE6): if you have valid XHTML Strict you still trigger Standard Compliant Mode, hence, as long as i produce valid markup, why bother? | 4 |
6,786,539 | 07/22/2011 06:45:18 | 855,281 | 07/21/2011 06:02:55 | 6 | 0 | how can select last 7 max salaries from fallowing table? | NAME AGE DEPTNO SALARY
-------------------- ---------- ---------- ----------
shasank 25 11 2025
raju 27 12 2027
bali 31 10 2031
rambo 32 11 2121
chir 34 10 2123
son 33 12 2131
don 33 11 2132
ram 28 13 2141
nag 35 10 2213
dimpu 33 12 2314 | sql | null | null | null | null | 07/22/2011 13:06:02 | not a real question | how can select last 7 max salaries from fallowing table?
===
NAME AGE DEPTNO SALARY
-------------------- ---------- ---------- ----------
shasank 25 11 2025
raju 27 12 2027
bali 31 10 2031
rambo 32 11 2121
chir 34 10 2123
son 33 12 2131
don 33 11 2132
ram 28 13 2141
nag 35 10 2213
dimpu 33 12 2314 | 1 |
8,811,113 | 01/10/2012 21:57:49 | 656,925 | 08/12/2010 02:22:36 | 1,791 | 42 | When to use scope resolution in javascript? | When I set the onload property I use
window.onload=initialize_page;
However,
when I use undefined, which I understand is a window property I simply use:
undefined
How do I know when to scope properties?
If I remove window from the first statement it works. I guess I've seen both in code here on SO, but which way is best practice? | javascript | null | null | null | null | null | open | When to use scope resolution in javascript?
===
When I set the onload property I use
window.onload=initialize_page;
However,
when I use undefined, which I understand is a window property I simply use:
undefined
How do I know when to scope properties?
If I remove window from the first statement it works. I guess I've seen both in code here on SO, but which way is best practice? | 0 |
8,646,790 | 12/27/2011 16:19:37 | 1,117,931 | 12/27/2011 16:17:15 | 1 | 0 | How to parse Image into blocks in Java | Greeting , If I have image its size is 100 * 100 and I want to parse it into blocks , each block size is 10 * 10 how to make it in details please | java | image | null | null | null | 12/27/2011 16:27:53 | not a real question | How to parse Image into blocks in Java
===
Greeting , If I have image its size is 100 * 100 and I want to parse it into blocks , each block size is 10 * 10 how to make it in details please | 1 |
9,685,021 | 03/13/2012 13:34:17 | 698,668 | 04/08/2011 12:51:35 | 158 | 1 | multiple scripts required to be connect with each others | i am confused. I got a project to work on 3 scripts (wordpress, esyndicat and phpbb forum) its not a problem, the problem is that my client want that when a user login to anyone of these scripts they should autometically login with other scripts.
so if anyone give me idea how can i do this .. please tell me..
Thank you all. | php | wordpress | phpbb | null | null | 03/14/2012 15:51:06 | not a real question | multiple scripts required to be connect with each others
===
i am confused. I got a project to work on 3 scripts (wordpress, esyndicat and phpbb forum) its not a problem, the problem is that my client want that when a user login to anyone of these scripts they should autometically login with other scripts.
so if anyone give me idea how can i do this .. please tell me..
Thank you all. | 1 |
5,408,996 | 03/23/2011 17:08:09 | 46,571 | 12/16/2008 08:32:48 | 2,290 | 80 | Testing whether a SQL Server user exists, and whether their password is valid | I need create a SQL Server stored procedure that does the following:
1. Take an database user name and password as parameters.
2. If the user does not exist or the password is invalid, return an empty rowset.
3. Else, perform a query and return its result.
I don't know how do perform step 2. Any ideas? | sql-server | null | null | null | null | null | open | Testing whether a SQL Server user exists, and whether their password is valid
===
I need create a SQL Server stored procedure that does the following:
1. Take an database user name and password as parameters.
2. If the user does not exist or the password is invalid, return an empty rowset.
3. Else, perform a query and return its result.
I don't know how do perform step 2. Any ideas? | 0 |
4,487,360 | 12/20/2010 06:20:41 | 475,353 | 10/14/2010 05:20:48 | 363 | 16 | Understanding Assembly (books/tutorials/etc) | So Assembly is the foundation of high level languages, I just graduated with my B.S. in Computer Science...and while we did talk about Assembly and use some (MIPS if I recall correctly) in my EE380 class.....I dont really feel I grasped what I need to know.
Mainly im interested in how the compiler/high level languages allocate memory/addresses per variables....and things of that nature. No im not doing it to "learn hacking" or something...I just want to understand down to the deep deep level at what exactly is "going on".
Is there a good book on the subject. My EE380 book..honestly isn't very helpful.
it was: *Computer Organization and Design: The Hardware Software Interface*
Any suggestions. I really do want to learn this, and you guys always know best. And yes Im well aware it's not the easiest thing to grasp, but even having a basic understanding is better than hardly any. | memory-management | assembly | books | tutorials | null | 09/21/2011 01:38:44 | not constructive | Understanding Assembly (books/tutorials/etc)
===
So Assembly is the foundation of high level languages, I just graduated with my B.S. in Computer Science...and while we did talk about Assembly and use some (MIPS if I recall correctly) in my EE380 class.....I dont really feel I grasped what I need to know.
Mainly im interested in how the compiler/high level languages allocate memory/addresses per variables....and things of that nature. No im not doing it to "learn hacking" or something...I just want to understand down to the deep deep level at what exactly is "going on".
Is there a good book on the subject. My EE380 book..honestly isn't very helpful.
it was: *Computer Organization and Design: The Hardware Software Interface*
Any suggestions. I really do want to learn this, and you guys always know best. And yes Im well aware it's not the easiest thing to grasp, but even having a basic understanding is better than hardly any. | 4 |
4,962,149 | 02/10/2011 20:16:49 | 607,360 | 02/08/2011 00:15:59 | 1 | 0 | how to find webpages which link to some specific page? | Just wondering if there's any way to search all web pages which link to some specific url? For example, all web pages containing link to example.com? Thanks | search-engine | null | null | null | null | null | open | how to find webpages which link to some specific page?
===
Just wondering if there's any way to search all web pages which link to some specific url? For example, all web pages containing link to example.com? Thanks | 0 |
7,665,912 | 10/05/2011 18:29:05 | 795,016 | 06/12/2011 18:46:07 | 122 | 0 | Double include solution? | In C++, I have a problem with a double include:
File stuffcollection.h
#pragma once
#ifndef STUFFCOLLECTION_H
#define STUFFCOLLECTION_H
#include "Stage.h"
class Stuffcollection {
public:
bool myfunc( Stage * stage );
};
#endif // STUFFCOLLECTION_H
File stage.h:
#pragma once
#ifndef STAGE_H
#define STAGE_H
#include "Stuffcollection.h"
class Stage {
// stuffcollection used in stage.cpp
};
#endif // STAGE_H
Compiler Error:
`\Stuffcollection.h|(line were bool myfunc is declared)|error: 'Stage' has not been declared|
||=== Build finished: 1 errors, 0 warnings ===|`
Can someone please explain why this happens and how it can be solved? I already use include guards and the pragma once preprocessor directive and it just doesn't work.
(If I remove `#include "Stuffcollection.h"` from stage.h and comment out the respective lines that are using it in stage.cpp, the rest of my code works fine. It's really just when including Stuffcollection into stage that it suddenly stops working.)
*PS: stage is just one example, I use stuffcollection in almost every other file too, and everytime I get this problem.* | c++ | include | include-guards | null | null | null | open | Double include solution?
===
In C++, I have a problem with a double include:
File stuffcollection.h
#pragma once
#ifndef STUFFCOLLECTION_H
#define STUFFCOLLECTION_H
#include "Stage.h"
class Stuffcollection {
public:
bool myfunc( Stage * stage );
};
#endif // STUFFCOLLECTION_H
File stage.h:
#pragma once
#ifndef STAGE_H
#define STAGE_H
#include "Stuffcollection.h"
class Stage {
// stuffcollection used in stage.cpp
};
#endif // STAGE_H
Compiler Error:
`\Stuffcollection.h|(line were bool myfunc is declared)|error: 'Stage' has not been declared|
||=== Build finished: 1 errors, 0 warnings ===|`
Can someone please explain why this happens and how it can be solved? I already use include guards and the pragma once preprocessor directive and it just doesn't work.
(If I remove `#include "Stuffcollection.h"` from stage.h and comment out the respective lines that are using it in stage.cpp, the rest of my code works fine. It's really just when including Stuffcollection into stage that it suddenly stops working.)
*PS: stage is just one example, I use stuffcollection in almost every other file too, and everytime I get this problem.* | 0 |
4,810,574 | 01/26/2011 22:04:34 | 591,398 | 01/26/2011 22:04:34 | 1 | 0 | Grails Gorm : Object references an unsaved transient instance | I get the following Exception when saving an instance of Trip in Grails:
> 2011-01-26 22:37:42,801 [http-8090-5]
> ERROR errors.GrailsExceptionResolver
> - object references an unsaved transient instance - save the
> transient instance before flushing: Rower
> org.hibernate.TransientObjectException:
> object references an unsaved transient
> instance - save the transient instance
> before flushing: Rower
The concept is simple: For a boattrip you need some rowers, a coxwain (is also a rower) and a boat:
Trip looks like (shortened):
class Trip {
Boat boat;
Rower coxwain;
static belongsTo = [Rower,Boat]
static hasMany = [rowers:Rower]
}
and Rower (shortened)
class Rower {
String firstname;
String name;
Rower reference;
static hasMany = [trips:Trip];
static mappedBy = [trips:"rowers"]
}
The trip then is saved in the controller like:
def save = {
def trip = new Trip(params)
// adding Rowers to Trip
if (params.rower instanceof String) {
def r = Rower.get(params?.rower)
if (r != null) {
trip.addToRowers(r)
}
} else {
params?.rower?.each{
rowerid ->
def r = Rower.get(rowerid)
log.info("rowerid (asList): " + rowerid)
if (r != null) {
trip.addToRowers(r)
}
}
}
// saving the new Trip -> EXCEPTION IN NEXT LINE
if(!trip.hasErrors() && trip.save(flush:true)) {
// ...
}
// ...
}
I think I have set the relations between the domains correct.
The Rower is not changed while it is added to the Trip. Why does Grails want it to save? why is it a transient instance?
| grails | gorm | null | null | null | null | open | Grails Gorm : Object references an unsaved transient instance
===
I get the following Exception when saving an instance of Trip in Grails:
> 2011-01-26 22:37:42,801 [http-8090-5]
> ERROR errors.GrailsExceptionResolver
> - object references an unsaved transient instance - save the
> transient instance before flushing: Rower
> org.hibernate.TransientObjectException:
> object references an unsaved transient
> instance - save the transient instance
> before flushing: Rower
The concept is simple: For a boattrip you need some rowers, a coxwain (is also a rower) and a boat:
Trip looks like (shortened):
class Trip {
Boat boat;
Rower coxwain;
static belongsTo = [Rower,Boat]
static hasMany = [rowers:Rower]
}
and Rower (shortened)
class Rower {
String firstname;
String name;
Rower reference;
static hasMany = [trips:Trip];
static mappedBy = [trips:"rowers"]
}
The trip then is saved in the controller like:
def save = {
def trip = new Trip(params)
// adding Rowers to Trip
if (params.rower instanceof String) {
def r = Rower.get(params?.rower)
if (r != null) {
trip.addToRowers(r)
}
} else {
params?.rower?.each{
rowerid ->
def r = Rower.get(rowerid)
log.info("rowerid (asList): " + rowerid)
if (r != null) {
trip.addToRowers(r)
}
}
}
// saving the new Trip -> EXCEPTION IN NEXT LINE
if(!trip.hasErrors() && trip.save(flush:true)) {
// ...
}
// ...
}
I think I have set the relations between the domains correct.
The Rower is not changed while it is added to the Trip. Why does Grails want it to save? why is it a transient instance?
| 0 |
8,200,508 | 11/20/2011 09:04:48 | 221,220 | 11/30/2009 09:18:26 | 1,102 | 96 | Yii : form values retention for CHtml::checkBoxList on form validaton | I am using CHtml::checkBoxList for my form. For some reason I cannot use CHtml:activeCheckBoxList or CActiveForm::checkBoxList. Everything works fine only problem is that I loose checkbox values on form validation error. What could be the easiest way to fix this ? | form-validation | yii | null | null | null | null | open | Yii : form values retention for CHtml::checkBoxList on form validaton
===
I am using CHtml::checkBoxList for my form. For some reason I cannot use CHtml:activeCheckBoxList or CActiveForm::checkBoxList. Everything works fine only problem is that I loose checkbox values on form validation error. What could be the easiest way to fix this ? | 0 |
10,080,790 | 04/09/2012 22:41:45 | 80,002 | 03/19/2009 12:22:39 | 3,073 | 32 | Python: Strange behavior of datetime.astimezone with respect to US/Pacific and America/Los_Angeles time zones? | Please, observe:
C:\dev\poc\SDR>python
Python 2.7.1 (r271:86832, Nov 27 2010, 17:19:03) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from pytz import timezone
>>> from datetime import datetime
>>> tz1=timezone('America/Los_Angeles')
>>> tz2=timezone('US/Pacific')
>>> ts1=datetime(2011,8,1,tzinfo=tz1)
>>> ts2=datetime(2011,8,1,tzinfo=tz2)
>>> ts1
datetime.datetime(2011, 8, 1, 0, 0, tzinfo=<DstTzInfo 'America/Los_Angeles' PST-1 day, 16:00:00 STD>)
>>> ts2
datetime.datetime(2011, 8, 1, 0, 0, tzinfo=<DstTzInfo 'US/Pacific' PST-1 day, 16:00:00 STD>)
>>> ts1.astimezone(tz1)
datetime.datetime(2011, 8, 1, 0, 0, tzinfo=<DstTzInfo 'America/Los_Angeles' PST-1 day, 16:00:00 STD>)
>>> ts2.astimezone(tz2)
datetime.datetime(2011, 8, 1, 0, 0, tzinfo=<DstTzInfo 'US/Pacific' PST-1 day, 16:00:00 STD>)
>>> ts1.astimezone(tz2)
datetime.datetime(2011, 8, 1, 1, 0, tzinfo=<DstTzInfo 'US/Pacific' PDT-1 day, 17:00:00 DST>)
>>> ts2.astimezone(tz1)
datetime.datetime(2011, 8, 1, 1, 0, tzinfo=<DstTzInfo 'America/Los_Angeles' PDT-1 day, 17:00:00 DST>)
>>>
Here is what I do not understand. US/Pacific (`tz1`) and America/Los_Angeles (`tz2`) are supposed to denote the same time zone, aren't they? Then how come that `datetime.astimezone` called to move from one zone to another changes the hour?
Thanks.
| python | datetime | timezone | null | null | null | open | Python: Strange behavior of datetime.astimezone with respect to US/Pacific and America/Los_Angeles time zones?
===
Please, observe:
C:\dev\poc\SDR>python
Python 2.7.1 (r271:86832, Nov 27 2010, 17:19:03) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from pytz import timezone
>>> from datetime import datetime
>>> tz1=timezone('America/Los_Angeles')
>>> tz2=timezone('US/Pacific')
>>> ts1=datetime(2011,8,1,tzinfo=tz1)
>>> ts2=datetime(2011,8,1,tzinfo=tz2)
>>> ts1
datetime.datetime(2011, 8, 1, 0, 0, tzinfo=<DstTzInfo 'America/Los_Angeles' PST-1 day, 16:00:00 STD>)
>>> ts2
datetime.datetime(2011, 8, 1, 0, 0, tzinfo=<DstTzInfo 'US/Pacific' PST-1 day, 16:00:00 STD>)
>>> ts1.astimezone(tz1)
datetime.datetime(2011, 8, 1, 0, 0, tzinfo=<DstTzInfo 'America/Los_Angeles' PST-1 day, 16:00:00 STD>)
>>> ts2.astimezone(tz2)
datetime.datetime(2011, 8, 1, 0, 0, tzinfo=<DstTzInfo 'US/Pacific' PST-1 day, 16:00:00 STD>)
>>> ts1.astimezone(tz2)
datetime.datetime(2011, 8, 1, 1, 0, tzinfo=<DstTzInfo 'US/Pacific' PDT-1 day, 17:00:00 DST>)
>>> ts2.astimezone(tz1)
datetime.datetime(2011, 8, 1, 1, 0, tzinfo=<DstTzInfo 'America/Los_Angeles' PDT-1 day, 17:00:00 DST>)
>>>
Here is what I do not understand. US/Pacific (`tz1`) and America/Los_Angeles (`tz2`) are supposed to denote the same time zone, aren't they? Then how come that `datetime.astimezone` called to move from one zone to another changes the hour?
Thanks.
| 0 |
9,040,252 | 01/27/2012 21:21:12 | 520,535 | 11/25/2010 18:44:40 | 341 | 2 | Get important words in title java library | Is there any java library that with given text (title) gets collection of important words in it. <br>
EDITED: By important I mean the one that has define the main idea of the sentence.
Thank You. | java | text-analysis | null | null | null | 01/28/2012 01:10:02 | not a real question | Get important words in title java library
===
Is there any java library that with given text (title) gets collection of important words in it. <br>
EDITED: By important I mean the one that has define the main idea of the sentence.
Thank You. | 1 |
5,541,490 | 04/04/2011 16:32:53 | 604,388 | 02/05/2011 13:21:24 | 119 | 10 | Is the following WHERE value is correct (SQLite, android)? | (date('now') > date('date_added','+60 seconds') AND subscribed<2)
use that on android (with `update` method) to remove old records from the database. 60 seconds is defined just for testing. `date_added` and `subscribed` are database fields (`subscribed int, date_added datetime`).
| android | sqlite | android-sqlite | null | null | null | open | Is the following WHERE value is correct (SQLite, android)?
===
(date('now') > date('date_added','+60 seconds') AND subscribed<2)
use that on android (with `update` method) to remove old records from the database. 60 seconds is defined just for testing. `date_added` and `subscribed` are database fields (`subscribed int, date_added datetime`).
| 0 |
8,458,955 | 12/10/2011 18:45:44 | 980,089 | 10/05/2011 09:38:57 | 10 | 0 | Could my spring program run using dispatcher-servlet.xml and without using ContextLoaderListener and applicationcontext.xml? | I have question that it is possible to run spring-orm program using `dispatcher-servlet.xml` only.Without using `ContextLoaderListener` and `applicationcontext.xml`?If yes then how?
Secondly why is it necessary to register `dispatcher-servlet.xml` or `applicationcontext.xml` in `web.xml`?Because when these files are not registered in `web.xml` all the setter injections(specified in `dispatcher-servlet.xml` or `applicationcontext.xml`) take place on server start-up that means these xml files are loading without registering in `web.xml`. | java | spring | spring-mvc | null | null | null | open | Could my spring program run using dispatcher-servlet.xml and without using ContextLoaderListener and applicationcontext.xml?
===
I have question that it is possible to run spring-orm program using `dispatcher-servlet.xml` only.Without using `ContextLoaderListener` and `applicationcontext.xml`?If yes then how?
Secondly why is it necessary to register `dispatcher-servlet.xml` or `applicationcontext.xml` in `web.xml`?Because when these files are not registered in `web.xml` all the setter injections(specified in `dispatcher-servlet.xml` or `applicationcontext.xml`) take place on server start-up that means these xml files are loading without registering in `web.xml`. | 0 |
179,238 | 10/07/2008 16:13:24 | 22,483 | 09/26/2008 00:16:37 | 323 | 9 | What scares you the most about the integrated IDE of most modern Smalltalks? | As I'm <a href="http://methodsandmessages.vox.com/library/post/the-year-of-smalltalk.html">riding the wave of resurgence of Smalltalk</a> (especially because many Ruby-on-Rails people are rediscovering Smalltalk and seeing <a href="http://seaside.st">Seaside</a> as their next upgraded web framework), I get questions like "yeah, but how do I use my favorite editor to edit Smalltalk code?" or "Does Smalltalk still insist on living in a world of its own?".
Now, <a href="http://methodsandmessages.vox.com/library/post/transcript-show-hello-world-cr.html">having first experienced Smalltalk back in 1981</a>, I don't understand these questions very well. It seems rather natural that I'd want the editor and debugger to be savvy of my current code state, and integrate with the change control system that is Smalltalk-aware. Using an external editor or debugger or change control manager would seem very awkward.
So what is it that scares you the most about not being able to edit the five-line methods in Smalltalk with your favorite editor, or use your favorite non-Smalltalk-aware change control system? | smalltalk | ide | ruby-on-rails | ruby | seaside | 09/03/2011 23:16:51 | not constructive | What scares you the most about the integrated IDE of most modern Smalltalks?
===
As I'm <a href="http://methodsandmessages.vox.com/library/post/the-year-of-smalltalk.html">riding the wave of resurgence of Smalltalk</a> (especially because many Ruby-on-Rails people are rediscovering Smalltalk and seeing <a href="http://seaside.st">Seaside</a> as their next upgraded web framework), I get questions like "yeah, but how do I use my favorite editor to edit Smalltalk code?" or "Does Smalltalk still insist on living in a world of its own?".
Now, <a href="http://methodsandmessages.vox.com/library/post/transcript-show-hello-world-cr.html">having first experienced Smalltalk back in 1981</a>, I don't understand these questions very well. It seems rather natural that I'd want the editor and debugger to be savvy of my current code state, and integrate with the change control system that is Smalltalk-aware. Using an external editor or debugger or change control manager would seem very awkward.
So what is it that scares you the most about not being able to edit the five-line methods in Smalltalk with your favorite editor, or use your favorite non-Smalltalk-aware change control system? | 4 |
3,962,766 | 10/18/2010 19:45:27 | 133,374 | 07/05/2009 15:29:28 | 2,003 | 57 | java: reverse list | I want to have a revered list view on a list (in a similar way than `List#sublist` provides a sublist view on a list). Is there some function which provides this functionality?
I don't want to make any sort of copy of the list.
It would be enough if I could get at least a reverse iterator on a list in this case though.
| java | list | iterator | reverse | null | null | open | java: reverse list
===
I want to have a revered list view on a list (in a similar way than `List#sublist` provides a sublist view on a list). Is there some function which provides this functionality?
I don't want to make any sort of copy of the list.
It would be enough if I could get at least a reverse iterator on a list in this case though.
| 0 |
4,534,899 | 12/26/2010 18:17:21 | 450,790 | 09/17/2010 16:26:29 | 40 | 1 | JAVA HttpURLConnection POST Request Returns No Value | I am having an issue handling HTTP URL Connections that do not return data. The code I am using is below... It is basically a messaging client, and this method gets any messages sent to a fake user (bot) and then I am able to manipulate the messages, look for key words, and respond from the bot.
public void getMessages(String bot)
{
xml = "" +
"xmlMessage=<message type=\"comet.get.message.updates\" "
+ "id=\"" + bot + "\" "
+ "password=\"" + password + "\" />";
// Replace spaces (partial url encode).
xml = xml.replace(" ", "%20");
String serverResponse = "";
try
{
// Build URL
url = new URL(botUrl);
request = (HttpURLConnection)url.openConnection();
// Set the Request Method.
request.setRequestMethod("POST");
request.setDoInput(true);
request.setDoOutput(true);
request.setUseCaches(false);
request.setAllowUserInteraction(false);
request.setRequestProperty("Content-type", "text/xml; charset=" + "UTF-8");
out = request.getOutputStream();
writer = new OutputStreamWriter(out, "UTF-8");
writer.write(xml);
writer.close();
String temp = "";
buff = new BufferedReader ( new InputStreamReader ( request.getInputStream() ) );
while ( (temp = buff.readLine()) != null )
{
serverResponse = serverResponse + temp;
}
// XML RESPONSE EXAMPLE
// xml = "- <message type=\"comet.message.updates\" id=\"[email protected]\" count=\"2\">z" +
// "- <contact id=\"jy5740\" />" +
// "<statement text=\"test\" from=\"jy5740\" />" +
// "<statement text=\"testing 123\" from=\"jy5740\" />" +
// "</contact>" +
// "</message>";
}
catch (MalformedURLException ex)
{
System.out.println("Bad URL: " + ex);
}
catch (IOException ex)
{
System.out.println("Connection error: " + ex);
}
// do stuff with the serverResponse string
The method works perfectly if there are messages that have not been received at the time of the method call. The problem is when there have not been any messages since the last check. The method just stays in the while loop until a message is sent to the bot locking my app. How do I determine if there was no response from the server? | java | webrequest | httpurlconnection | null | null | null | open | JAVA HttpURLConnection POST Request Returns No Value
===
I am having an issue handling HTTP URL Connections that do not return data. The code I am using is below... It is basically a messaging client, and this method gets any messages sent to a fake user (bot) and then I am able to manipulate the messages, look for key words, and respond from the bot.
public void getMessages(String bot)
{
xml = "" +
"xmlMessage=<message type=\"comet.get.message.updates\" "
+ "id=\"" + bot + "\" "
+ "password=\"" + password + "\" />";
// Replace spaces (partial url encode).
xml = xml.replace(" ", "%20");
String serverResponse = "";
try
{
// Build URL
url = new URL(botUrl);
request = (HttpURLConnection)url.openConnection();
// Set the Request Method.
request.setRequestMethod("POST");
request.setDoInput(true);
request.setDoOutput(true);
request.setUseCaches(false);
request.setAllowUserInteraction(false);
request.setRequestProperty("Content-type", "text/xml; charset=" + "UTF-8");
out = request.getOutputStream();
writer = new OutputStreamWriter(out, "UTF-8");
writer.write(xml);
writer.close();
String temp = "";
buff = new BufferedReader ( new InputStreamReader ( request.getInputStream() ) );
while ( (temp = buff.readLine()) != null )
{
serverResponse = serverResponse + temp;
}
// XML RESPONSE EXAMPLE
// xml = "- <message type=\"comet.message.updates\" id=\"[email protected]\" count=\"2\">z" +
// "- <contact id=\"jy5740\" />" +
// "<statement text=\"test\" from=\"jy5740\" />" +
// "<statement text=\"testing 123\" from=\"jy5740\" />" +
// "</contact>" +
// "</message>";
}
catch (MalformedURLException ex)
{
System.out.println("Bad URL: " + ex);
}
catch (IOException ex)
{
System.out.println("Connection error: " + ex);
}
// do stuff with the serverResponse string
The method works perfectly if there are messages that have not been received at the time of the method call. The problem is when there have not been any messages since the last check. The method just stays in the while loop until a message is sent to the bot locking my app. How do I determine if there was no response from the server? | 0 |
7,967,359 | 11/01/2011 13:41:20 | 608,455 | 02/08/2011 16:40:46 | 310 | 5 | Using MVVM with CollectionViewSource | I'm trying to use CollectionViewSource to display some data, and all the examples/tutorials I've seen have a custom class built, which they use in another class, which inherits from ObservableCollection<Class1>. I'm new to both using CollectionViewSource and this is only my third implementation of MVVM, so I might misunderstand the programming pattern, but my question is:
where do I put the ObservableCollection class and/or custom class?
I feel like they should go in the Model, but then I'm not sure what gets bound to the View. Do I just build these as external classes, and then reference them in Model/ViewModel?
Any help is appreciated | c# | wpf | data-binding | mvvm | collectionviewsource | null | open | Using MVVM with CollectionViewSource
===
I'm trying to use CollectionViewSource to display some data, and all the examples/tutorials I've seen have a custom class built, which they use in another class, which inherits from ObservableCollection<Class1>. I'm new to both using CollectionViewSource and this is only my third implementation of MVVM, so I might misunderstand the programming pattern, but my question is:
where do I put the ObservableCollection class and/or custom class?
I feel like they should go in the Model, but then I'm not sure what gets bound to the View. Do I just build these as external classes, and then reference them in Model/ViewModel?
Any help is appreciated | 0 |
4,995,429 | 02/14/2011 17:47:12 | 19,347 | 09/19/2008 21:59:01 | 1,375 | 87 | Spring: DRY with <list/>. Copy all values from listA to listB | I've configured <list/> in Spring listA (see below). It would be nice to have another one that contains all values from listA and expand it.
<bean id="listA" class="java.util.ArrayList">
<constructor-arg>
<list>
<value>a</value>
<value>b</value>
<value>...</value>
<value>z</value>
</list>
</constructor-arg>
</bean>
How to rewrite in Spring such Java code?
List listB = new ArrayList(listA);
listB.add("A");
...
listB.add("Z");
| java | spring | ioc-container | dry | null | null | open | Spring: DRY with <list/>. Copy all values from listA to listB
===
I've configured <list/> in Spring listA (see below). It would be nice to have another one that contains all values from listA and expand it.
<bean id="listA" class="java.util.ArrayList">
<constructor-arg>
<list>
<value>a</value>
<value>b</value>
<value>...</value>
<value>z</value>
</list>
</constructor-arg>
</bean>
How to rewrite in Spring such Java code?
List listB = new ArrayList(listA);
listB.add("A");
...
listB.add("Z");
| 0 |
10,245,764 | 04/20/2012 11:56:01 | 1,126,719 | 01/02/2012 19:47:55 | 100 | 3 | Is it possible to determine the facet content in a custom controls design definition? | I'm putting together the design definition for a custom control and would like to vary how it displays based on whether or not a different custom control has been placed in the one of the facet areas. Is this possibe with the design definition and if so, how?
I know I can reference properties of the custom control by using "this", but I couldn't guess as to how to get to the facet content information.
Any ideas? Thanks | xpages | null | null | null | null | null | open | Is it possible to determine the facet content in a custom controls design definition?
===
I'm putting together the design definition for a custom control and would like to vary how it displays based on whether or not a different custom control has been placed in the one of the facet areas. Is this possibe with the design definition and if so, how?
I know I can reference properties of the custom control by using "this", but I couldn't guess as to how to get to the facet content information.
Any ideas? Thanks | 0 |
673,616 | 03/23/2009 14:39:21 | 52,420 | 01/07/2009 13:07:08 | 57 | 7 | How to delete a column of Dataset? | How to delete a column of Dataset?
There is any method?
<pre><code>
rh.dsDetail = ds.Tables[0].Columns.Remove( . . . . . .
</code></pre>
Do you know any method ? like below:<br>
<pre><code>
rh.dsDetail = ds.Tables[0].Columns.Remove( ds.Tables[0].Columns[1],ds.Tables[0].Columns[2]...)
</code></pre> | c# | dataset | .net | null | null | null | open | How to delete a column of Dataset?
===
How to delete a column of Dataset?
There is any method?
<pre><code>
rh.dsDetail = ds.Tables[0].Columns.Remove( . . . . . .
</code></pre>
Do you know any method ? like below:<br>
<pre><code>
rh.dsDetail = ds.Tables[0].Columns.Remove( ds.Tables[0].Columns[1],ds.Tables[0].Columns[2]...)
</code></pre> | 0 |
3,226,605 | 07/12/2010 07:35:47 | 58,961 | 12/29/2008 23:43:10 | 3,675 | 167 | Inversion of Control < Dependency Injection | I'm getting the feeling that there's is not such thing as inversion of control or rather the correct term is dependency injection. Am I wrong to assume this?
I've been trying to define IoC for my own sake. In doing so I've leared a great deal about IoC containers and dependency injection.
Just now I read this from [Matrin Fowler's website][1]:
> As a result I think we need a more
> specific name for this pattern.
> Inversion of Control is too generic a
> term, and thus people find it
> confusing. As a result with a lot of
> discussion with various IoC advocates
> we settled on the name Dependency
> Injection.
In the world of modern IoC isn't dependency injection just one way to achieve IoC?
[1]: http://martinfowler.com/articles/injection.html#InversionOfControl | dependency-injection | inversion-of-control | null | null | null | 01/23/2012 21:00:44 | not a real question | Inversion of Control < Dependency Injection
===
I'm getting the feeling that there's is not such thing as inversion of control or rather the correct term is dependency injection. Am I wrong to assume this?
I've been trying to define IoC for my own sake. In doing so I've leared a great deal about IoC containers and dependency injection.
Just now I read this from [Matrin Fowler's website][1]:
> As a result I think we need a more
> specific name for this pattern.
> Inversion of Control is too generic a
> term, and thus people find it
> confusing. As a result with a lot of
> discussion with various IoC advocates
> we settled on the name Dependency
> Injection.
In the world of modern IoC isn't dependency injection just one way to achieve IoC?
[1]: http://martinfowler.com/articles/injection.html#InversionOfControl | 1 |
11,511,561 | 07/16/2012 19:53:10 | 1,529,928 | 07/16/2012 19:48:48 | 1 | 0 | Reddit api request limit? | I'm making an app that submits links to reddit using the reddit api with <b>PHP</b>. The main problem I have is that there's a limit to the amount of requests I can make per minute. I've been searching on google for certain methods to use cache files to override this, but I haven't seen anythhing that could help me specifically. I would be much appreciated if someone could at least give me a few hints to get me going on overriding the request limit. | php | api | request | reddit | null | 07/16/2012 20:00:22 | not a real question | Reddit api request limit?
===
I'm making an app that submits links to reddit using the reddit api with <b>PHP</b>. The main problem I have is that there's a limit to the amount of requests I can make per minute. I've been searching on google for certain methods to use cache files to override this, but I haven't seen anythhing that could help me specifically. I would be much appreciated if someone could at least give me a few hints to get me going on overriding the request limit. | 1 |
7,377,283 | 09/11/2011 09:06:38 | 732,372 | 04/30/2011 12:14:40 | 272 | 5 | How to add paging to extjs 4 grid? | I have a store like this which i used for a extjs grid
Ext.create('Ext.data.Store', {
autoLoad : true,
fields : [
{name: 'item_code', mapping: 'item_code', type: 'string'},
{name: 'quantity', mapping: 'quantity', type: 'string'},
{name: 'description', mapping: 'description', type: 'string'},
{name: 'selling_price', mapping: 'selling_price', type: 'string'},
{name: 'discount', mapping: 'discount', type: 'string'}
],
storeId : 'available_products',
proxy : {
type : 'ajax',
actionMethods : 'POST',
url : 'http://192.168.1.6/transactions/distribution_store',
reader: {
type: 'json',
root: 'data'
}
}
});
I want to add a paging to grid but i want it like this
first load all the data with json and paging those results at client side without sending server requests.
is it possible?
how to do this?
Regards | javascript | extjs | extjs4 | null | null | null | open | How to add paging to extjs 4 grid?
===
I have a store like this which i used for a extjs grid
Ext.create('Ext.data.Store', {
autoLoad : true,
fields : [
{name: 'item_code', mapping: 'item_code', type: 'string'},
{name: 'quantity', mapping: 'quantity', type: 'string'},
{name: 'description', mapping: 'description', type: 'string'},
{name: 'selling_price', mapping: 'selling_price', type: 'string'},
{name: 'discount', mapping: 'discount', type: 'string'}
],
storeId : 'available_products',
proxy : {
type : 'ajax',
actionMethods : 'POST',
url : 'http://192.168.1.6/transactions/distribution_store',
reader: {
type: 'json',
root: 'data'
}
}
});
I want to add a paging to grid but i want it like this
first load all the data with json and paging those results at client side without sending server requests.
is it possible?
how to do this?
Regards | 0 |
11,477,829 | 07/13/2012 20:22:12 | 656,171 | 03/11/2011 23:59:04 | 148 | 6 | Having trouble recasting WifiManager to Object in Android | So I am quite new to Android, and have limited previous Java experience, so please bear with me. I am trying to create an object of type WifiManager in an Android App, and I have the line I found several other people recommend to create a WifiManager object verbatum:
WifiManager wifi = mContext.getSystemService(Context.WIFI_SERVICE);
in my program. Now Eclipse has underlined the mContext.GetSystemService etc part with the error **Type mismatch, cannot convert from object to WifiManager**
Now I have tried recasting the return using:
(WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
This will compile, but results in a **java.lang.NullPointerException** when executed
Any thoughts on this would be greatly appreciated! | java | android | android-wifi | null | null | 07/16/2012 02:40:12 | too localized | Having trouble recasting WifiManager to Object in Android
===
So I am quite new to Android, and have limited previous Java experience, so please bear with me. I am trying to create an object of type WifiManager in an Android App, and I have the line I found several other people recommend to create a WifiManager object verbatum:
WifiManager wifi = mContext.getSystemService(Context.WIFI_SERVICE);
in my program. Now Eclipse has underlined the mContext.GetSystemService etc part with the error **Type mismatch, cannot convert from object to WifiManager**
Now I have tried recasting the return using:
(WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
This will compile, but results in a **java.lang.NullPointerException** when executed
Any thoughts on this would be greatly appreciated! | 3 |
6,002,851 | 05/14/2011 15:35:51 | 514,235 | 11/20/2010 05:25:21 | 1,920 | 153 | What's the difference when time delay specified in LHS or RHS ? | a = #5 b;
#5 a = b;
Is there any difference between above 2 sentense ? | delay | verilog | null | null | null | null | open | What's the difference when time delay specified in LHS or RHS ?
===
a = #5 b;
#5 a = b;
Is there any difference between above 2 sentense ? | 0 |
5,323,047 | 03/16/2011 09:09:44 | 157,861 | 08/17/2009 16:04:17 | 1,336 | 15 | Navigating between View controllers ? | In my Iphone application I am trying to navigate from one table view controller to next table view controller. Problem I am facing is that I have to fetch data using http request and then parse this data when the user select a cell. I am able to fetch and parse the data but the view controller is not waiting for the data to parsed and the next view controller is shown (which is empty). How to over come this problem.
indexSelected = [NSString stringWithFormat: @"%d",[indexPath row] ];
[[MySingletonClass sharedMySingleton] doAnAuthenticatedAPIFetch_Subscriber_Detail : indexSelected];
SubscribersDetailViews2 *viewController = [[SubscribersDetailViews2 alloc] initWithNibName:@"SubscribersDetailViews2" bundle:nil];
[[self navigationController] pushViewController:viewController animated:YES];
[viewController release]; | objective-c | table | iphone-sdk-4.0 | view | null | null | open | Navigating between View controllers ?
===
In my Iphone application I am trying to navigate from one table view controller to next table view controller. Problem I am facing is that I have to fetch data using http request and then parse this data when the user select a cell. I am able to fetch and parse the data but the view controller is not waiting for the data to parsed and the next view controller is shown (which is empty). How to over come this problem.
indexSelected = [NSString stringWithFormat: @"%d",[indexPath row] ];
[[MySingletonClass sharedMySingleton] doAnAuthenticatedAPIFetch_Subscriber_Detail : indexSelected];
SubscribersDetailViews2 *viewController = [[SubscribersDetailViews2 alloc] initWithNibName:@"SubscribersDetailViews2" bundle:nil];
[[self navigationController] pushViewController:viewController animated:YES];
[viewController release]; | 0 |
5,816,831 | 04/28/2011 10:00:38 | 531,232 | 12/05/2010 14:18:55 | 16 | 7 | Hibernate EntityManager + Query Cache - "join fetch" not working | I am trying to cache a query like this:
TypedQuery<Foo> q = em.createQuery(
"SELECT foo FROM Foo foo " +
"INNER JOIN FETCH Foo.bar "
);
q.setHint("org.hibernate.cacheable", true);
The problem is that the `FETCH` doesn't seem to have any effect when the cache is hit, i.e. the collection Foo.bar doesn't get initialized. I could iterate over the the result list and initialize all instances of the collection by hand, but that would make the whole thing even slower than without using the query cache in the first place.
I use JBoss AS 6.0 / Hibernate 3.6 with Infinispan as cache engine.
Curiously, according to the cache statistics I get through the JMX console, objects in Foo.bar seem to get cached, but the cache for those objects doesn't get any hits. | hibernate | jpa | join | fetch | query-cache | null | open | Hibernate EntityManager + Query Cache - "join fetch" not working
===
I am trying to cache a query like this:
TypedQuery<Foo> q = em.createQuery(
"SELECT foo FROM Foo foo " +
"INNER JOIN FETCH Foo.bar "
);
q.setHint("org.hibernate.cacheable", true);
The problem is that the `FETCH` doesn't seem to have any effect when the cache is hit, i.e. the collection Foo.bar doesn't get initialized. I could iterate over the the result list and initialize all instances of the collection by hand, but that would make the whole thing even slower than without using the query cache in the first place.
I use JBoss AS 6.0 / Hibernate 3.6 with Infinispan as cache engine.
Curiously, according to the cache statistics I get through the JMX console, objects in Foo.bar seem to get cached, but the cache for those objects doesn't get any hits. | 0 |
9,967,013 | 04/01/2012 18:25:42 | 103,044 | 05/07/2009 17:40:50 | 8 | 0 | Named anchors not working with dynamic html and jquery | I am trying to add a html snippet dynamically which contains named anchors and destinations via jquery append('html') method
None of the named links work after the append. The newly added content is visible on the page, but the links dont work. Is it because these tags were added dynamically, or am I doing something wrong here? However, all server side generated named anchors work fine.
simplified html:
<a href="#tab">Foo</a>
<div id="tab"></div>
("#testButton").click(function() {
$('#mainSegmentDiv').append("html")
});
Thanks! | jquery | html-anchor | named-anchor | dynamic-html | null | null | open | Named anchors not working with dynamic html and jquery
===
I am trying to add a html snippet dynamically which contains named anchors and destinations via jquery append('html') method
None of the named links work after the append. The newly added content is visible on the page, but the links dont work. Is it because these tags were added dynamically, or am I doing something wrong here? However, all server side generated named anchors work fine.
simplified html:
<a href="#tab">Foo</a>
<div id="tab"></div>
("#testButton").click(function() {
$('#mainSegmentDiv').append("html")
});
Thanks! | 0 |
9,231,926 | 02/10/2012 17:17:55 | 226,717 | 12/07/2009 22:14:47 | 70 | 3 | Splitting hairs on language? Creating a Simple World Server | For the last few years I've been doing mostly Web (PHP) and Mobile (Android/iPhone) development and - to be honest - have gotten a bit bored with it. I'm looking to expand my resume and get back into doing "low level" coding, such as C/C++ or Java. My background is in mathematics and computer science, but I've been "out of it" for so long, that I'm finding it hard to transition back from web scripting and polished SDKs to memory management and event driven C/C++.
In any case, as an exciting project idea, I decided it would be fun to create a simple virtual world server, where a client could connect to the server, and send movement commands and the server would return not only a verification of those commands being executed, but a list of all other nearby clients. You get the idea - super simple virtual world with multiple clients. I started writing my program in C++ with the Boost ASIO libraries and am finding it to be really difficult for me to grasp - mostly because it's been a long while since I wrote any C/C++ code. I started wondering if writing it in Java would be worthwhile - and if I decided to take this project to a wider audience - would Java be able to handle the load of 1000 clients as well as C/C++ would.
So the real things I'm wondering are this:
- At what point would YOU limit your language to something more "low level" like C/C++ as compared to Java.
- Where do you draw the line between the time it takes to create something ( favored by Java ) and the efficiency at which that final project works ( favored in C/C++ )?
- If you were going to write this sort of a client/server virtual world, what would you write it in?
- Lastly - what tutorials would you suggest in approaching this sort of endeavor? So far I've tried to focus on the Boost::ASIO tutorials to create an Asynchronous server, but it's definitely slow-going. | java | c++ | mmorpg | null | null | 02/10/2012 17:36:35 | not constructive | Splitting hairs on language? Creating a Simple World Server
===
For the last few years I've been doing mostly Web (PHP) and Mobile (Android/iPhone) development and - to be honest - have gotten a bit bored with it. I'm looking to expand my resume and get back into doing "low level" coding, such as C/C++ or Java. My background is in mathematics and computer science, but I've been "out of it" for so long, that I'm finding it hard to transition back from web scripting and polished SDKs to memory management and event driven C/C++.
In any case, as an exciting project idea, I decided it would be fun to create a simple virtual world server, where a client could connect to the server, and send movement commands and the server would return not only a verification of those commands being executed, but a list of all other nearby clients. You get the idea - super simple virtual world with multiple clients. I started writing my program in C++ with the Boost ASIO libraries and am finding it to be really difficult for me to grasp - mostly because it's been a long while since I wrote any C/C++ code. I started wondering if writing it in Java would be worthwhile - and if I decided to take this project to a wider audience - would Java be able to handle the load of 1000 clients as well as C/C++ would.
So the real things I'm wondering are this:
- At what point would YOU limit your language to something more "low level" like C/C++ as compared to Java.
- Where do you draw the line between the time it takes to create something ( favored by Java ) and the efficiency at which that final project works ( favored in C/C++ )?
- If you were going to write this sort of a client/server virtual world, what would you write it in?
- Lastly - what tutorials would you suggest in approaching this sort of endeavor? So far I've tried to focus on the Boost::ASIO tutorials to create an Asynchronous server, but it's definitely slow-going. | 4 |
9,980,906 | 04/02/2012 17:26:55 | 881,936 | 08/06/2011 13:01:29 | 100 | 1 | Ubuntu Xen Virtualization | I am using Ubuntu 11.04.
My project is to create a virtual laboratory wherein the students will log in from dump terminals and via network, they will be logged into a virtual OS which will most probably implemented using XEN.
My questions are :
1. Am I using right Ubuntu? Coz i read that for such kind of a system,we need ubuntu server.
2. Is XEN advisable?
Thanks for future help. | ubuntu | terminal | virtual | virtualization | xen | 04/13/2012 04:21:45 | off topic | Ubuntu Xen Virtualization
===
I am using Ubuntu 11.04.
My project is to create a virtual laboratory wherein the students will log in from dump terminals and via network, they will be logged into a virtual OS which will most probably implemented using XEN.
My questions are :
1. Am I using right Ubuntu? Coz i read that for such kind of a system,we need ubuntu server.
2. Is XEN advisable?
Thanks for future help. | 2 |
6,356,266 | 06/15/2011 10:23:21 | 376,454 | 06/25/2010 16:16:18 | 1,471 | 38 | Rotating an image without the Image Processing Toolbox | I would like to rotate a non-squared image with Matlab:
- without using the `imrotate` function, since it is part of the Image Processing Toolbox,
- with the `loose` parameter, wich means the size of the output differs from the size of the input image,
- and with a not too slow function compared to `imrotate`.
The signature of the function would be:
`imOutput = my_imrotate(imInput, theta_degres, interpolation, bbox)`
where:
- `interpolation` would be `bilinear`, `bicubic` or `nearest`,
- `bbox` would be `crop`, or `loose`.
I have already found [a function](http://www.johnloomis.org/ece563/notes/geom/warp/imrotate.m.html) in order to do this (just replace `imshow` and `bestblk` with your own functions in order not to use the toolbox), yet it is **really slow** for large images.
My approach would try to avoid making loops and relying as much as possible on `interp2`. My idea is to compute the size of a frame which would contain the original image as well as the rotated image, and then:
1. pad the original image so as to have an image which size is the size of the frame,
2. use `interp2` on the padded image,
3. crop the resulting image so as to have the rotated image without the remaining padding.
I already have a good result with the `crop` parameter, but I cannot manage to find the offset for the `loose` parameter.
Here is the code for the `crop` parameter, where `Z` is the input and `Zi` is the output:
Z = double(imInput);
sz = size(Z);
[X,Y] = meshgrid(1:sz(2), 1:sz(1));
% Center
c = sz/2;
% Angle
t = theta_degres*pi/180;
% Rotation
ct = cos(t);
st = sin(t);
Xi = c(1) + ct*(X-c(1))-st*(Y-c(2));
Yi = c(2) + st*(X-c(1))+ct*(Y-c(2));
% Rotation
Zi = interp2(X, Y, Z, Xi, Yi);
To get the size of the rotated image with the `loose parameter`, I compute the `rotation_matrix` and call `rotate_points` on the coordinates of the corners `p` of the input image:
rotate_points = @(p) bsxfun(@plus, c', rotation_matrix * bsxfun(@minus, p, c)')';
Any help would be highly appreciated.
| matlab | matlab-toolbox | image-rotation | loose | null | null | open | Rotating an image without the Image Processing Toolbox
===
I would like to rotate a non-squared image with Matlab:
- without using the `imrotate` function, since it is part of the Image Processing Toolbox,
- with the `loose` parameter, wich means the size of the output differs from the size of the input image,
- and with a not too slow function compared to `imrotate`.
The signature of the function would be:
`imOutput = my_imrotate(imInput, theta_degres, interpolation, bbox)`
where:
- `interpolation` would be `bilinear`, `bicubic` or `nearest`,
- `bbox` would be `crop`, or `loose`.
I have already found [a function](http://www.johnloomis.org/ece563/notes/geom/warp/imrotate.m.html) in order to do this (just replace `imshow` and `bestblk` with your own functions in order not to use the toolbox), yet it is **really slow** for large images.
My approach would try to avoid making loops and relying as much as possible on `interp2`. My idea is to compute the size of a frame which would contain the original image as well as the rotated image, and then:
1. pad the original image so as to have an image which size is the size of the frame,
2. use `interp2` on the padded image,
3. crop the resulting image so as to have the rotated image without the remaining padding.
I already have a good result with the `crop` parameter, but I cannot manage to find the offset for the `loose` parameter.
Here is the code for the `crop` parameter, where `Z` is the input and `Zi` is the output:
Z = double(imInput);
sz = size(Z);
[X,Y] = meshgrid(1:sz(2), 1:sz(1));
% Center
c = sz/2;
% Angle
t = theta_degres*pi/180;
% Rotation
ct = cos(t);
st = sin(t);
Xi = c(1) + ct*(X-c(1))-st*(Y-c(2));
Yi = c(2) + st*(X-c(1))+ct*(Y-c(2));
% Rotation
Zi = interp2(X, Y, Z, Xi, Yi);
To get the size of the rotated image with the `loose parameter`, I compute the `rotation_matrix` and call `rotate_points` on the coordinates of the corners `p` of the input image:
rotate_points = @(p) bsxfun(@plus, c', rotation_matrix * bsxfun(@minus, p, c)')';
Any help would be highly appreciated.
| 0 |
9,171,115 | 02/07/2012 04:42:31 | 1,193,840 | 02/07/2012 04:30:05 | 1 | 0 | How to open local files via firefox | I am having a php project in which i am basically dynamically creating hyperlinks to files existing on the local drive for eg c:/vikram/htc.doc . I created a basic html file and added the usual hyperlinks with the code as
<a href="file:///C:/vikram/htc.doc">hello</a>
But whenever i launch this page in firefox, there is no response. It doesnt show an error message neither does it launch the file. When i checked the error console on firefox it reads
Security Error: Content at http://localhost/PhpProject1/newhtml1.html may not load or link to file:///C:/vikram/htc.doc.
Even after implementing all their suggestions still firefox isnt allowing the file to be launched!!!!
If anyone can please suggest me a way to work around this security feature or suggest another browser which allows this(I have tried IE too and it doesnt work there as well).
Since the php project is being launch via my xampp control of apache its redirected under localhost is there any way to work with this functionality.
PLease Help!!!!!
| firefox | localhost | null | null | null | 02/07/2012 18:21:55 | off topic | How to open local files via firefox
===
I am having a php project in which i am basically dynamically creating hyperlinks to files existing on the local drive for eg c:/vikram/htc.doc . I created a basic html file and added the usual hyperlinks with the code as
<a href="file:///C:/vikram/htc.doc">hello</a>
But whenever i launch this page in firefox, there is no response. It doesnt show an error message neither does it launch the file. When i checked the error console on firefox it reads
Security Error: Content at http://localhost/PhpProject1/newhtml1.html may not load or link to file:///C:/vikram/htc.doc.
Even after implementing all their suggestions still firefox isnt allowing the file to be launched!!!!
If anyone can please suggest me a way to work around this security feature or suggest another browser which allows this(I have tried IE too and it doesnt work there as well).
Since the php project is being launch via my xampp control of apache its redirected under localhost is there any way to work with this functionality.
PLease Help!!!!!
| 2 |
1,368,569 | 09/02/2009 15:56:11 | 74,825 | 03/06/2009 18:15:45 | 1 | 0 | Fluent NHibernate / NHibernate Mappings | I have a parent table and relationship table to find child parent relationship.
I need to find child, parent and its siblings...
EMPLOYEE_RELATION has columns EMPLOYEE_ID and PARENT_ID that saves the relationship.
Here's what SQL looks like. How do I map this to Fluent NHibernate / NHibernate.
select
V1.PARENT_ID AS PARENT_ID,
V.EMPLOYEE_ID AS EMPLOYEE_ID,
V2.EMPLOYEE_ID AS SIBLINGS_ID
FROM
EMPLOYEE V
INNER JOIN EMPLOYEE_RELATION V1
ON V.EMPLOYEE_ID = V1.EMPLOYEE_ID
INNER JOIN EMPLOYEE_RELATION V2
ON V2.PARENT_ID = V1.PARENT_ID
WHERE V.EMPLOYEE_ID = 6357
| nhibernate-mapping | sql | fluent-nhibernate | null | null | null | open | Fluent NHibernate / NHibernate Mappings
===
I have a parent table and relationship table to find child parent relationship.
I need to find child, parent and its siblings...
EMPLOYEE_RELATION has columns EMPLOYEE_ID and PARENT_ID that saves the relationship.
Here's what SQL looks like. How do I map this to Fluent NHibernate / NHibernate.
select
V1.PARENT_ID AS PARENT_ID,
V.EMPLOYEE_ID AS EMPLOYEE_ID,
V2.EMPLOYEE_ID AS SIBLINGS_ID
FROM
EMPLOYEE V
INNER JOIN EMPLOYEE_RELATION V1
ON V.EMPLOYEE_ID = V1.EMPLOYEE_ID
INNER JOIN EMPLOYEE_RELATION V2
ON V2.PARENT_ID = V1.PARENT_ID
WHERE V.EMPLOYEE_ID = 6357
| 0 |
8,507,561 | 12/14/2011 16:01:05 | 16,241 | 09/17/2008 15:38:49 | 7,652 | 160 | What is the implementing class for IGrouping? | I am trying create a WCF Service Operation that does grouping on the server side and then sends the data down to the client.
When I try to call it (or even connect to the service) I get an error. It says that it can't construct an interface.
The only interface I am using is IGrouping.
I assume the concrete class is Grouping, but what assembly is it in? What is its namespace?
| c# | .net | null | null | null | null | open | What is the implementing class for IGrouping?
===
I am trying create a WCF Service Operation that does grouping on the server side and then sends the data down to the client.
When I try to call it (or even connect to the service) I get an error. It says that it can't construct an interface.
The only interface I am using is IGrouping.
I assume the concrete class is Grouping, but what assembly is it in? What is its namespace?
| 0 |
9,503,423 | 02/29/2012 17:03:40 | 1,151,619 | 11/26/2010 03:49:49 | 8 | 0 | how to use AVAssetReader to read remote mp4 file | Major goal is to read a video from a server, and get it frame by frame while streaming, so that it can be used by OpenGL. But AVURLAsset is not work.
NSURL *url = [NSURL urlWithString:strurl];
AVURLAsset *avasset = [[AVURLAsset alloc] initWithURL:url options:nil];
AVAssetTrack *track = [[avasset tracksWithMediaType:AVMediaTypeVideo] objectAtIndex:0];
NSDictionary* dictionary = [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:kCVPixelFormatType_32BGRA]
forKey:(id)kCVPixelBufferPixelFormatTypeKey];
output = [[AVAssetReaderTrackOutput alloc] initWithTrack:track outputSettings:dictionary];
reader = [[AVAssetReader alloc] initWithAsset:avasset error:nil];
[reader addOutput:output];
[reader startReading];
[avasset release];
the return of [avasset tracksWithMediaType:AVMediaTypeVideo] is nil
so if this approach doesn't work, what are other suggestions to read the remote video and get its frames?
Thanks for your help | iphone | opengl-es | avfoundation | avurlasset | avassetreader | null | open | how to use AVAssetReader to read remote mp4 file
===
Major goal is to read a video from a server, and get it frame by frame while streaming, so that it can be used by OpenGL. But AVURLAsset is not work.
NSURL *url = [NSURL urlWithString:strurl];
AVURLAsset *avasset = [[AVURLAsset alloc] initWithURL:url options:nil];
AVAssetTrack *track = [[avasset tracksWithMediaType:AVMediaTypeVideo] objectAtIndex:0];
NSDictionary* dictionary = [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:kCVPixelFormatType_32BGRA]
forKey:(id)kCVPixelBufferPixelFormatTypeKey];
output = [[AVAssetReaderTrackOutput alloc] initWithTrack:track outputSettings:dictionary];
reader = [[AVAssetReader alloc] initWithAsset:avasset error:nil];
[reader addOutput:output];
[reader startReading];
[avasset release];
the return of [avasset tracksWithMediaType:AVMediaTypeVideo] is nil
so if this approach doesn't work, what are other suggestions to read the remote video and get its frames?
Thanks for your help | 0 |
3,698,501 | 09/13/2010 07:26:31 | 26,521 | 10/09/2008 14:54:41 | 2,086 | 49 | Where can I download the Tech Days 10 Sessions DVD? | Where can I download the Tech Days 10 Sessions DVD? | microsoft | null | null | null | null | 10/27/2010 10:02:16 | too localized | Where can I download the Tech Days 10 Sessions DVD?
===
Where can I download the Tech Days 10 Sessions DVD? | 3 |
7,375,280 | 09/10/2011 23:11:01 | 926,158 | 12/14/2010 15:45:32 | 25 | 0 | Where to find cool Facebook like buttons? | I want a link to a facebook fanpage from my website.
I know the default is the one with just a thumbs up and XX people like this. I want something more. I've seen some that are half hidden, and then when you hover over it it 'scrolls' out into full mode. I like this idea.
Does anyone have any links to "widgets" for your HTML page like these?
-DLA | facebook | facebook-like | null | null | null | 09/11/2011 02:44:35 | not constructive | Where to find cool Facebook like buttons?
===
I want a link to a facebook fanpage from my website.
I know the default is the one with just a thumbs up and XX people like this. I want something more. I've seen some that are half hidden, and then when you hover over it it 'scrolls' out into full mode. I like this idea.
Does anyone have any links to "widgets" for your HTML page like these?
-DLA | 4 |
6,018,194 | 05/16/2011 13:32:12 | 313,768 | 04/11/2010 04:47:56 | 2,908 | 197 | Light PHP database-driven framework | I'm looking for a framework that has the following characteristics:
- Preferably PHP-driven
- Preferably FOSS
- Light, simple
- Has a concentration on quick prototyping rather than complex security models
- Is able to semi-automatically generate HTML forms for a GUI interface to an existing SQL database, given some DDL, without modifying its structure
- DBMS-agnostic, ie., works with PostgreSQL just as well as MySQL
I have a reasonable amount of PHP and SQL experience, but in this case I don't want to go through the (repetitive) trouble of making the forms and login system myself. I'd also prefer not to have to learn an entire new language just to get this done (ie. Ruby).
Any suggestions would be welcome. Thanks. | php | sql | web-applications | frontend | null | 05/16/2011 19:40:52 | not constructive | Light PHP database-driven framework
===
I'm looking for a framework that has the following characteristics:
- Preferably PHP-driven
- Preferably FOSS
- Light, simple
- Has a concentration on quick prototyping rather than complex security models
- Is able to semi-automatically generate HTML forms for a GUI interface to an existing SQL database, given some DDL, without modifying its structure
- DBMS-agnostic, ie., works with PostgreSQL just as well as MySQL
I have a reasonable amount of PHP and SQL experience, but in this case I don't want to go through the (repetitive) trouble of making the forms and login system myself. I'd also prefer not to have to learn an entire new language just to get this done (ie. Ruby).
Any suggestions would be welcome. Thanks. | 4 |
1,167,492 | 07/22/2009 19:07:08 | 21,661 | 09/24/2008 13:05:34 | 27 | 3 | Can I comletely force a checkin to TFS? | I need a way to force a branch in TFS to update itself to exactly match what is in the working folders. I need something that will delete files that are on the server but not in the working folders, add files to the server that are only in the working folders, and update the changed files by using the exact version that is in the working folders. I need this to be form the command line or the API’s and not a manually in the UI.
Does anyone know of any way to do this?
| tfs | null | null | null | null | null | open | Can I comletely force a checkin to TFS?
===
I need a way to force a branch in TFS to update itself to exactly match what is in the working folders. I need something that will delete files that are on the server but not in the working folders, add files to the server that are only in the working folders, and update the changed files by using the exact version that is in the working folders. I need this to be form the command line or the API’s and not a manually in the UI.
Does anyone know of any way to do this?
| 0 |
10,494,824 | 05/08/2012 08:00:36 | 1,381,486 | 05/08/2012 07:56:50 | 1 | 0 | I wanna create a virtuel printer with java and i dont know how to proced to it . | I ask for api wich connect pdfcreator with my application java
thanks to help my with any sugestion | java | pdf | printing | null | null | 05/08/2012 10:13:08 | not a real question | I wanna create a virtuel printer with java and i dont know how to proced to it .
===
I ask for api wich connect pdfcreator with my application java
thanks to help my with any sugestion | 1 |
7,878,943 | 10/24/2011 16:43:59 | 875,692 | 08/03/2011 00:42:48 | 1 | 0 | Django+ajax (jquery): http error code 403 (forbidden) | I was developing a simple ajax call ($.ajax function with type, url and data as options parameters) with jquery in a page, but i got 403 error.
So i have added to $.ajax function a further options parameter for csrf, and the corresponding token is correcly displayed in the template.
But i got 403 error again.
I also have tried to add to view handler (in views.py) a csrf decorator, like `@csrf_protect` or `@requires_csrf_token` but nothing is changed.
Some help?
I have seen this pattern to make an ajax call in django [https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#s-ajax][1]
[1]: https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#s-ajax
but it is really too much code for me to make a simple ajax call, so i find a short solution | ajax | django | null | null | null | 10/26/2011 14:04:52 | not a real question | Django+ajax (jquery): http error code 403 (forbidden)
===
I was developing a simple ajax call ($.ajax function with type, url and data as options parameters) with jquery in a page, but i got 403 error.
So i have added to $.ajax function a further options parameter for csrf, and the corresponding token is correcly displayed in the template.
But i got 403 error again.
I also have tried to add to view handler (in views.py) a csrf decorator, like `@csrf_protect` or `@requires_csrf_token` but nothing is changed.
Some help?
I have seen this pattern to make an ajax call in django [https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#s-ajax][1]
[1]: https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#s-ajax
but it is really too much code for me to make a simple ajax call, so i find a short solution | 1 |
3,440,463 | 08/09/2010 13:28:04 | 365,614 | 06/13/2010 10:04:17 | 55 | 1 | mail sending from website | I developed one website on python and hosted on google app.
I want to send mails from that website
for that i need help what to do??? | python | google-app-engine | email | null | null | null | open | mail sending from website
===
I developed one website on python and hosted on google app.
I want to send mails from that website
for that i need help what to do??? | 0 |
295,687 | 11/17/2008 14:34:34 | 51 | 08/01/2008 13:31:13 | 2,473 | 87 | Get Path to Execution Directory of Windows Forms Application | I would like to get the path to the execution directory of a windows forms application (ie: the directory in which the executable is located). Does anyone know of a built-in method in .Net to do this? | winforms | application | directory | null | null | null | open | Get Path to Execution Directory of Windows Forms Application
===
I would like to get the path to the execution directory of a windows forms application (ie: the directory in which the executable is located). Does anyone know of a built-in method in .Net to do this? | 0 |
3,233,448 | 07/13/2010 00:57:53 | 14,904 | 09/17/2008 03:53:02 | 1,686 | 81 | Is this fast lock implementation correct ? | I have a large data structure that is using striping to reduce lock contention. Right now I am using system locks but 99.99% of the time, the lock is uncontested and futhermore, the amount of time holding the lock is quite miniscule. However, several distinct memory operations are performed while the lock is held. It has actually gotten to the point where the time spent aquiring and releasing the locks is significant compared to the overall time accessing the data structure.
So I thinking about replacing the OS lock with the following very simple lock. Only try and unlock are shown here because the 99.99% of the time FastTryLock() is going to succeed. The "pLock" variable here represents a fine granularity lock in the striped structure.
bool FastTryLock(DWORD *pLock)
{
if(0==AtomicXCHG(pLock,1)) {
MemoryBarrier_LightWeight(); return(true);
}
return(false);
}
void FastUnlock(DWORD *pLock)
{
MemoryBarrier_LightWeight(); *((volatile DWORD*)pLock)=0;
}
On the PC, MemoryBarrier_LightWeight() is a no-op since the CPU guarantees memory write ordering. | optimization | locking | atomic-swap | null | null | null | open | Is this fast lock implementation correct ?
===
I have a large data structure that is using striping to reduce lock contention. Right now I am using system locks but 99.99% of the time, the lock is uncontested and futhermore, the amount of time holding the lock is quite miniscule. However, several distinct memory operations are performed while the lock is held. It has actually gotten to the point where the time spent aquiring and releasing the locks is significant compared to the overall time accessing the data structure.
So I thinking about replacing the OS lock with the following very simple lock. Only try and unlock are shown here because the 99.99% of the time FastTryLock() is going to succeed. The "pLock" variable here represents a fine granularity lock in the striped structure.
bool FastTryLock(DWORD *pLock)
{
if(0==AtomicXCHG(pLock,1)) {
MemoryBarrier_LightWeight(); return(true);
}
return(false);
}
void FastUnlock(DWORD *pLock)
{
MemoryBarrier_LightWeight(); *((volatile DWORD*)pLock)=0;
}
On the PC, MemoryBarrier_LightWeight() is a no-op since the CPU guarantees memory write ordering. | 0 |
4,037,522 | 10/27/2010 20:40:22 | 310,525 | 04/07/2010 01:05:46 | 189 | 0 | SQL query LEFT JOIN issue (MySQL) | I have 2 tables - SCHOOLS (ID, SCHOOL_NAME, CITY_ID) and STUDENTS (ID, STUDENT_NAME, SCHOOL_ID). I want to list schools in a particular city along with the student count (School Name| Student Count)
One way to do this is to have co-related subquery -
select sh.school_name, (select count(*) from student where school_id = sh.id) as student_count from schools sh where city_id=1
But since co-related queries are not recommended, I want to avoid that & I tried a group by -
select sh.school_name, count(st.school_id) as student_count from schools sh left join students st on sh.id=st.school_id where sh.city_id=1 group by st.school_id
Now this works only if the student count for a school is > 0. So i m guessing the left join concept is not working, meaning if any schools that has no students should be listed as student_count=0, but that is not happening. The interesting thing is - i do see "one" record with student_count = 0, but thats about it.
Anything wrong in my LEFT JOIN query??
| mysql | mysql-query | sql-join | null | null | null | open | SQL query LEFT JOIN issue (MySQL)
===
I have 2 tables - SCHOOLS (ID, SCHOOL_NAME, CITY_ID) and STUDENTS (ID, STUDENT_NAME, SCHOOL_ID). I want to list schools in a particular city along with the student count (School Name| Student Count)
One way to do this is to have co-related subquery -
select sh.school_name, (select count(*) from student where school_id = sh.id) as student_count from schools sh where city_id=1
But since co-related queries are not recommended, I want to avoid that & I tried a group by -
select sh.school_name, count(st.school_id) as student_count from schools sh left join students st on sh.id=st.school_id where sh.city_id=1 group by st.school_id
Now this works only if the student count for a school is > 0. So i m guessing the left join concept is not working, meaning if any schools that has no students should be listed as student_count=0, but that is not happening. The interesting thing is - i do see "one" record with student_count = 0, but thats about it.
Anything wrong in my LEFT JOIN query??
| 0 |
4,627,227 | 01/07/2011 15:40:03 | 301,752 | 03/25/2010 14:09:49 | 35 | 1 | coldfusion application.cfm error log not logging all errors | I have a Coldfusion application which uses a <cferror> tag in the application.cfm file. This tag seems to be randomly logging errors. There are errors in the Coldfusion error log. I have been able to cause errors that get logged. I have also heard user reports of errors which are not logged.
After doing some searching, I've found that application.cfc has trouble logging errors in some of the methods; however, I am not using application.cfc.
Wondering if anyone has run across the same behavior, and how to best handle. I cannot debug application without the error information... any help would be appreciated | logging | coldfusion | exception-logging | null | null | null | open | coldfusion application.cfm error log not logging all errors
===
I have a Coldfusion application which uses a <cferror> tag in the application.cfm file. This tag seems to be randomly logging errors. There are errors in the Coldfusion error log. I have been able to cause errors that get logged. I have also heard user reports of errors which are not logged.
After doing some searching, I've found that application.cfc has trouble logging errors in some of the methods; however, I am not using application.cfc.
Wondering if anyone has run across the same behavior, and how to best handle. I cannot debug application without the error information... any help would be appreciated | 0 |
9,653,147 | 03/11/2012 07:14:18 | 1,261,935 | 03/11/2012 06:38:24 | 1 | 0 | how to set a variable equal to the first element in an Integer ArrayList? | This is my code that i have now. Im trying to make variable n equal to the first element in the integer array List.I tried using the set method but that only works for String arrayLists.
ArrayList<Integer> intList = new ArrayList<Integer>();
int x = 5;// just put in after Q19.
??int n = myList;
intList.add(1);
intList.add(2);
intList.add(3);
intList.add(x); | java | null | null | null | null | 03/16/2012 03:51:43 | not a real question | how to set a variable equal to the first element in an Integer ArrayList?
===
This is my code that i have now. Im trying to make variable n equal to the first element in the integer array List.I tried using the set method but that only works for String arrayLists.
ArrayList<Integer> intList = new ArrayList<Integer>();
int x = 5;// just put in after Q19.
??int n = myList;
intList.add(1);
intList.add(2);
intList.add(3);
intList.add(x); | 1 |
10,355,303 | 04/27/2012 17:37:35 | 712,560 | 04/17/2011 22:29:45 | 40 | 0 | ssh scp command not working | I am using putty to connect my windows machine with remote machine and I am able to connect to remote machine but when I am using SCP command to download some files to my local windows machine it is saying
ssh: connect to host XXXXXXXXXX port 22: Connection refused
lost connection
I am writing this command:-
scp * username@mywindowsmachine:~/Desktop
Please reply as soon as possible | ssh | null | null | null | null | 05/14/2012 12:07:29 | off topic | ssh scp command not working
===
I am using putty to connect my windows machine with remote machine and I am able to connect to remote machine but when I am using SCP command to download some files to my local windows machine it is saying
ssh: connect to host XXXXXXXXXX port 22: Connection refused
lost connection
I am writing this command:-
scp * username@mywindowsmachine:~/Desktop
Please reply as soon as possible | 2 |
11,441,930 | 07/11/2012 21:41:42 | 595,936 | 01/30/2011 17:00:24 | 324 | 2 | node.js login and user admin page demo | I'm new to **node.js** and am looking for an example using **user login/authentication** and **admin pages to manage the users**. I thought this would be pretty common but so far I have been unable to find anything. Can someone suggest some examples/demos to me? Thanks in advance. | javascript | node.js | coffeescript | null | null | 07/11/2012 21:56:07 | not constructive | node.js login and user admin page demo
===
I'm new to **node.js** and am looking for an example using **user login/authentication** and **admin pages to manage the users**. I thought this would be pretty common but so far I have been unable to find anything. Can someone suggest some examples/demos to me? Thanks in advance. | 4 |
3,737,536 | 09/17/2010 17:21:37 | 450,849 | 09/17/2010 17:21:37 | 1 | 0 | How do that thing in c++ | I wanna make a application like this:
this is console for example:
write_number 5
Your number is 5
How do that?
Can someone explain ? | c++ | null | null | null | null | 09/19/2010 18:05:32 | not a real question | How do that thing in c++
===
I wanna make a application like this:
this is console for example:
write_number 5
Your number is 5
How do that?
Can someone explain ? | 1 |
5,212,279 | 03/06/2011 17:54:50 | 477,228 | 10/15/2010 17:23:17 | 90 | 4 | jquery problem on tab selection | I have a problem related to my previous article http://stackoverflow.com/questions/5211879/css-button-selection-and-html-tags
Not very good with javascript if any one could offer some insight as to where im going wrong, also why does asp layout the jquery like below in one giant line. Very frustrating.
Thanks to any one who can help
/*
*
*/
(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
p.s I cant show all of it as its 50 thousand in length only 30k max not sure how to post the extra | javascript | asp.net | html | null | null | null | open | jquery problem on tab selection
===
I have a problem related to my previous article http://stackoverflow.com/questions/5211879/css-button-selection-and-html-tags
Not very good with javascript if any one could offer some insight as to where im going wrong, also why does asp layout the jquery like below in one giant line. Very frustrating.
Thanks to any one who can help
/*
*
*/
(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
p.s I cant show all of it as its 50 thousand in length only 30k max not sure how to post the extra | 0 |
8,787,458 | 01/09/2012 11:08:19 | 239,991 | 12/29/2009 05:41:18 | 167 | 0 | How to increment a integer variable itself | How to increment a integer variable itself in C#?
i need something the variables as
integer1
integer2
integer3
integer4
integer5
In a for loop when it is looped i want the variables gets incremented. How can i get? | c# | asp.net | .net-3.5 | null | null | 01/09/2012 13:56:14 | not a real question | How to increment a integer variable itself
===
How to increment a integer variable itself in C#?
i need something the variables as
integer1
integer2
integer3
integer4
integer5
In a for loop when it is looped i want the variables gets incremented. How can i get? | 1 |
8,945,438 | 01/20/2012 17:30:49 | 1,159,814 | 01/20/2012 01:58:52 | 6 | 0 | facebook updates on my site | Trying to include a simple(?) feed of the most recent facebook status update on my home page. i know there are WP plugins to do this, but I'm not finding a way to do it without. Here's my page. At moment the copy bottom right is just a manual input of the facebook status update, to show where and how I'm trying to get it:
http://creyoncafe.com/nuevo.html
Here's another site that essentially does what I want, tho they used a WP plugin (I think), and they have more than just a single update:
http://www.eve-amsterdam.com/?page_id=284
Thanks in advance. | facebook | null | null | null | null | 01/21/2012 20:04:14 | too localized | facebook updates on my site
===
Trying to include a simple(?) feed of the most recent facebook status update on my home page. i know there are WP plugins to do this, but I'm not finding a way to do it without. Here's my page. At moment the copy bottom right is just a manual input of the facebook status update, to show where and how I'm trying to get it:
http://creyoncafe.com/nuevo.html
Here's another site that essentially does what I want, tho they used a WP plugin (I think), and they have more than just a single update:
http://www.eve-amsterdam.com/?page_id=284
Thanks in advance. | 3 |
636,081 | 03/11/2009 19:52:37 | 73,066 | 03/03/2009 04:28:03 | 73 | 13 | How to rotate, scale, and translate a matrix all at once in C#? | Okay, this is something that should be a simple matrix question, but my understanding of matrices is somewhat limited. Here's the scenario: I have a 1px by 1px sprite that I want to scale by some amount x and y (different amounts on each side), and then I want to rotate that sprite by some angle, and then I want to be able to precisely position the whole thing (from the top left or the center, makes no difference to me).
So far my code is vaguely close, but it tends to be off by some random amount depending on the angle I pass in.
I would think that this would do it:
Point center = new Point( 50, 50 );
float width = 60;
float height = 100;
float angle = 0.5;
Vector3 axis = new Vector3( center.X, center.Y, 0 );
axis.Normalize();
Matrix m = Matrix.Scaling( width, height, 0 ) *
Matrix.RotationAxis( axis, angle ) *
Matrix.Translation( center.X, center.Y, 0 );
But it tends to shrink the scale of the rotated line way down, even though I think it's positioning it sort of right.
I've also tried this:
Matrix m = Matrix.Transformation2D( new Vector2( center.X, center.Y ), 0f,
new Vector2( width, height ), new Vector2( center.X, center.Y ),
angle, Vector2.Zero );
The line looks exactly right, with the exact right size and shape, but I can't position it correctly at all. If I use the translation vector at the end of the call above, or if I set a position using Sprite.Draw, neither works right.
This is all in SlimDX. What am I doing wrong? | c# | slimdx | matrix | translation | null | null | open | How to rotate, scale, and translate a matrix all at once in C#?
===
Okay, this is something that should be a simple matrix question, but my understanding of matrices is somewhat limited. Here's the scenario: I have a 1px by 1px sprite that I want to scale by some amount x and y (different amounts on each side), and then I want to rotate that sprite by some angle, and then I want to be able to precisely position the whole thing (from the top left or the center, makes no difference to me).
So far my code is vaguely close, but it tends to be off by some random amount depending on the angle I pass in.
I would think that this would do it:
Point center = new Point( 50, 50 );
float width = 60;
float height = 100;
float angle = 0.5;
Vector3 axis = new Vector3( center.X, center.Y, 0 );
axis.Normalize();
Matrix m = Matrix.Scaling( width, height, 0 ) *
Matrix.RotationAxis( axis, angle ) *
Matrix.Translation( center.X, center.Y, 0 );
But it tends to shrink the scale of the rotated line way down, even though I think it's positioning it sort of right.
I've also tried this:
Matrix m = Matrix.Transformation2D( new Vector2( center.X, center.Y ), 0f,
new Vector2( width, height ), new Vector2( center.X, center.Y ),
angle, Vector2.Zero );
The line looks exactly right, with the exact right size and shape, but I can't position it correctly at all. If I use the translation vector at the end of the call above, or if I set a position using Sprite.Draw, neither works right.
This is all in SlimDX. What am I doing wrong? | 0 |
11,209,398 | 06/26/2012 14:18:37 | 1,159,056 | 01/19/2012 17:19:23 | 131 | 14 | Sencha Touch 2 Store TypeError | I'm following the video on the Sencha website, for creating my first application.
This is the video I'm following: [Video][1]
This is the code I'm using for the Blog tab:
Ext.define('GS.view.Blog',{
extend: 'Ext.navigation.View',
xtype: 'blogpanel',
requires: [
'Ext.dataview.List',
'Ext.data.proxy.JsonP'
],
config: {
title: 'Blog',
iconCls: 'star',
items: {
xtype: 'list',
itemTpl: '{title}',
store: {
autoLoad: true,
fields: ['title', 'author', 'content'],
root: {
leaf: false
},
proxy: {
type: 'jsonp',
url: 'https://ajax.googleapis.com/ajax/services/feed/load?v=1.0&q=http://feeds.feedburner.com/SenchaBlog',
reader: {
type: 'json',
rootProperty: 'responseData.feed.entries'
}
}
}
}
}
});
In the Safari Console, it is giving me the following error on StoreManager.js:97:
TypeError: 'undefined' is not a valid argument for 'instanceof' (evaluating 'store instanceof Ext.data.Store')
What am I doing wrong?
[1]: http://player.vimeo.com/video/37974749 "Video" | sencha-touch-2 | null | null | null | null | null | open | Sencha Touch 2 Store TypeError
===
I'm following the video on the Sencha website, for creating my first application.
This is the video I'm following: [Video][1]
This is the code I'm using for the Blog tab:
Ext.define('GS.view.Blog',{
extend: 'Ext.navigation.View',
xtype: 'blogpanel',
requires: [
'Ext.dataview.List',
'Ext.data.proxy.JsonP'
],
config: {
title: 'Blog',
iconCls: 'star',
items: {
xtype: 'list',
itemTpl: '{title}',
store: {
autoLoad: true,
fields: ['title', 'author', 'content'],
root: {
leaf: false
},
proxy: {
type: 'jsonp',
url: 'https://ajax.googleapis.com/ajax/services/feed/load?v=1.0&q=http://feeds.feedburner.com/SenchaBlog',
reader: {
type: 'json',
rootProperty: 'responseData.feed.entries'
}
}
}
}
}
});
In the Safari Console, it is giving me the following error on StoreManager.js:97:
TypeError: 'undefined' is not a valid argument for 'instanceof' (evaluating 'store instanceof Ext.data.Store')
What am I doing wrong?
[1]: http://player.vimeo.com/video/37974749 "Video" | 0 |
5,330,120 | 03/16/2011 18:39:41 | 290,769 | 03/10/2010 17:48:17 | 283 | 8 | Jquery Autocomplete with Categories and Selection | I'm having some problems implementing Jquery's autocomplete feature with categories and custom display.
I get an error saying 'ui.item' is undefined when I select on one of the entries. My code is below
$jq.widget("custom.categoryautocomplete", $jq.ui.autocomplete, {
_renderMenu: function(ul, items){
var self = this;
var currentCategory = "";
$jq.each(items, function(index, item){
if(item.category != currentCategory){
ul.append(" <li class='ui-autocomplete-category'>" + item.category + "</li>");
currentCategory = item.category;
}
self._renderItem(ul, item);
});
}
});
$jq(function(){
$jq("#tlf\\:tlfs").categoryautocomplete({
source: getAutoCompleteSource(),
focus: function(event, ui){
$jq("#tlf\\:tlfs").val(ui.item.label);
return false;
},
select: function(event, ui){
$jq("#tlf\\:tlfs").val("");
// javascript to select the row
selectRow(ui.item.rownum);
return false;
}
}).data("categoryautocomplete")._renderItem = function (ul, item) {
return $jq("<li></li>")
.data("item.categoryautocomplete", item)
.append("<a>" + item.type +" - " + item.uid + "<br>" + item.desc + "</a>")
.appendTo(ul);
};
});
I am able to see the list drop down when I start typing, so I assume my JSON is well formed. Any ideas what might be causing the 'ui.item is undefined' error? | javascript | jquery | autocomplete | null | null | null | open | Jquery Autocomplete with Categories and Selection
===
I'm having some problems implementing Jquery's autocomplete feature with categories and custom display.
I get an error saying 'ui.item' is undefined when I select on one of the entries. My code is below
$jq.widget("custom.categoryautocomplete", $jq.ui.autocomplete, {
_renderMenu: function(ul, items){
var self = this;
var currentCategory = "";
$jq.each(items, function(index, item){
if(item.category != currentCategory){
ul.append(" <li class='ui-autocomplete-category'>" + item.category + "</li>");
currentCategory = item.category;
}
self._renderItem(ul, item);
});
}
});
$jq(function(){
$jq("#tlf\\:tlfs").categoryautocomplete({
source: getAutoCompleteSource(),
focus: function(event, ui){
$jq("#tlf\\:tlfs").val(ui.item.label);
return false;
},
select: function(event, ui){
$jq("#tlf\\:tlfs").val("");
// javascript to select the row
selectRow(ui.item.rownum);
return false;
}
}).data("categoryautocomplete")._renderItem = function (ul, item) {
return $jq("<li></li>")
.data("item.categoryautocomplete", item)
.append("<a>" + item.type +" - " + item.uid + "<br>" + item.desc + "</a>")
.appendTo(ul);
};
});
I am able to see the list drop down when I start typing, so I assume my JSON is well formed. Any ideas what might be causing the 'ui.item is undefined' error? | 0 |
11,015,257 | 06/13/2012 12:52:20 | 1,018,562 | 03/08/2010 14:56:00 | 1,344 | 8 | How much an instruction on x86 takes | Assume the clock frequency is 3.0 Ghz. How much time an instruction would take approximately, if that instruction is reading/writing to registers, that is, no cache misses or stalls. | c | performance | x86-64 | null | null | 06/13/2012 13:02:01 | not constructive | How much an instruction on x86 takes
===
Assume the clock frequency is 3.0 Ghz. How much time an instruction would take approximately, if that instruction is reading/writing to registers, that is, no cache misses or stalls. | 4 |
9,123,602 | 02/03/2012 04:15:31 | 889,360 | 08/11/2011 06:44:54 | 53 | 1 | Validating string in java | I need to validate a String.Now I am validating it by looping and checking each character in the string.Is there any way to validate this using Pattern,Matcher.
String is comprised with `'+','-(hypen)' and '0-9'`
> '+' can only be appear in first character.There can't be any two
> consecutive hypen(-).
If '+' is in first character,second char can't be
> hypen.Finally if the string contains total of 10 to 13 digits then it
> is valid, otherwise invalid.
Thanks in advance
| java | string | null | null | null | 02/05/2012 23:37:00 | not a real question | Validating string in java
===
I need to validate a String.Now I am validating it by looping and checking each character in the string.Is there any way to validate this using Pattern,Matcher.
String is comprised with `'+','-(hypen)' and '0-9'`
> '+' can only be appear in first character.There can't be any two
> consecutive hypen(-).
If '+' is in first character,second char can't be
> hypen.Finally if the string contains total of 10 to 13 digits then it
> is valid, otherwise invalid.
Thanks in advance
| 1 |
8,188,064 | 11/18/2011 19:32:34 | 1,054,487 | 11/18/2011 19:27:12 | 1 | 0 | Pregunta con relación a la identificación | quiero saber como lograr identificar qué página de fans.
El ejemplo es sencillo: Yo instalé a la aplicación en en una página de fans cualquiera, en el momento de que el usuario inicio la aplicación mediante la fanspage, esta me mostrará una información según sea la página. hay alguna manera de indentificarlos por id?
Gracias. | performance | facebook | null | null | null | 11/18/2011 20:32:46 | not a real question | Pregunta con relación a la identificación
===
quiero saber como lograr identificar qué página de fans.
El ejemplo es sencillo: Yo instalé a la aplicación en en una página de fans cualquiera, en el momento de que el usuario inicio la aplicación mediante la fanspage, esta me mostrará una información según sea la página. hay alguna manera de indentificarlos por id?
Gracias. | 1 |
4,154,880 | 11/11/2010 13:29:06 | 452,902 | 09/20/2010 15:49:08 | 48 | 10 | Check Image when uploaded | I answered a topic some minutes ago, and it was removed I don't know why.
How I answered that, I'm posting here the solution, perhaps somebody needs..
Perhaps you need to use this function
mime_content_type('imagem.gif'); //It's deprecated but solve the problem
the output is image/gif
And you can use the output to compare all kinds of file you wish. Also you can use a table with all mime-types allowed in your uploads also some extra information about each mime-type.
for example if you try this:
mime_content_type('script.php');
the output is text/plain
then you just need to deny all files where the output is text/plain and allow only files where the output is:
1. image/gif
2. image/jpg
3. image/png
I hope this helps! | mime-types | null | null | null | null | null | open | Check Image when uploaded
===
I answered a topic some minutes ago, and it was removed I don't know why.
How I answered that, I'm posting here the solution, perhaps somebody needs..
Perhaps you need to use this function
mime_content_type('imagem.gif'); //It's deprecated but solve the problem
the output is image/gif
And you can use the output to compare all kinds of file you wish. Also you can use a table with all mime-types allowed in your uploads also some extra information about each mime-type.
for example if you try this:
mime_content_type('script.php');
the output is text/plain
then you just need to deny all files where the output is text/plain and allow only files where the output is:
1. image/gif
2. image/jpg
3. image/png
I hope this helps! | 0 |
576,687 | 02/23/2009 06:25:26 | 69,033 | 02/20/2009 17:49:34 | 1 | 1 | AS3 - how to start all over again a flash movie | This may be very simple, but I have no idea how to do this.
I created a photo gallery in AS3, everything is on one keyframe. In this photo gallery I have a link to home. My goal is, when someone clicks the "home" link I want everything to start over. Any ideas on how to do this in AS3?
Appreaciate it.
L. | actionscript-3 | flash-cs4 | null | null | null | null | open | AS3 - how to start all over again a flash movie
===
This may be very simple, but I have no idea how to do this.
I created a photo gallery in AS3, everything is on one keyframe. In this photo gallery I have a link to home. My goal is, when someone clicks the "home" link I want everything to start over. Any ideas on how to do this in AS3?
Appreaciate it.
L. | 0 |
2,046,809 | 01/12/2010 05:03:29 | 220,819 | 11/29/2009 12:27:51 | 2,207 | 145 | Introduction to 3D Graphics Programming | I'm a self-taught programmer with absolutely nil 3D programming experience.
A client of mine has related to me an idea for an iPhone app that requires OpenGL ES 2.0 for it's inherently complex 3D structure and animations.
Where do I start on this ( albeit long ) journey toward OpenGL ES competence?
I'm willing to put in a tremendous amount of time and effort into learning, and if i could please get some pointers to where I should start and what to expect, that would be awesome!
| opengl-es | 3d | iphone | null | null | 08/01/2011 20:43:52 | not constructive | Introduction to 3D Graphics Programming
===
I'm a self-taught programmer with absolutely nil 3D programming experience.
A client of mine has related to me an idea for an iPhone app that requires OpenGL ES 2.0 for it's inherently complex 3D structure and animations.
Where do I start on this ( albeit long ) journey toward OpenGL ES competence?
I'm willing to put in a tremendous amount of time and effort into learning, and if i could please get some pointers to where I should start and what to expect, that would be awesome!
| 4 |
5,815,676 | 04/28/2011 08:19:19 | 445,540 | 09/12/2010 11:19:00 | 658 | 24 | Oracle ODBC driver on Solaris 10 | I want to install oracle ODBC driver on Solaris 10, for to connect from Oracle Database to SQL server database.
It appeared very difficult for me...
Can you help me?
Thank you very muck. | sql-server | oracle | odbc | driver | null | 04/28/2011 19:12:28 | off topic | Oracle ODBC driver on Solaris 10
===
I want to install oracle ODBC driver on Solaris 10, for to connect from Oracle Database to SQL server database.
It appeared very difficult for me...
Can you help me?
Thank you very muck. | 2 |
5,235,567 | 03/08/2011 16:49:21 | 459,744 | 09/27/2010 16:54:11 | 161 | 18 | Overlay "Structured Glas" Effect on iPhone Camera Feed - General Directions | I'm currently trying to write an app, that would be able to show the effects of glas, as seen through the iPhone Camera.
I'm not talking about simple, uniform glas but glass like this:
![Glas Image][1]
Now I already broke this into two problems:
1) Apply some Image Filter to the 2D-frames presented by the iPhone Camera. This has been done and seems possible, e.g. in the app: [faceman][2]
2) I need to get the individual lighting properties of a sheet of glas that my client supplies me with. Now basicly, there must be a way to read the information about how the glas distorts ands skews the image. I think It might be somehow possible to make a high-res picture of the plate of glasplate, laid on a checkerboard-image and somehow analyze this.
Now, I'm mostly searching for literature, weblinks on how you guys think I could start at 2. It doesn't need to be exact, in the end I just need something that looks approximately like the sheet of glass I want to show. And I'm don't even know where to search, Physics, Image Filtering or Comupational Photography books.
[1]: http://i.stack.imgur.com/6btzc.jpg
[2]: http://itunes.apple.com/us/app/faceman/id388888160?mt=8 | iphone | image-processing | filtering | video-processing | null | null | open | Overlay "Structured Glas" Effect on iPhone Camera Feed - General Directions
===
I'm currently trying to write an app, that would be able to show the effects of glas, as seen through the iPhone Camera.
I'm not talking about simple, uniform glas but glass like this:
![Glas Image][1]
Now I already broke this into two problems:
1) Apply some Image Filter to the 2D-frames presented by the iPhone Camera. This has been done and seems possible, e.g. in the app: [faceman][2]
2) I need to get the individual lighting properties of a sheet of glas that my client supplies me with. Now basicly, there must be a way to read the information about how the glas distorts ands skews the image. I think It might be somehow possible to make a high-res picture of the plate of glasplate, laid on a checkerboard-image and somehow analyze this.
Now, I'm mostly searching for literature, weblinks on how you guys think I could start at 2. It doesn't need to be exact, in the end I just need something that looks approximately like the sheet of glass I want to show. And I'm don't even know where to search, Physics, Image Filtering or Comupational Photography books.
[1]: http://i.stack.imgur.com/6btzc.jpg
[2]: http://itunes.apple.com/us/app/faceman/id388888160?mt=8 | 0 |
9,636,999 | 03/09/2012 15:53:12 | 1,088,924 | 12/09/2011 02:30:04 | 1 | 0 | How does this order page work? | https://markup-service.com/order/create
How does that form work ? The javascript source code is compressed and cant be decompressed at least as far as i know.
I need help building a similar page, and any insight on how to replicate the result we see on that link is a b ig help for me.
What intrigues me the most, is the part where the price gets updated all the time, reading the value from the <dd> tag maybe ? | javascript | jquery | null | null | null | 03/09/2012 15:58:15 | not a real question | How does this order page work?
===
https://markup-service.com/order/create
How does that form work ? The javascript source code is compressed and cant be decompressed at least as far as i know.
I need help building a similar page, and any insight on how to replicate the result we see on that link is a b ig help for me.
What intrigues me the most, is the part where the price gets updated all the time, reading the value from the <dd> tag maybe ? | 1 |
11,721,871 | 07/30/2012 12:45:28 | 1,542,233 | 07/21/2012 05:48:28 | 13 | 3 | Shopping Cart With Add To Cart Button | I Need a button in product list which will add that product when it is clicked.
Example is here http://icondock.com/.
there will be pluse button on each and every product if click that it will be added to the cart.
i need to option in this shopping cart http://jsfiddle.net/bkw5p/48/
| jquery | shopping-cart | null | null | null | 07/31/2012 05:29:07 | not constructive | Shopping Cart With Add To Cart Button
===
I Need a button in product list which will add that product when it is clicked.
Example is here http://icondock.com/.
there will be pluse button on each and every product if click that it will be added to the cart.
i need to option in this shopping cart http://jsfiddle.net/bkw5p/48/
| 4 |
10,777,319 | 05/27/2012 21:11:08 | 1,416,553 | 05/25/2012 04:46:35 | 24 | 1 | Which method is better and faster,with include or without in PHP | I included 2 files(header,footer) in one page
and normal page without include function (header and footer in one page)
Which methods are faster and which method is les load on server ? | php | null | null | null | null | 05/27/2012 22:34:14 | not constructive | Which method is better and faster,with include or without in PHP
===
I included 2 files(header,footer) in one page
and normal page without include function (header and footer in one page)
Which methods are faster and which method is les load on server ? | 4 |
11,488,841 | 07/15/2012 02:07:07 | 995,519 | 10/14/2011 13:48:24 | 1 | 0 | How do I start a jquery function automatically when the page loads, and also maintain it's user interaction | I have a javascript function using Jquery on my page. I want to make so that it will start this function automatically when the page loads, but so the user can also still interact with the function. It's a function that involves selecting a link that will hide and fadeIn a new div. I am trying to have this happen automatically as well.
$(document).ready(function() {
$('#tablecell1').click((function () {
var last_image = null;
return function () {
if (last_image) {
$('#tablecell1 .selected').attr('src', last_image).removeClass('selected');
}
var $clicked_image = $('img', this);
last_image = $clicked_image.attr('src');
$clicked_image.attr('src', 'NewsBarAZ/Article-Nav-Bar2_01.gif').addClass('selected');
$('#img2').attr('src','NewsBarAZ/Article-Nav-Bar1_02.gif');
$('#img3').attr('src','NewsBarAZ/Article-Nav-Bar1_03.gif');
$('#img4').attr('src','NewsBarAZ/Article-Nav-Bar1_04.gif');
$('#img5').attr('src','NewsBarAZ/Article-Nav-Bar1_05.gif');
}
})());
$('#tablecell2').click((function () {
var last_image = null;
return function () {
if (last_image) {
$('#tablecell2 .selected').attr('src', last_image).removeClass('selected');
}
var $clicked_image = $('img', this);
last_image = $clicked_image.attr('src');
$clicked_image.attr('src', 'NewsBarAZ/Article-Nav-Bar2_02.gif').addClass('selected');
$('#img1').attr('src','NewsBarAZ/Article-Nav-Bar1_01.gif');
$('#img3').attr('src','NewsBarAZ/Article-Nav-Bar1_03.gif');
$('#img4').attr('src','NewsBarAZ/Article-Nav-Bar1_04.gif');
$('#img5').attr('src','NewsBarAZ/Article-Nav-Bar1_05.gif');
}
})());
$('#tablecell2').click((function () {
var last_image = null;
return function () {
if (last_image) {
$('#tablecell2 .selected').attr('src', last_image).removeClass('selected');
}
var $clicked_image = $('img', this);
last_image = $clicked_image.attr('src');
$clicked_image.attr('src', 'NewsBarAZ/Article-Nav-Bar2_02.gif').addClass('selected');
$('#img1').attr('src','NewsBarAZ/Article-Nav-Bar1_01.gif');
$('#img3').attr('src','NewsBarAZ/Article-Nav-Bar1_03.gif');
$('#img4').attr('src','NewsBarAZ/Article-Nav-Bar1_04.gif');
$('#img5').attr('src','NewsBarAZ/Article-Nav-Bar1_05.gif');
}
})());
$('#tablecell3').click((function () {
var last_image = null;
return function () {
if (last_image) {
$('#tablecell3 .selected').attr('src', last_image).removeClass('selected');
}
var $clicked_image = $('img', this);
last_image = $clicked_image.attr('src');
$clicked_image.attr('src', 'NewsBarAZ/Article-Nav-Bar2_03.gif').addClass('selected');
$('#img1').attr('src','NewsBarAZ/Article-Nav-Bar1_01.gif');
$('#img2').attr('src','NewsBarAZ/Article-Nav-Bar1_02.gif');
$('#img4').attr('src','NewsBarAZ/Article-Nav-Bar1_04.gif');
$('#img5').attr('src','NewsBarAZ/Article-Nav-Bar1_05.gif');
}
})());
$('#tablecell4').click((function () {
var last_image = null;
return function () {
if (last_image) {
$('#tablecell4 .selected').attr('src', last_image).removeClass('selected');
}
var $clicked_image = $('img', this);
last_image = $clicked_image.attr('src');
$clicked_image.attr('src', 'NewsBarAZ/Article-Nav-Bar2_04.gif').addClass('selected');
$('#img1').attr('src','NewsBarAZ/Article-Nav-Bar1_01.gif');
$('#img2').attr('src','NewsBarAZ/Article-Nav-Bar1_02.gif');
$('#img3').attr('src','NewsBarAZ/Article-Nav-Bar1_03.gif');
$('#img5').attr('src','NewsBarAZ/Article-Nav-Bar1_05.gif');
}
})());
$('#tablecell5').click((function () {
var last_image = null;
return function () {
if (last_image) {
$('#tablecell5 .selected').attr('src', last_image).removeClass('selected');
}
var $clicked_image = $('img', this);
last_image = $clicked_image.attr('src');
$clicked_image.attr('src', 'NewsBarAZ/Article-Nav-Bar2_05.gif').addClass('selected');
$('#img1').attr('src','NewsBarAZ/Article-Nav-Bar1_01.gif');
$('#img2').attr('src','NewsBarAZ/Article-Nav-Bar1_02.gif');
$('#img3').attr('src','NewsBarAZ/Article-Nav-Bar1_03.gif');
$('#img4').attr('src','NewsBarAZ/Article-Nav-Bar1_04.gif');
}
})());
$('.preview').hide();
$('#link_1').click(function(){
$('#latest_story_preview1').hide();
$('#latest_story_preview2').hide();
$('#latest_story_preview3').hide();
$('#latest_story_preview4').hide();
$('#latest_story_main').fadeIn(800);
});
$('#link_2').click(function(){
$('#latest_story_main').hide();
$('#latest_story_preview2').hide();
$('#latest_story_preview3').hide();
$('#latest_story_preview4').hide();
$('#latest_story_preview1').fadeIn(800);
});
$('#link_3').click(function(){
$('#latest_story_main').hide();
$('#latest_story_preview1').hide();
$('#latest_story_preview3').hide();
$('#latest_story_preview4').hide();
$('#latest_story_preview2').fadeIn(800);
});
$('#link_4').click(function(){
$('#latest_story_main').hide();
$('#latest_story_preview1').hide();
$('#latest_story_preview2').hide();
$('#latest_story_preview4').hide();
$('#latest_story_preview3').fadeIn(800);
});
$('#link_5').click(function(){
$('#latest_story_main').hide();
$('#latest_story_preview1').hide();
$('#latest_story_preview2').hide();
$('#latest_story_preview3').hide();
$('#latest_story_preview4').fadeIn(800);
});
}); | javascript | jquery | html | css | null | 07/16/2012 09:56:41 | too localized | How do I start a jquery function automatically when the page loads, and also maintain it's user interaction
===
I have a javascript function using Jquery on my page. I want to make so that it will start this function automatically when the page loads, but so the user can also still interact with the function. It's a function that involves selecting a link that will hide and fadeIn a new div. I am trying to have this happen automatically as well.
$(document).ready(function() {
$('#tablecell1').click((function () {
var last_image = null;
return function () {
if (last_image) {
$('#tablecell1 .selected').attr('src', last_image).removeClass('selected');
}
var $clicked_image = $('img', this);
last_image = $clicked_image.attr('src');
$clicked_image.attr('src', 'NewsBarAZ/Article-Nav-Bar2_01.gif').addClass('selected');
$('#img2').attr('src','NewsBarAZ/Article-Nav-Bar1_02.gif');
$('#img3').attr('src','NewsBarAZ/Article-Nav-Bar1_03.gif');
$('#img4').attr('src','NewsBarAZ/Article-Nav-Bar1_04.gif');
$('#img5').attr('src','NewsBarAZ/Article-Nav-Bar1_05.gif');
}
})());
$('#tablecell2').click((function () {
var last_image = null;
return function () {
if (last_image) {
$('#tablecell2 .selected').attr('src', last_image).removeClass('selected');
}
var $clicked_image = $('img', this);
last_image = $clicked_image.attr('src');
$clicked_image.attr('src', 'NewsBarAZ/Article-Nav-Bar2_02.gif').addClass('selected');
$('#img1').attr('src','NewsBarAZ/Article-Nav-Bar1_01.gif');
$('#img3').attr('src','NewsBarAZ/Article-Nav-Bar1_03.gif');
$('#img4').attr('src','NewsBarAZ/Article-Nav-Bar1_04.gif');
$('#img5').attr('src','NewsBarAZ/Article-Nav-Bar1_05.gif');
}
})());
$('#tablecell2').click((function () {
var last_image = null;
return function () {
if (last_image) {
$('#tablecell2 .selected').attr('src', last_image).removeClass('selected');
}
var $clicked_image = $('img', this);
last_image = $clicked_image.attr('src');
$clicked_image.attr('src', 'NewsBarAZ/Article-Nav-Bar2_02.gif').addClass('selected');
$('#img1').attr('src','NewsBarAZ/Article-Nav-Bar1_01.gif');
$('#img3').attr('src','NewsBarAZ/Article-Nav-Bar1_03.gif');
$('#img4').attr('src','NewsBarAZ/Article-Nav-Bar1_04.gif');
$('#img5').attr('src','NewsBarAZ/Article-Nav-Bar1_05.gif');
}
})());
$('#tablecell3').click((function () {
var last_image = null;
return function () {
if (last_image) {
$('#tablecell3 .selected').attr('src', last_image).removeClass('selected');
}
var $clicked_image = $('img', this);
last_image = $clicked_image.attr('src');
$clicked_image.attr('src', 'NewsBarAZ/Article-Nav-Bar2_03.gif').addClass('selected');
$('#img1').attr('src','NewsBarAZ/Article-Nav-Bar1_01.gif');
$('#img2').attr('src','NewsBarAZ/Article-Nav-Bar1_02.gif');
$('#img4').attr('src','NewsBarAZ/Article-Nav-Bar1_04.gif');
$('#img5').attr('src','NewsBarAZ/Article-Nav-Bar1_05.gif');
}
})());
$('#tablecell4').click((function () {
var last_image = null;
return function () {
if (last_image) {
$('#tablecell4 .selected').attr('src', last_image).removeClass('selected');
}
var $clicked_image = $('img', this);
last_image = $clicked_image.attr('src');
$clicked_image.attr('src', 'NewsBarAZ/Article-Nav-Bar2_04.gif').addClass('selected');
$('#img1').attr('src','NewsBarAZ/Article-Nav-Bar1_01.gif');
$('#img2').attr('src','NewsBarAZ/Article-Nav-Bar1_02.gif');
$('#img3').attr('src','NewsBarAZ/Article-Nav-Bar1_03.gif');
$('#img5').attr('src','NewsBarAZ/Article-Nav-Bar1_05.gif');
}
})());
$('#tablecell5').click((function () {
var last_image = null;
return function () {
if (last_image) {
$('#tablecell5 .selected').attr('src', last_image).removeClass('selected');
}
var $clicked_image = $('img', this);
last_image = $clicked_image.attr('src');
$clicked_image.attr('src', 'NewsBarAZ/Article-Nav-Bar2_05.gif').addClass('selected');
$('#img1').attr('src','NewsBarAZ/Article-Nav-Bar1_01.gif');
$('#img2').attr('src','NewsBarAZ/Article-Nav-Bar1_02.gif');
$('#img3').attr('src','NewsBarAZ/Article-Nav-Bar1_03.gif');
$('#img4').attr('src','NewsBarAZ/Article-Nav-Bar1_04.gif');
}
})());
$('.preview').hide();
$('#link_1').click(function(){
$('#latest_story_preview1').hide();
$('#latest_story_preview2').hide();
$('#latest_story_preview3').hide();
$('#latest_story_preview4').hide();
$('#latest_story_main').fadeIn(800);
});
$('#link_2').click(function(){
$('#latest_story_main').hide();
$('#latest_story_preview2').hide();
$('#latest_story_preview3').hide();
$('#latest_story_preview4').hide();
$('#latest_story_preview1').fadeIn(800);
});
$('#link_3').click(function(){
$('#latest_story_main').hide();
$('#latest_story_preview1').hide();
$('#latest_story_preview3').hide();
$('#latest_story_preview4').hide();
$('#latest_story_preview2').fadeIn(800);
});
$('#link_4').click(function(){
$('#latest_story_main').hide();
$('#latest_story_preview1').hide();
$('#latest_story_preview2').hide();
$('#latest_story_preview4').hide();
$('#latest_story_preview3').fadeIn(800);
});
$('#link_5').click(function(){
$('#latest_story_main').hide();
$('#latest_story_preview1').hide();
$('#latest_story_preview2').hide();
$('#latest_story_preview3').hide();
$('#latest_story_preview4').fadeIn(800);
});
}); | 3 |
8,019,373 | 11/05/2011 09:44:17 | 547,198 | 12/18/2010 18:50:58 | 254 | 3 | Weka Vote: how to tune individual classifier | JMDJSMJLMSRIOMONS
Hi, I am using weka.classifier.meta. Vote. I am combining three classifiers, one of them is SMO. I want to know how can I specifically set the parameter values for SMO. Is there a way to do this using the graphical user interface? I want to change the value of C. | weka | vote | null | null | null | null | open | Weka Vote: how to tune individual classifier
===
JMDJSMJLMSRIOMONS
Hi, I am using weka.classifier.meta. Vote. I am combining three classifiers, one of them is SMO. I want to know how can I specifically set the parameter values for SMO. Is there a way to do this using the graphical user interface? I want to change the value of C. | 0 |
7,450,352 | 09/16/2011 21:00:18 | 727,429 | 03/23/2011 20:06:13 | 569 | 17 | Android saveState of webview page | I noticed that in the browser app, when I scroll down a webpage and rotate the screen, the location of the webpage stays
But when I try this in a webview of my own, the webpage (and everything else in the activity) reloads. I know about `onSaveInstanceState` but that takes Bundles of primitate data types, what about location within a webview?
I need to be able to rotate the screen without changing anything
Insight appreciated | android | webview | rotation | savestate | null | null | open | Android saveState of webview page
===
I noticed that in the browser app, when I scroll down a webpage and rotate the screen, the location of the webpage stays
But when I try this in a webview of my own, the webpage (and everything else in the activity) reloads. I know about `onSaveInstanceState` but that takes Bundles of primitate data types, what about location within a webview?
I need to be able to rotate the screen without changing anything
Insight appreciated | 0 |
387,298 | 12/22/2008 20:41:42 | 41,613 | 11/28/2008 14:57:49 | 108 | 8 | Fix screen blocking reverse video | I alias screen to 'TERM=screen screen' in order to fix it from messing up some key bindings (e.g. switching delete and backspace)
However, when I do this screen doesn't show some [reverse video][1] output -- for example, it works in vim, but not output from watch -d . If I run \screen thus avoiding the alias reverse video always works as expected.
How can I get screen to show reverse video correctly? This is on Ubuntu 8.04 BTW
[1]: http://en.wikipedia.org/wiki/Reverse_video | gnu-screen | linux | ubuntu | command-line | null | 12/28/2008 18:45:17 | off topic | Fix screen blocking reverse video
===
I alias screen to 'TERM=screen screen' in order to fix it from messing up some key bindings (e.g. switching delete and backspace)
However, when I do this screen doesn't show some [reverse video][1] output -- for example, it works in vim, but not output from watch -d . If I run \screen thus avoiding the alias reverse video always works as expected.
How can I get screen to show reverse video correctly? This is on Ubuntu 8.04 BTW
[1]: http://en.wikipedia.org/wiki/Reverse_video | 2 |
7,712,052 | 10/10/2011 11:23:08 | 499,825 | 11/07/2010 12:34:57 | 378 | 6 | Why can't I delete local xib? Please see the screenshot. | I selected MainWindow.xib(Russian-Russia) and pressed delete, but nothing happened. But why?
Please see the screenshot.
![enter image description here][1]
[1]: http://i.stack.imgur.com/BkGNW.png | ios | xcode | xib | null | null | null | open | Why can't I delete local xib? Please see the screenshot.
===
I selected MainWindow.xib(Russian-Russia) and pressed delete, but nothing happened. But why?
Please see the screenshot.
![enter image description here][1]
[1]: http://i.stack.imgur.com/BkGNW.png | 0 |
11,090,788 | 06/18/2012 20:48:36 | 1,463,848 | 06/18/2012 13:39:59 | 3 | 0 | how to start fadein and fadeout effect together in jquery | I am using the following code for fade effect between images in my manual slideshow type photo gallery. Normally, fadein effect of the next image starting after the fadeout effect of the previous picture finishes so there is very slight gap in between. I am wondering if it is possible to start fadeout and fadein of two images at the same time so that the pictures look like they are blending in each other during transition.
Also, this code works perfectly with Firefox and Chrome but it doesn't work properly with IE8. IE doesn't show fadein effect of the next image and the image shows up suddenly.
I am not very good with codes so please keep that in mind while answering.
I think that is the part related to this question;
function SetSlide(num, titleOnly) {
if (!titleOnly) {
//switch the image
var img = $("#imgslide");
// don't interrupt an image in transition
if (img.data("inTransition")) {
return;
}
img.data("inTransition", true);
//too big
i=num%theimage.length;
//too small
if(i<0)i=theimage.length-1;
img.stop(true).animate({opacity: 0}, 200, function() {
img.attr("src", theimage[i][0]);
img.animate({opacity: 1}, 200, function() {
img.data("inTransition", false);
});
})
}
Thank you!...
| javascript | jquery | slideshow | fade | photo-gallery | 06/18/2012 23:47:43 | not a real question | how to start fadein and fadeout effect together in jquery
===
I am using the following code for fade effect between images in my manual slideshow type photo gallery. Normally, fadein effect of the next image starting after the fadeout effect of the previous picture finishes so there is very slight gap in between. I am wondering if it is possible to start fadeout and fadein of two images at the same time so that the pictures look like they are blending in each other during transition.
Also, this code works perfectly with Firefox and Chrome but it doesn't work properly with IE8. IE doesn't show fadein effect of the next image and the image shows up suddenly.
I am not very good with codes so please keep that in mind while answering.
I think that is the part related to this question;
function SetSlide(num, titleOnly) {
if (!titleOnly) {
//switch the image
var img = $("#imgslide");
// don't interrupt an image in transition
if (img.data("inTransition")) {
return;
}
img.data("inTransition", true);
//too big
i=num%theimage.length;
//too small
if(i<0)i=theimage.length-1;
img.stop(true).animate({opacity: 0}, 200, function() {
img.attr("src", theimage[i][0]);
img.animate({opacity: 1}, 200, function() {
img.data("inTransition", false);
});
})
}
Thank you!...
| 1 |
11,338,375 | 07/05/2012 05:42:17 | 1,503,011 | 07/05/2012 05:38:26 | 1 | 0 | The page times out after 15min. it should not time out in asp.net mvc | The page times out after 15min. it should not time out in asp.net mvc aaplication.
how to implement this? | asp.net | asp.net-mvc | null | null | null | 07/05/2012 06:20:48 | not a real question | The page times out after 15min. it should not time out in asp.net mvc
===
The page times out after 15min. it should not time out in asp.net mvc aaplication.
how to implement this? | 1 |
8,568,924 | 12/19/2011 23:26:24 | 1,106,879 | 12/19/2011 23:22:32 | 1 | 0 | Code for seeing if a website is down? | I'm trying to replicate sites like http://www.downforeveryoneorjustme.com or http://doj.me. Any ideas about the coding? | php | null | null | null | null | 12/20/2011 01:28:37 | not a real question | Code for seeing if a website is down?
===
I'm trying to replicate sites like http://www.downforeveryoneorjustme.com or http://doj.me. Any ideas about the coding? | 1 |
4,548,871 | 12/28/2010 19:34:19 | 556,341 | 12/28/2010 19:34:19 | 1 | 0 | Building an Instapaper clone | I'm currently building a Instapaper clone and need some help designing the algorithm.
It has two components:
1. Extract the main text block from an HTML document
2. If the save article has more than 1 page then extract text from all pages
Can you guys point me to the right direction?
I will be using .NET 4 C# for this project. | c# | html | text | data-mining | null | 12/29/2010 01:18:58 | not a real question | Building an Instapaper clone
===
I'm currently building a Instapaper clone and need some help designing the algorithm.
It has two components:
1. Extract the main text block from an HTML document
2. If the save article has more than 1 page then extract text from all pages
Can you guys point me to the right direction?
I will be using .NET 4 C# for this project. | 1 |
6,931,599 | 08/03/2011 18:46:30 | 604,971 | 02/06/2011 03:17:55 | 62 | 0 | Copying rpm's from one OS to another | I am running sles10sp3 on two different vm's. I am trying to find the same rpm's as are installed on one of the vm's, so that I can install the same rpm's on the other vm. Is there any way to simply copy them from one vm to another (or in general copy all the .rpm's off SLES)? This has started with me trying to find a ruby 1.8.4 rpm and not having any luck, but there are a bunch of other rpm's I need to find as well. | linux | rpm | null | null | null | 08/04/2011 04:25:30 | off topic | Copying rpm's from one OS to another
===
I am running sles10sp3 on two different vm's. I am trying to find the same rpm's as are installed on one of the vm's, so that I can install the same rpm's on the other vm. Is there any way to simply copy them from one vm to another (or in general copy all the .rpm's off SLES)? This has started with me trying to find a ruby 1.8.4 rpm and not having any luck, but there are a bunch of other rpm's I need to find as well. | 2 |
6,297,591 | 06/09/2011 18:37:10 | 791,523 | 06/09/2011 18:32:21 | 1 | 0 | How to rearange a HTML table | I want to rearrange the HTML table.i.e Rows as Columns,Columns as Rows.
In what way i can do it.
Example :
1 4 7
2 5 8
3 6 9
as
1 2 3
4 5 6
7 8 9 | jquery | null | null | null | null | 06/09/2011 19:36:06 | not a real question | How to rearange a HTML table
===
I want to rearrange the HTML table.i.e Rows as Columns,Columns as Rows.
In what way i can do it.
Example :
1 4 7
2 5 8
3 6 9
as
1 2 3
4 5 6
7 8 9 | 1 |
4,556,279 | 12/29/2010 17:28:46 | 370,306 | 06/18/2010 13:05:27 | 94 | 7 | Problem with IE css | Problem with site layout in css.
http://browsershots.org/http://rssreaderbg.net/indexed.htm
Here's the page:
http://rssreaderbg.net/indexed.htm
The problem is in the buttons.
They are truncated and the logo is invisible.
The code:
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<style>
body{
padding:30px 0 0 0;
margin:0;
}
#up {
background:#1ea1de;
margin-top:-100px;
height:300px;
width:100%;
}
#logo {
background:url(logo3.png)no-repeat;
width:100%;
height:89px;
margin-top:-200px;
}
.clear{
clear:both; height:0px; font-size:0px; line-height:0px;
}
#nav{
margin-top:-89px;
margin-left:300px;
padding:0;
list-style-type:none;
}
#nav li{
float:left;
}
#nav a{
padding-left:5px;
display:block;
float:left;
height:104px;
color:#fdfefe;
font: 39px Tahoma;
text-decoration:none;
background: url(levo.gif) no-repeat;
margin-top:-72px;
}
#nav a strong{
padding:3px 9px 0 0;
height:80px;
float:left;
display:block;
cursor:pointer;
font: 39px Tahoma;
background: url(111111113.gif) no-repeat right top;
margin-left:14px;
margin-top:33px;
}
</style>
<div id="up"></div>
</head><body>
<div id="logo"></div>
<ul id="nav">
<li><a href="#"><strong>Nachalo</strong></a></li>
<li><a href="#"><strong>Funkcii</strong></a></li>
<li><a href="#"><strong>Vxod</strong></a></li>
</ul>
<div class="clear"></div>
</body></html> | css | internet-explorer | null | null | null | 12/30/2010 01:18:09 | not a real question | Problem with IE css
===
Problem with site layout in css.
http://browsershots.org/http://rssreaderbg.net/indexed.htm
Here's the page:
http://rssreaderbg.net/indexed.htm
The problem is in the buttons.
They are truncated and the logo is invisible.
The code:
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<style>
body{
padding:30px 0 0 0;
margin:0;
}
#up {
background:#1ea1de;
margin-top:-100px;
height:300px;
width:100%;
}
#logo {
background:url(logo3.png)no-repeat;
width:100%;
height:89px;
margin-top:-200px;
}
.clear{
clear:both; height:0px; font-size:0px; line-height:0px;
}
#nav{
margin-top:-89px;
margin-left:300px;
padding:0;
list-style-type:none;
}
#nav li{
float:left;
}
#nav a{
padding-left:5px;
display:block;
float:left;
height:104px;
color:#fdfefe;
font: 39px Tahoma;
text-decoration:none;
background: url(levo.gif) no-repeat;
margin-top:-72px;
}
#nav a strong{
padding:3px 9px 0 0;
height:80px;
float:left;
display:block;
cursor:pointer;
font: 39px Tahoma;
background: url(111111113.gif) no-repeat right top;
margin-left:14px;
margin-top:33px;
}
</style>
<div id="up"></div>
</head><body>
<div id="logo"></div>
<ul id="nav">
<li><a href="#"><strong>Nachalo</strong></a></li>
<li><a href="#"><strong>Funkcii</strong></a></li>
<li><a href="#"><strong>Vxod</strong></a></li>
</ul>
<div class="clear"></div>
</body></html> | 1 |
3,135,293 | 06/28/2010 18:57:12 | 189,618 | 10/14/2009 06:15:47 | 482 | 5 | what's in the (package) name org.example.hello ? | I'm familiar with C++ but never used Java. I've just started learning Android development. In most of the basic tutorials I've gone through mentioned packages names like org.example.hello. I know they are some sort of unique identifiers but
1. How should I choose these packages names? Are there any guidelines?
2. Is there anything special I need to keep in mind if I'm developing a commercial application?
3. How can I make separate re-usable libraries and pack them in different packages/applications?
thanks. | android | null | null | null | null | null | open | what's in the (package) name org.example.hello ?
===
I'm familiar with C++ but never used Java. I've just started learning Android development. In most of the basic tutorials I've gone through mentioned packages names like org.example.hello. I know they are some sort of unique identifiers but
1. How should I choose these packages names? Are there any guidelines?
2. Is there anything special I need to keep in mind if I'm developing a commercial application?
3. How can I make separate re-usable libraries and pack them in different packages/applications?
thanks. | 0 |
9,409,152 | 02/23/2012 08:02:18 | 744,850 | 05/09/2011 09:16:25 | 168 | 2 | Android Bitmap snap to grid | Does anyone know if there is a simple way to make images snap to grid when dragging a bitmap?
At the moment I can touch a bitmap and move it smoothly around the screen. I want to be able to make it snap to an invisible grid whilst you are dragging. | java | android | null | null | null | null | open | Android Bitmap snap to grid
===
Does anyone know if there is a simple way to make images snap to grid when dragging a bitmap?
At the moment I can touch a bitmap and move it smoothly around the screen. I want to be able to make it snap to an invisible grid whilst you are dragging. | 0 |
5,791,762 | 04/26/2011 14:22:54 | 725,512 | 04/26/2011 14:04:28 | 1 | 0 | what is the wrong wih my code ?? | #include <iostream>
using namespace std;
float sum(float a,float b);
float subs(float a, float b);
float multiple(float a, float b);
float division(float a, float b);
int main()
{//main
int a,b;
char o ;
cout<<"input your calculation with operation (+,-,/,*) such as 5+6 : /n ";
cin >> a >> o >> b ;
switch('o')
{
case '+':
sum(float a, float b);
break;
case '-':
subs(float a, float b);
break;
case '*':
multiple(float a, float b);
break;
case '/':
division(float a, float b);
break;
default :
cout << "error, try again " <<endl;
}
return 0;
}//main
float sum(float a,float b)
{//sum
float total= a+b;
return total;
}//sum
float subs(float a, float b)
{//subs
float total=a-b;
return total;
}//subs
float multiple(float a, float b)
{//multiple
float total=a*b;
return total;
}//multiple
float division(float a, float b)
{//division
float total=a/b; | c++ | null | null | null | null | 04/26/2011 14:31:26 | not a real question | what is the wrong wih my code ??
===
#include <iostream>
using namespace std;
float sum(float a,float b);
float subs(float a, float b);
float multiple(float a, float b);
float division(float a, float b);
int main()
{//main
int a,b;
char o ;
cout<<"input your calculation with operation (+,-,/,*) such as 5+6 : /n ";
cin >> a >> o >> b ;
switch('o')
{
case '+':
sum(float a, float b);
break;
case '-':
subs(float a, float b);
break;
case '*':
multiple(float a, float b);
break;
case '/':
division(float a, float b);
break;
default :
cout << "error, try again " <<endl;
}
return 0;
}//main
float sum(float a,float b)
{//sum
float total= a+b;
return total;
}//sum
float subs(float a, float b)
{//subs
float total=a-b;
return total;
}//subs
float multiple(float a, float b)
{//multiple
float total=a*b;
return total;
}//multiple
float division(float a, float b)
{//division
float total=a/b; | 1 |
10,693,230 | 05/21/2012 21:58:14 | 1,361,704 | 04/27/2012 17:34:43 | 1 | 0 | Network Unavailable - How to do it (as in Twitter) | I need my application does not cause an exception and ends when the smartphone does not have internet access, I would put a Network Unavailable message, as well as the official Twitter app for android is, someone can show me an example? Thank you. | android | networking | null | null | null | null | open | Network Unavailable - How to do it (as in Twitter)
===
I need my application does not cause an exception and ends when the smartphone does not have internet access, I would put a Network Unavailable message, as well as the official Twitter app for android is, someone can show me an example? Thank you. | 0 |
7,918,316 | 10/27/2011 15:27:24 | 427,913 | 08/22/2010 22:58:12 | 26 | 0 | please tell me the right way to start programming a 2d&3d games by java , start with "Developing Games in Java" book ? or with "jMonkeyEngine"? | iam php coder , and i have medium experince with java , and i want to enter making games world and i can make small&medium projects by it , but i didn't tried to make a game project before !! , so i need to know the basics to start , so i have 2 choice ,
the first is : "Developing Games in Java" book , and it's explain making games with game example , and i see that it's very good , but the book is since old time , since 2002 neraly !, so i feel tha most of informations of this book are old ??
and the seond choice is learning jMonkeyEngine toutrials , because i know that using frameworks are great method , and i know that i will need in the future to use JavaEngine for my games , but when i tried to read it's toutriales , i feeled that i have lost information which i need read about it first before reading this toutriales ?
so what is your opinions ? and what is your advice for me to take the right way for making games (2d & 3d)
Thanks , | java | game-engine | game-physics | jmonkeyengine | null | 10/27/2011 15:35:24 | not constructive | please tell me the right way to start programming a 2d&3d games by java , start with "Developing Games in Java" book ? or with "jMonkeyEngine"?
===
iam php coder , and i have medium experince with java , and i want to enter making games world and i can make small&medium projects by it , but i didn't tried to make a game project before !! , so i need to know the basics to start , so i have 2 choice ,
the first is : "Developing Games in Java" book , and it's explain making games with game example , and i see that it's very good , but the book is since old time , since 2002 neraly !, so i feel tha most of informations of this book are old ??
and the seond choice is learning jMonkeyEngine toutrials , because i know that using frameworks are great method , and i know that i will need in the future to use JavaEngine for my games , but when i tried to read it's toutriales , i feeled that i have lost information which i need read about it first before reading this toutriales ?
so what is your opinions ? and what is your advice for me to take the right way for making games (2d & 3d)
Thanks , | 4 |
4,086,348 | 11/03/2010 10:59:42 | 382,305 | 07/02/2010 18:06:55 | 260 | 18 | Does passing a control as parameter causes an enough performance hit? | What is better/preferred - Creating a method of 2 lines which accepts a web control as a parameter, operates on it and is called from 3-4 places within the same code file or writing those 2 lines at the 3-4 places and not creating the method?
P.S. The control I am referring here is a textbox. | c# | asp.net | optimization | coding-style | null | null | open | Does passing a control as parameter causes an enough performance hit?
===
What is better/preferred - Creating a method of 2 lines which accepts a web control as a parameter, operates on it and is called from 3-4 places within the same code file or writing those 2 lines at the 3-4 places and not creating the method?
P.S. The control I am referring here is a textbox. | 0 |
9,727,193 | 03/15/2012 19:55:39 | 1,230,572 | 02/24/2012 10:47:27 | 33 | 2 | how to legitimate an user of his profile? | i have a problem with $_GET to authenticfiate an owner of his site.
im using this code to check, if the users id is registrated or not:
<?php
session_start();
include('scripts/db_connect.php');
if(isset($_SESSION['id'])){
$url_auth = $_GET['id'];
}else{
echo "no user found";
exit();
}
$sql = "SELECT * FROM table WHERE id='".$url_auth."'";
$query = $db->query($sql);
if($query->num_rows !=1){
header("Location: index.php");
exit();
i having problems with reading out that $_GET id. it seems that something is going wrong and i dont know why. is there maybe another way to check for users registration when someone is calling any id in the browser? thanks. | php | get | authentification | null | null | null | open | how to legitimate an user of his profile?
===
i have a problem with $_GET to authenticfiate an owner of his site.
im using this code to check, if the users id is registrated or not:
<?php
session_start();
include('scripts/db_connect.php');
if(isset($_SESSION['id'])){
$url_auth = $_GET['id'];
}else{
echo "no user found";
exit();
}
$sql = "SELECT * FROM table WHERE id='".$url_auth."'";
$query = $db->query($sql);
if($query->num_rows !=1){
header("Location: index.php");
exit();
i having problems with reading out that $_GET id. it seems that something is going wrong and i dont know why. is there maybe another way to check for users registration when someone is calling any id in the browser? thanks. | 0 |
1,139,127 | 07/16/2009 17:37:28 | 90,577 | 04/14/2009 08:13:54 | 549 | 32 | Debian apt-get update error public key is not available: NO_PUBKEY <id> | Trying to update some repositories on Debian Etch installation and getting the following errors from running "apt-get update"
W: GPG error: http://www.debian-multimedia.org etch Release: The following signatures couldn't be verified because teh public key is not available: NO_PUBKEY 07DC563D1F41B907
W: You may want to run apt-get update to correct these problems
The irony of it instructing me to run apt-get update is a nice kicker... | debian | upgrade | null | null | null | 02/24/2011 15:47:23 | off topic | Debian apt-get update error public key is not available: NO_PUBKEY <id>
===
Trying to update some repositories on Debian Etch installation and getting the following errors from running "apt-get update"
W: GPG error: http://www.debian-multimedia.org etch Release: The following signatures couldn't be verified because teh public key is not available: NO_PUBKEY 07DC563D1F41B907
W: You may want to run apt-get update to correct these problems
The irony of it instructing me to run apt-get update is a nice kicker... | 2 |
7,223,855 | 08/28/2011 20:49:20 | 739,907 | 05/05/2011 12:22:23 | 1 | 0 | NTLM with long usernames | I've got ntlm working with apache.
But when I use usernames longer than 16 chars, the usernames doens't get accepted.
Is there a way to change this?
Thanks | username | ntlmv2 | null | null | null | 08/29/2011 15:00:40 | off topic | NTLM with long usernames
===
I've got ntlm working with apache.
But when I use usernames longer than 16 chars, the usernames doens't get accepted.
Is there a way to change this?
Thanks | 2 |
6,737,812 | 07/18/2011 18:50:44 | 823,893 | 06/30/2011 21:45:26 | 1 | 0 | how to do a C# switch, change to lower case and update on the fly | How can I do the following C# in MS sql? Also I need to be able to update vars, Total_before_ReCompute,
newTotal, WtdAvgTotal, MrkTotal .....
#region determine if Dimension has length & width
bool lengthWidthDimension = false;
string[] xy = new string[1];
Dimension = Dimension.ToUpper();
if (Dimension.Contains('X'))
{
xy = Dimension.Split('X');
lengthWidthDimension = true;
}
#endregion
// switch (dataGridView1.Rows[i].Cells[iUnit].Value.ToString().ToLower())
#region totaling
Cost = Convert.ToDecimal(dataGridView1.Rows[i].Cells[iCost_Prior_ReCompute].Value.ToString());
switch (Unit.ToLower())
{
case "each":
{
#region each
try
{
Total_before_ReCompute = Math.Round(Convert.ToDecimal(dataGridView1.Rows[i].Cells[iTotal_before_ReCompute].Value = String.Format("{0:0.00}", Count * Cost * countNegitive).ToString()), 2, System.MidpointRounding.AwayFromZero);
}
catch
{
Total_before_ReCompute = Math.Round(Convert.ToDecimal(dataGridView1.Rows[i].Cells[iTotal_before_ReCompute].Value = String.Format("{0:0.00}", "0")));
}
break;
newTotal = Math.Round(Convert.ToDecimal(dataGridView1.Rows[i].Cells[iNewTotal].Value = String.Format("{0:0.00}", Count * newCost * countNegitive).ToString()), 2, System.MidpointRounding.AwayFromZero);
if ((K == "K") || (D != ""))
reCalculate_K_FACTORS(i);
WtdAvgTotal = Math.Round(Convert.ToDecimal(dataGridView1.Rows[i].Cells[iWtdAvgTotal].Value = String.Format("{0:0.00}", Count * Wgtd_Avg * countNegitive).ToString()), 2, System.MidpointRounding.AwayFromZero);
MrkTotal = Math.Round(Convert.ToDecimal(dataGridView1.Rows[i].Cells[iMrkTotal].Value = String.Format("{0:0.00}", Count * Market * countNegitive).ToString()), 2, System.MidpointRounding.AwayFromZero);
if (K == "" && D == "")
{
WtdAvgTotal = Math.Round(Convert.ToDecimal(dataGridView1.Rows[i].Cells[iWtdAvgTotal].Value = String.Format("{0:0.00}", Count * Wgtd_Avg * countNegitive).ToString()), 2, System.MidpointRounding.AwayFromZero);
MrkTotal = Math.Round(Convert.ToDecimal(dataGridView1.Rows[i].Cells[iMrkTotal].Value = String.Format("{0:0.00}", Count * Market * countNegitive).ToString()), 2, System.MidpointRounding.AwayFromZero);
}
else
if (C == "" && K == "")
{
WtdAvgTotal = Math.Round(Convert.ToDecimal(dataGridView1.Rows[i].Cells[iWtdAvgTotal].Value = String.Format("{0:0.00}", Count * Wgtd_Avg * countNegitive).ToString()), 2, System.MidpointRounding.AwayFromZero);
MrkTotal = Math.Round(Convert.ToDecimal(dataGridView1.Rows[i].Cells[iMrkTotal].Value = String.Format("{0:0.00}", Count * Market * countNegitive).ToString()), 2, System.MidpointRounding.AwayFromZero);
}
else
if (K == "K")
{
WtdAvgTotal = Math.Round(Convert.ToDecimal(dataGridView1.Rows[i].Cells[iWtdAvgTotal].Value = String.Format("{0:0.00}", Count * Wgtd_Avg * countNegitive).ToString()), 2, System.MidpointRounding.AwayFromZero);
MrkTotal = Math.Round(Convert.ToDecimal(dataGridView1.Rows[i].Cells[iMrkTotal].Value = String.Format("{0:0.00}", Count * Market * countNegitive).ToString()), 2, System.MidpointRounding.AwayFromZero);
}
#endregion
}
case "foot":
{
#region foot
try
{
Footage = 0;
if (!String.IsNullOrEmpty(dataGridView1.Rows[i].Cells[iFootage].Value.ToString()))
Footage = Convert.ToDecimal(dataGridView1.Rows[i].Cells[iFootage].Value.ToString());
//Footage = Math.Round(((Footage / orgCount) * Count), 2, System.MidpointRounding.AwayFromZero);
//dataGridView1.Rows[i].Cells[iFootage].Value = String.Format("{0:0.00}", Footage.ToString());
Total_before_ReCompute = Convert.ToDecimal(dataGridView1.Rows[i].Cells[iTotal_before_ReCompute].Value = String.Format("{0:0.00}", Footage * Cost * countNegitive).ToString());
}
catch
{
Total_before_ReCompute = Math.Round(Convert.ToDecimal(dataGridView1.Rows[i].Cells[iTotal_before_ReCompute].Value = String.Format("{0:0.00}", "0")));
}
break;
#endregion
}
case "cft":
.
.
.
case "cwt":
case "cwts":
.
.
.
case "sqft":
.
.
I have started with the following, but not sure how to start:
Select
CASE --Unit
when WtdAvgTotal = 0 then [Count] * newCost * countNegitive
end WtdAvgTotal, C, D, K, [Count], newCost, countNegitive, Unit
FROM VF_CasINV_Cost
where (CalendarYear = 2010) AND (Item# = Item#) AND (ID = ID) and (Item# < 99999990) and
K = '' and D = '' and D <> 'D'
| sql | ms | null | null | null | 07/18/2011 19:43:43 | not a real question | how to do a C# switch, change to lower case and update on the fly
===
How can I do the following C# in MS sql? Also I need to be able to update vars, Total_before_ReCompute,
newTotal, WtdAvgTotal, MrkTotal .....
#region determine if Dimension has length & width
bool lengthWidthDimension = false;
string[] xy = new string[1];
Dimension = Dimension.ToUpper();
if (Dimension.Contains('X'))
{
xy = Dimension.Split('X');
lengthWidthDimension = true;
}
#endregion
// switch (dataGridView1.Rows[i].Cells[iUnit].Value.ToString().ToLower())
#region totaling
Cost = Convert.ToDecimal(dataGridView1.Rows[i].Cells[iCost_Prior_ReCompute].Value.ToString());
switch (Unit.ToLower())
{
case "each":
{
#region each
try
{
Total_before_ReCompute = Math.Round(Convert.ToDecimal(dataGridView1.Rows[i].Cells[iTotal_before_ReCompute].Value = String.Format("{0:0.00}", Count * Cost * countNegitive).ToString()), 2, System.MidpointRounding.AwayFromZero);
}
catch
{
Total_before_ReCompute = Math.Round(Convert.ToDecimal(dataGridView1.Rows[i].Cells[iTotal_before_ReCompute].Value = String.Format("{0:0.00}", "0")));
}
break;
newTotal = Math.Round(Convert.ToDecimal(dataGridView1.Rows[i].Cells[iNewTotal].Value = String.Format("{0:0.00}", Count * newCost * countNegitive).ToString()), 2, System.MidpointRounding.AwayFromZero);
if ((K == "K") || (D != ""))
reCalculate_K_FACTORS(i);
WtdAvgTotal = Math.Round(Convert.ToDecimal(dataGridView1.Rows[i].Cells[iWtdAvgTotal].Value = String.Format("{0:0.00}", Count * Wgtd_Avg * countNegitive).ToString()), 2, System.MidpointRounding.AwayFromZero);
MrkTotal = Math.Round(Convert.ToDecimal(dataGridView1.Rows[i].Cells[iMrkTotal].Value = String.Format("{0:0.00}", Count * Market * countNegitive).ToString()), 2, System.MidpointRounding.AwayFromZero);
if (K == "" && D == "")
{
WtdAvgTotal = Math.Round(Convert.ToDecimal(dataGridView1.Rows[i].Cells[iWtdAvgTotal].Value = String.Format("{0:0.00}", Count * Wgtd_Avg * countNegitive).ToString()), 2, System.MidpointRounding.AwayFromZero);
MrkTotal = Math.Round(Convert.ToDecimal(dataGridView1.Rows[i].Cells[iMrkTotal].Value = String.Format("{0:0.00}", Count * Market * countNegitive).ToString()), 2, System.MidpointRounding.AwayFromZero);
}
else
if (C == "" && K == "")
{
WtdAvgTotal = Math.Round(Convert.ToDecimal(dataGridView1.Rows[i].Cells[iWtdAvgTotal].Value = String.Format("{0:0.00}", Count * Wgtd_Avg * countNegitive).ToString()), 2, System.MidpointRounding.AwayFromZero);
MrkTotal = Math.Round(Convert.ToDecimal(dataGridView1.Rows[i].Cells[iMrkTotal].Value = String.Format("{0:0.00}", Count * Market * countNegitive).ToString()), 2, System.MidpointRounding.AwayFromZero);
}
else
if (K == "K")
{
WtdAvgTotal = Math.Round(Convert.ToDecimal(dataGridView1.Rows[i].Cells[iWtdAvgTotal].Value = String.Format("{0:0.00}", Count * Wgtd_Avg * countNegitive).ToString()), 2, System.MidpointRounding.AwayFromZero);
MrkTotal = Math.Round(Convert.ToDecimal(dataGridView1.Rows[i].Cells[iMrkTotal].Value = String.Format("{0:0.00}", Count * Market * countNegitive).ToString()), 2, System.MidpointRounding.AwayFromZero);
}
#endregion
}
case "foot":
{
#region foot
try
{
Footage = 0;
if (!String.IsNullOrEmpty(dataGridView1.Rows[i].Cells[iFootage].Value.ToString()))
Footage = Convert.ToDecimal(dataGridView1.Rows[i].Cells[iFootage].Value.ToString());
//Footage = Math.Round(((Footage / orgCount) * Count), 2, System.MidpointRounding.AwayFromZero);
//dataGridView1.Rows[i].Cells[iFootage].Value = String.Format("{0:0.00}", Footage.ToString());
Total_before_ReCompute = Convert.ToDecimal(dataGridView1.Rows[i].Cells[iTotal_before_ReCompute].Value = String.Format("{0:0.00}", Footage * Cost * countNegitive).ToString());
}
catch
{
Total_before_ReCompute = Math.Round(Convert.ToDecimal(dataGridView1.Rows[i].Cells[iTotal_before_ReCompute].Value = String.Format("{0:0.00}", "0")));
}
break;
#endregion
}
case "cft":
.
.
.
case "cwt":
case "cwts":
.
.
.
case "sqft":
.
.
I have started with the following, but not sure how to start:
Select
CASE --Unit
when WtdAvgTotal = 0 then [Count] * newCost * countNegitive
end WtdAvgTotal, C, D, K, [Count], newCost, countNegitive, Unit
FROM VF_CasINV_Cost
where (CalendarYear = 2010) AND (Item# = Item#) AND (ID = ID) and (Item# < 99999990) and
K = '' and D = '' and D <> 'D'
| 1 |
7,514,026 | 09/22/2011 11:30:08 | 925,747 | 09/02/2011 17:29:43 | 18 | 0 | Help needed with program structure/design | Firstly, this is a fairly large forum post as I've tried to describe the application I'm building in a much detail as needed, so I apologise in advance for the essay!
I'm in the process of designing and building a fairly large music application, using the C++ Juce framework, that in a nutshell takes in OSC messages and turns them into audio and MIDI data. The application has three 'modes', each defining what kind of sound will be produced by the OSC messages. The user can apply a mode and a further bunch of mode settings to define the sound that each OSC message 'triggers'.
Below is a basic block diagram overview of the programs' class relationship and hierarchy, or at least how I theoretically imagine it to be. To clarify the Juce terminology, a 'Component' class is basically a GUI object/class that displays things on screen and allows user interaction.

I'm an experienced C programmer, however I'm fairly new to C++ and OOP design. I'm understanding most if it fine but the major problem I'm having is in terms of structuring all the classes to have the correct relationships and hierarchy so that they can all communicate properly in order for the application to do what it needs to do.
Here is a brief description of what each class does:
<br>• OscInput - this base class uses the oscpack library to listen for OSC messages. Only 1 class can inherit from this base class as the application will crash if there are multiple listeners on the same UDP port.
<br>• Main - application start-up. Inherits from OscInput so that every time an OSC message is received a callback function is called within this class
<br>• MainWindow - the apps main document window - default to Juce apps.
<br>• MainComponent - the main/background component/GUI of the app - default to Juce apps.
<br>• Mode1Component/Mode2Component/Mode3Component - a single instance of each of these component classes is called and displayed from MainComponent which are used by the user to change the settings of what each OSC message does.
<br>• SubComponent1 - a single instance of this component class is called and displayed from MainComponent.
<br>• SubComponent2 - 48 instances of this component class are called and displayed from SubComponent1. Each instance is used to display the value of a different OSC message being received.
<br>• Mode1/Mode2/Mode3 - a single instance of each of these classes is called from Main. Each class is used to actually convert the OSC messages into audio or MIDI data, based on values/variables within the Settings class.
<br>• Settings - a single instance of this class that is used to store settings that control what sound is produced from each different OSC message.
I'm fairly happy I have all the component/GUI classes laid out and connected in the right way. I have also got incoming OSC messages working fine. But it is the relationship of the Settings class instance that I'm not quite sure how to implement. Here are the relationships I need help with:
<br>• The single instances of Mode1, Mode2, and Mode3 all need to retrieve values from the Setting class instance
<br>• The single instances of MainComponent, Mode1Component, Mode2Component, Mode3Component all need to send values to the Settings class instance, as well as retrieve values from the instance.
<br>• All 48 instances of SubComponent2 need to retrieve OSC messages
<b>Therefore I have the following quieries:</b>
<br>• Where should the Settings class instance be called from so that all the relevant class instances mentioned above can communicate with it? I only want a single instance of this class that needs to be accessed by many other classes, so should it be a global, Singleton, or static class? I've been studying the Singleton design pattern which seems to be what I'm looking for, but I get the impression I should avoid it if I can and consider alternative methods.
<br>• Should it be the Main class that listens for OSC messages? How can I get SubComponent2 to receive OSC messages as well as the Mode1, Mode2, and Mode3 class instances?
<br>• Should the functionality classes (Mode1, Mode2, and Mode3) be called from Main? I'm trying to keep all functionality and GUI code separate as I have someone else dealing with GUI programming while I'm dealing with the functionality programming of the application.
<br>• Can anyone spot any major flaws in the design pattern of my program?
Any help would be greatly appreciated!
Thanks | c++ | design | design-patterns | structure | osc | 09/22/2011 12:07:51 | not a real question | Help needed with program structure/design
===
Firstly, this is a fairly large forum post as I've tried to describe the application I'm building in a much detail as needed, so I apologise in advance for the essay!
I'm in the process of designing and building a fairly large music application, using the C++ Juce framework, that in a nutshell takes in OSC messages and turns them into audio and MIDI data. The application has three 'modes', each defining what kind of sound will be produced by the OSC messages. The user can apply a mode and a further bunch of mode settings to define the sound that each OSC message 'triggers'.
Below is a basic block diagram overview of the programs' class relationship and hierarchy, or at least how I theoretically imagine it to be. To clarify the Juce terminology, a 'Component' class is basically a GUI object/class that displays things on screen and allows user interaction.

I'm an experienced C programmer, however I'm fairly new to C++ and OOP design. I'm understanding most if it fine but the major problem I'm having is in terms of structuring all the classes to have the correct relationships and hierarchy so that they can all communicate properly in order for the application to do what it needs to do.
Here is a brief description of what each class does:
<br>• OscInput - this base class uses the oscpack library to listen for OSC messages. Only 1 class can inherit from this base class as the application will crash if there are multiple listeners on the same UDP port.
<br>• Main - application start-up. Inherits from OscInput so that every time an OSC message is received a callback function is called within this class
<br>• MainWindow - the apps main document window - default to Juce apps.
<br>• MainComponent - the main/background component/GUI of the app - default to Juce apps.
<br>• Mode1Component/Mode2Component/Mode3Component - a single instance of each of these component classes is called and displayed from MainComponent which are used by the user to change the settings of what each OSC message does.
<br>• SubComponent1 - a single instance of this component class is called and displayed from MainComponent.
<br>• SubComponent2 - 48 instances of this component class are called and displayed from SubComponent1. Each instance is used to display the value of a different OSC message being received.
<br>• Mode1/Mode2/Mode3 - a single instance of each of these classes is called from Main. Each class is used to actually convert the OSC messages into audio or MIDI data, based on values/variables within the Settings class.
<br>• Settings - a single instance of this class that is used to store settings that control what sound is produced from each different OSC message.
I'm fairly happy I have all the component/GUI classes laid out and connected in the right way. I have also got incoming OSC messages working fine. But it is the relationship of the Settings class instance that I'm not quite sure how to implement. Here are the relationships I need help with:
<br>• The single instances of Mode1, Mode2, and Mode3 all need to retrieve values from the Setting class instance
<br>• The single instances of MainComponent, Mode1Component, Mode2Component, Mode3Component all need to send values to the Settings class instance, as well as retrieve values from the instance.
<br>• All 48 instances of SubComponent2 need to retrieve OSC messages
<b>Therefore I have the following quieries:</b>
<br>• Where should the Settings class instance be called from so that all the relevant class instances mentioned above can communicate with it? I only want a single instance of this class that needs to be accessed by many other classes, so should it be a global, Singleton, or static class? I've been studying the Singleton design pattern which seems to be what I'm looking for, but I get the impression I should avoid it if I can and consider alternative methods.
<br>• Should it be the Main class that listens for OSC messages? How can I get SubComponent2 to receive OSC messages as well as the Mode1, Mode2, and Mode3 class instances?
<br>• Should the functionality classes (Mode1, Mode2, and Mode3) be called from Main? I'm trying to keep all functionality and GUI code separate as I have someone else dealing with GUI programming while I'm dealing with the functionality programming of the application.
<br>• Can anyone spot any major flaws in the design pattern of my program?
Any help would be greatly appreciated!
Thanks | 1 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.