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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
11,216,906 | 06/26/2012 22:36:31 | 929,458 | 09/05/2011 19:25:28 | 32 | 0 | scipy: basic clarifications | I am not undetstanding the difference between coo_matrix, csr_matrix and csc_matrix.
The documentation does mention that coo_matrix is not efficient for arithmetic operations and we need to convert it to csr or csc. I am looking more into matrix multiplication. And I did not understand what is happening behind the scenes if I just have a coo_matrix and convert it to csr or csv matrix.
Also if I have something like
A = array([[1,2,3,0,0,5],
[5,0,0,1,2,0]])
print coo_matrix(A)
It prints
(0, 0) 1
(0, 1) 2
(0, 2) 3
(0, 5) 5
which is cool. but is there a way, i can directly input my matrix as the one which is printed. Something like define a null COO matrix and then start defining the values of the coo_matrix like how we do in matlab.
Thanks! | python | scipy | null | null | null | null | open | scipy: basic clarifications
===
I am not undetstanding the difference between coo_matrix, csr_matrix and csc_matrix.
The documentation does mention that coo_matrix is not efficient for arithmetic operations and we need to convert it to csr or csc. I am looking more into matrix multiplication. And I did not understand what is happening behind the scenes if I just have a coo_matrix and convert it to csr or csv matrix.
Also if I have something like
A = array([[1,2,3,0,0,5],
[5,0,0,1,2,0]])
print coo_matrix(A)
It prints
(0, 0) 1
(0, 1) 2
(0, 2) 3
(0, 5) 5
which is cool. but is there a way, i can directly input my matrix as the one which is printed. Something like define a null COO matrix and then start defining the values of the coo_matrix like how we do in matlab.
Thanks! | 0 |
8,285,171 | 11/27/2011 11:20:07 | 1,059,860 | 11/22/2011 13:20:24 | 1 | 1 | Doubts in try catch block in C# | the question was : the application should ask the user for the total number of tickets to be booked. while the booking the tickets if teh total number of booked tickets exceeds the available tickets, the application should raise an exception
I don't know why it is not showing an error when I do this
I came up with this solution.
using System;
namespace Ticket
{
class blah
{
public void abc()
{
int numberOfTickets;
int numberOfAvailableTickets=10;
int cost = 100;
int pay;
Console.WriteLine("how many tickets do you need");
numberOfTickets = Convert.ToInt32(Console.ReadLine());
try
{
if (numberOfTickets < numberOfAvailableTickets)
{
pay = 100 * numberOfTickets;
Console.WriteLine("Pay please");
Console.WriteLine(pay);
}
}
if( numberOfTickets>numberOfAvailableTickets)
{
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
}
}
}
class Theater
{
static void Main(string[] args)
{
blah hi = new blah();
hi.abc();
Console.ReadLine();
}
}
}
| c# | try-catch | null | null | null | null | open | Doubts in try catch block in C#
===
the question was : the application should ask the user for the total number of tickets to be booked. while the booking the tickets if teh total number of booked tickets exceeds the available tickets, the application should raise an exception
I don't know why it is not showing an error when I do this
I came up with this solution.
using System;
namespace Ticket
{
class blah
{
public void abc()
{
int numberOfTickets;
int numberOfAvailableTickets=10;
int cost = 100;
int pay;
Console.WriteLine("how many tickets do you need");
numberOfTickets = Convert.ToInt32(Console.ReadLine());
try
{
if (numberOfTickets < numberOfAvailableTickets)
{
pay = 100 * numberOfTickets;
Console.WriteLine("Pay please");
Console.WriteLine(pay);
}
}
if( numberOfTickets>numberOfAvailableTickets)
{
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
}
}
}
class Theater
{
static void Main(string[] args)
{
blah hi = new blah();
hi.abc();
Console.ReadLine();
}
}
}
| 0 |
493,312 | 01/29/2009 20:40:21 | 466,531 | 01/29/2009 16:28:34 | 26 | 2 | How is SharePoint perceived in your Organisation? | We have an issue within our working environment where the perception of SharePoint is either:
a) The golden bullet, the answer to all our problems.
b) An application which either does or does not solve a specific problem.
Now in my opinion SharePoint (or more specifically in our case Microsoft Office SharePoint Server 2007) is a framework on top of various lower level Micorosoft technologies (IIS, ASP.Net, WSS 3.0, .Net Framework, Windows Workflow Foundation amongst others) and as such can be developed to do most anything (given time and resources).
The attitudes that have been formed in my organisation (and others I'm sure) is a combination of the Microsoft Marketing Machine and an organisatons desire to get the 'golden bullet' in front of as many people as possible wihtout saying 'What for?' or 'Why?' or in some cases even 'How?'
Is this an attitude and perception shared by other SharePoint devs? | sharepoint | development | web-applications | moss | null | 03/23/2012 17:02:37 | not constructive | How is SharePoint perceived in your Organisation?
===
We have an issue within our working environment where the perception of SharePoint is either:
a) The golden bullet, the answer to all our problems.
b) An application which either does or does not solve a specific problem.
Now in my opinion SharePoint (or more specifically in our case Microsoft Office SharePoint Server 2007) is a framework on top of various lower level Micorosoft technologies (IIS, ASP.Net, WSS 3.0, .Net Framework, Windows Workflow Foundation amongst others) and as such can be developed to do most anything (given time and resources).
The attitudes that have been formed in my organisation (and others I'm sure) is a combination of the Microsoft Marketing Machine and an organisatons desire to get the 'golden bullet' in front of as many people as possible wihtout saying 'What for?' or 'Why?' or in some cases even 'How?'
Is this an attitude and perception shared by other SharePoint devs? | 4 |
8,788,771 | 01/09/2012 12:57:55 | 1,138,685 | 01/09/2012 12:45:44 | 1 | 0 | Android Dev - Using Built-In Classes in own class | Im new in Android dev.
Here is my problem:
I have created my own class and can access the methods of this class in all Activities by created a new Instance of my class.
But as soon as I want to use "Built-In"-Android Classes in my own class the app crashes.
For example when i try display Toast it crashes. When I try "getExternalStorageDirectory()" it crashes (in manifest-file permission is set). When I try to access String-Resources it crashes and so on.
At the moment my class extends Application (also tried extending Actitiy).
What do I have to do in order to use Build-In Android Classes in my own class?
Thanks in advance for Your help.
Regards
Enulien
| android | null | null | null | null | 01/10/2012 14:56:12 | not a real question | Android Dev - Using Built-In Classes in own class
===
Im new in Android dev.
Here is my problem:
I have created my own class and can access the methods of this class in all Activities by created a new Instance of my class.
But as soon as I want to use "Built-In"-Android Classes in my own class the app crashes.
For example when i try display Toast it crashes. When I try "getExternalStorageDirectory()" it crashes (in manifest-file permission is set). When I try to access String-Resources it crashes and so on.
At the moment my class extends Application (also tried extending Actitiy).
What do I have to do in order to use Build-In Android Classes in my own class?
Thanks in advance for Your help.
Regards
Enulien
| 1 |
2,089,882 | 01/18/2010 23:08:18 | 223,852 | 12/03/2009 13:40:07 | 221 | 13 | Create branch from current working tree and reset to HEAD | I currently work on a feature that turns out to be bigger than expected, so it's propably the best to create a branch to work on it. So I need to create a new branch from my current working directory and reset the master branch to the current HEAD so that some fixes to the production environment can be done.
Somehow this sounds like an easy task, yet I can't quite figure it out. Possibly due to my lack of sleep. | git | branch | null | null | null | null | open | Create branch from current working tree and reset to HEAD
===
I currently work on a feature that turns out to be bigger than expected, so it's propably the best to create a branch to work on it. So I need to create a new branch from my current working directory and reset the master branch to the current HEAD so that some fixes to the production environment can be done.
Somehow this sounds like an easy task, yet I can't quite figure it out. Possibly due to my lack of sleep. | 0 |
4,604,253 | 01/05/2011 13:00:05 | 252,579 | 01/17/2010 11:58:23 | 521 | 11 | How long does a ClientLogin for Google Data API stay valid/usable? | On this [google documentation page][1] I found out that you can reuse previously retrieved tokens. Now, I'm currently having trouble (unpredictable results) with retrieving a key in the first place, so whenever I have one, I would like to be able to reuse it. For how long can this be reused?
[1]: http://code.google.com/intl/nl/apis/gdata/docs/auth/clientlogin.html#RecallAuthToken | web-services | api | authentication | google | null | null | open | How long does a ClientLogin for Google Data API stay valid/usable?
===
On this [google documentation page][1] I found out that you can reuse previously retrieved tokens. Now, I'm currently having trouble (unpredictable results) with retrieving a key in the first place, so whenever I have one, I would like to be able to reuse it. For how long can this be reused?
[1]: http://code.google.com/intl/nl/apis/gdata/docs/auth/clientlogin.html#RecallAuthToken | 0 |
10,138,066 | 04/13/2012 09:05:30 | 1,329,239 | 04/12/2012 13:33:50 | 6 | 0 | SSH Public Key Based Authentication filename issues | What i wanted to do was to set up an SSH Public Key Based Authentication. This i was able to do. However there is a problem that is bugging me
Enter file in which to save the key (/export/home/oracle/.ssh/id_dsa):
Here when i enter blank and use the default filename the key is set up and everything works.
However when i use my own name, like say idvxmlivr_dsa, i get stuck here.
oracle@sunv440$scp ~/.ssh/idvxmlivr_dsa.pub root@172.19.66.137:
key_read: uudecode 34:06:d3:21:c9:4d:b1:a7:e6:32:45:53:6c:21:91:50
failed
root@172.19.66.137's password:
/export/home/oracle/.ssh/idvxmlivr_dsa.pub: No such file or directory
the entire procedure works only for the default name(id_dsa). why is it so? And also is there any way to send passwords via ssh. i don't have sshpass installed and dont have access to superuser, so i can't install it. **Security is not an issue**.
| unix | ssh | ssh-keys | public-key | null | null | open | SSH Public Key Based Authentication filename issues
===
What i wanted to do was to set up an SSH Public Key Based Authentication. This i was able to do. However there is a problem that is bugging me
Enter file in which to save the key (/export/home/oracle/.ssh/id_dsa):
Here when i enter blank and use the default filename the key is set up and everything works.
However when i use my own name, like say idvxmlivr_dsa, i get stuck here.
oracle@sunv440$scp ~/.ssh/idvxmlivr_dsa.pub root@172.19.66.137:
key_read: uudecode 34:06:d3:21:c9:4d:b1:a7:e6:32:45:53:6c:21:91:50
failed
root@172.19.66.137's password:
/export/home/oracle/.ssh/idvxmlivr_dsa.pub: No such file or directory
the entire procedure works only for the default name(id_dsa). why is it so? And also is there any way to send passwords via ssh. i don't have sshpass installed and dont have access to superuser, so i can't install it. **Security is not an issue**.
| 0 |
9,572,231 | 03/05/2012 18:53:54 | 1,250,547 | 03/05/2012 18:47:27 | 1 | 0 | Google API For Website Classification Project | im doing a project in which will use google api
can anyone post a link for an Api or an Api as i can use that api in my project | php | null | null | null | null | 03/05/2012 19:00:08 | not a real question | Google API For Website Classification Project
===
im doing a project in which will use google api
can anyone post a link for an Api or an Api as i can use that api in my project | 1 |
8,152,316 | 11/16/2011 13:19:23 | 1,049,722 | 11/16/2011 13:06:33 | 1 | 0 | NoSuchMethodError in mobicents SccpAddress on Glassfish | org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.NoSuchMethodError: org.mobicents.protocols.ss7.sccp.parameter.SccpAddress.<init>(Lorg/mobicents/protocols/ss7/indicator/RoutingIndicator;ILorg/mobicents/protocols/ss7/sccp/parameter/GlobalTitle;I)V
The odd thing is that I run on the same set of Mobicents Protocol JAR libraries on the development machine, but I receive this on the server.
The line causing the problems is:
SccpAddress localAddress = new SccpAddress(RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, Controller.LOCAL_SPC, localGT, Controller.SSN_CAP);
And is very similar to the one used in their test cases. (I received the same error when I tried that line verbatim as well).
I received the same error when I tried using the decode method in SccpAddressCodec, with a valid byte array.
| java | glassfish-3 | nosuchmethoderror | null | null | null | open | NoSuchMethodError in mobicents SccpAddress on Glassfish
===
org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.NoSuchMethodError: org.mobicents.protocols.ss7.sccp.parameter.SccpAddress.<init>(Lorg/mobicents/protocols/ss7/indicator/RoutingIndicator;ILorg/mobicents/protocols/ss7/sccp/parameter/GlobalTitle;I)V
The odd thing is that I run on the same set of Mobicents Protocol JAR libraries on the development machine, but I receive this on the server.
The line causing the problems is:
SccpAddress localAddress = new SccpAddress(RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, Controller.LOCAL_SPC, localGT, Controller.SSN_CAP);
And is very similar to the one used in their test cases. (I received the same error when I tried that line verbatim as well).
I received the same error when I tried using the decode method in SccpAddressCodec, with a valid byte array.
| 0 |
10,917,756 | 06/06/2012 15:54:50 | 1,431,010 | 06/01/2012 15:18:44 | 1 | 1 | The string in Pascal error | This is my program:
program str_err;
var st:string;
begin
st:='ERROR';
delete(st,2,1);
writeln(st);
write(st[5]);
readln;
end.
I run it and it shows that st='EROR' and st[5]='R' ???
I 've already delete one character from the string and st[5] must be '', while it is still R | string | pascal | null | null | null | null | open | The string in Pascal error
===
This is my program:
program str_err;
var st:string;
begin
st:='ERROR';
delete(st,2,1);
writeln(st);
write(st[5]);
readln;
end.
I run it and it shows that st='EROR' and st[5]='R' ???
I 've already delete one character from the string and st[5] must be '', while it is still R | 0 |
9,512,144 | 03/01/2012 07:20:21 | 1,155,650 | 01/18/2012 07:30:56 | 412 | 67 | How To Draw a circle using using CxImage in VC++ | I have loaded and displayed an image using CxImage functionality. now i need to draw some default shapes like circles and rectangles and lines. There is no defined function in CxImage for these only Line function is available. With that have i drawn rectangle. But no idea on how to draw circle.
if not possible using CxImage then what are the other ways and how this can be made with CxImage complaint(ie: I dont want to rewrite my functions for Save, New, Load Etc). | image | visual-c++ | null | null | null | null | open | How To Draw a circle using using CxImage in VC++
===
I have loaded and displayed an image using CxImage functionality. now i need to draw some default shapes like circles and rectangles and lines. There is no defined function in CxImage for these only Line function is available. With that have i drawn rectangle. But no idea on how to draw circle.
if not possible using CxImage then what are the other ways and how this can be made with CxImage complaint(ie: I dont want to rewrite my functions for Save, New, Load Etc). | 0 |
9,251,266 | 02/12/2012 18:10:43 | 1,204,906 | 02/12/2012 09:22:29 | 3 | 0 | xcode 4.2.1 - storyboard - Moving from different view using modal and having Tab bar visible | In xcode storyboard, I have created a Tab Bar Controller that goes to 4 different tabs. One of the tabs is the main menu that has the same links available at the Tab bar. When I use the tab bar to move to the tabs, I do have the tab bar visible. But when I use the main menu links it goes fine to the different views but I lose the tab bar. How can I go from view to other view without losing the tab bar.
I have no header files in my project everything is done through storyboard. | xcode | storyboard | xcode4.2.1 | null | null | null | open | xcode 4.2.1 - storyboard - Moving from different view using modal and having Tab bar visible
===
In xcode storyboard, I have created a Tab Bar Controller that goes to 4 different tabs. One of the tabs is the main menu that has the same links available at the Tab bar. When I use the tab bar to move to the tabs, I do have the tab bar visible. But when I use the main menu links it goes fine to the different views but I lose the tab bar. How can I go from view to other view without losing the tab bar.
I have no header files in my project everything is done through storyboard. | 0 |
7,882,999 | 10/24/2011 23:09:04 | 759,861 | 05/18/2011 19:46:33 | 22 | 0 | Custom info window for route plotted through DirectionService | Using the Google Maps API v3, is it possible to customize the layout and content of the infoWindows that are attached to each route marker that's plotted through the DirectionService? | google-maps-api-3 | infowindow | null | null | null | null | open | Custom info window for route plotted through DirectionService
===
Using the Google Maps API v3, is it possible to customize the layout and content of the infoWindows that are attached to each route marker that's plotted through the DirectionService? | 0 |
5,012,940 | 02/16/2011 05:47:54 | 619,074 | 02/16/2011 05:34:15 | 1 | 0 | Sql String Function | Need help to do a simple task in sql string
in my table there is a field comment(user comments).
in my procedure i am passing a paremeter @input ,i want to check whether the string contains the string @input and if it contains add some style to the substring(that same as @input).
eg: if the Comment string like - "i have added the user Test user" and
@input - "tes"
i want the output as "i have added the user <span style="color:red">Tes</span>t user"
plese help
Thanks in Advance | sql | null | null | null | null | null | open | Sql String Function
===
Need help to do a simple task in sql string
in my table there is a field comment(user comments).
in my procedure i am passing a paremeter @input ,i want to check whether the string contains the string @input and if it contains add some style to the substring(that same as @input).
eg: if the Comment string like - "i have added the user Test user" and
@input - "tes"
i want the output as "i have added the user <span style="color:red">Tes</span>t user"
plese help
Thanks in Advance | 0 |
6,298,820 | 06/09/2011 20:26:13 | 374,760 | 06/23/2010 23:59:12 | 35 | 0 | Install themeforest theme in wordpress.com | I bought the themeforest.net wordpress theme. I created a blog at wordpress. How to import themeforest theme to wordpress.com
Do I need to find the hosting provider, install wordpress on it and then upload the themeforest theme there?
I want to install the themeforest theme at wordpress.com, not at the hosting. Please let me know if it's possible. Thanks.
| php | wordpress | null | null | null | 06/09/2011 21:35:22 | off topic | Install themeforest theme in wordpress.com
===
I bought the themeforest.net wordpress theme. I created a blog at wordpress. How to import themeforest theme to wordpress.com
Do I need to find the hosting provider, install wordpress on it and then upload the themeforest theme there?
I want to install the themeforest theme at wordpress.com, not at the hosting. Please let me know if it's possible. Thanks.
| 2 |
4,036,726 | 10/27/2010 19:06:47 | 420,028 | 08/13/2010 21:29:24 | 260 | 20 | Suggestions for next language to learn | I figured its time to start learning another language, but I can't decide between Ruby and Python (I'd like to start using Rails or Django).
Which one do you think would be both most helpful and fun to learn, and if possible, could you give me some sites/links that would help me get started? If you think there's another language that would be better than those feel free to suggest it.
Thanks!
Currently I know the following:
C++, PHP, Flash (AS2, AS3 ...), HTML/CSS | python | ruby-on-rails | ruby | programming-languages | null | 10/27/2010 19:15:00 | off topic | Suggestions for next language to learn
===
I figured its time to start learning another language, but I can't decide between Ruby and Python (I'd like to start using Rails or Django).
Which one do you think would be both most helpful and fun to learn, and if possible, could you give me some sites/links that would help me get started? If you think there's another language that would be better than those feel free to suggest it.
Thanks!
Currently I know the following:
C++, PHP, Flash (AS2, AS3 ...), HTML/CSS | 2 |
11,372,862 | 07/07/2012 06:35:46 | 1,508,362 | 07/07/2012 06:31:32 | 1 | 0 | C# net programing by socket | I'm writing a game and i need to send and receive data from other computer in Wireless LAN network my master told me to use socket programing type.
I set computers IP and ping the systems but i don't know socket programing codes and how i should create a socket and use it , can anyone help me please? | c# | null | null | null | null | 07/07/2012 06:38:58 | not a real question | C# net programing by socket
===
I'm writing a game and i need to send and receive data from other computer in Wireless LAN network my master told me to use socket programing type.
I set computers IP and ping the systems but i don't know socket programing codes and how i should create a socket and use it , can anyone help me please? | 1 |
7,102,907 | 08/18/2011 05:42:58 | 876,603 | 08/03/2011 12:31:34 | 1 | 0 | using AccountManager addAccountExplicitly takes a long time for the first sync | I use AccountManager addAccountExplicitly() to add an account to AccountManager.
I then call
ContentResolver.setSyncAutomatically(account, ContactsContract.AUTHORITY, true);
After doing that, when looking in the device's "Accounts & sync" screen, i see my account BUT when I click on in, I see that the "Sync contacts" check box does not appear.
It may take a few minutes for it to appear...
I found out that if I listen to the account being added, and after a delay (2 secs) call:
ContentResolver.requestSync(account, ContactsContract.AUTHORITY, new Bundle());
It is being synced.
1.why does it take time for the account to sync?
2.is this the correct way to make the account sync immediately? (will this always work?) | android | android-contentresolver | accountmanager | android-syncadapter | null | null | open | using AccountManager addAccountExplicitly takes a long time for the first sync
===
I use AccountManager addAccountExplicitly() to add an account to AccountManager.
I then call
ContentResolver.setSyncAutomatically(account, ContactsContract.AUTHORITY, true);
After doing that, when looking in the device's "Accounts & sync" screen, i see my account BUT when I click on in, I see that the "Sync contacts" check box does not appear.
It may take a few minutes for it to appear...
I found out that if I listen to the account being added, and after a delay (2 secs) call:
ContentResolver.requestSync(account, ContactsContract.AUTHORITY, new Bundle());
It is being synced.
1.why does it take time for the account to sync?
2.is this the correct way to make the account sync immediately? (will this always work?) | 0 |
4,510,215 | 12/22/2010 14:33:18 | 16,794 | 09/17/2008 20:47:55 | 3,172 | 37 | Tool or framwork to persist XML to relational tables? | I am working with the Yahoo! Developer API and there are a lot of responses that I would like to persist to relational tables (SQL Server) so that I can query it later (and over time). Is there a tool or framework that will automatically script these tables for me from sample XML or do I have to build it manually? | xml | xml-schema | relational-database | null | null | null | open | Tool or framwork to persist XML to relational tables?
===
I am working with the Yahoo! Developer API and there are a lot of responses that I would like to persist to relational tables (SQL Server) so that I can query it later (and over time). Is there a tool or framework that will automatically script these tables for me from sample XML or do I have to build it manually? | 0 |
8,618,719 | 12/23/2011 17:04:36 | 1,113,719 | 12/23/2011 16:49:10 | 1 | 0 | ProximityAlert management | I've a list of GeoPoint that I put on a MapView as interest point. I've added a proximity alert to all of this GeoPoint. I've implemented the onReceive method in the BroadcastReceiver and it works fine. My problem is: how can I get what proximity alert was triggered? I've to implement an AlertDialog with some information about the specific interest point. | android-intent | broadcast | pendingintent | proximity | receiver | null | open | ProximityAlert management
===
I've a list of GeoPoint that I put on a MapView as interest point. I've added a proximity alert to all of this GeoPoint. I've implemented the onReceive method in the BroadcastReceiver and it works fine. My problem is: how can I get what proximity alert was triggered? I've to implement an AlertDialog with some information about the specific interest point. | 0 |
1,314,262 | 08/21/2009 21:13:53 | 42,297 | 12/01/2008 23:58:47 | 1 | 0 | Multiple simultaneous version control systems? | I'm relatively new to version control, and so far only have experience working with Subversion using TortoiseSVN/VisualSVN. I've been reading about other types of VCS (git, mercurial, etc), and am considering trying them out - however, many of the arguments for or against a particular VCS seem like they largely come down to subjective preference, so I'll probably wind up giving each one a look.
In thinking about doing so, I was wondering if it was even theoretically possible to use multiple VCS on a single codebase. Which (if any) combinations of VCS might this be a possibility for? And if possible, how much of a logistical nightmare would it be trying to juggle the respective exclusion lists?
One possible argument for doing so could be backup redundancy. Several VCS providers (Beanstalk, Github, Bitbucket) offer one free repository, so you could have the same repo backed up for free in several different places. | version-control | dvcs | git | svn | mercurial | null | open | Multiple simultaneous version control systems?
===
I'm relatively new to version control, and so far only have experience working with Subversion using TortoiseSVN/VisualSVN. I've been reading about other types of VCS (git, mercurial, etc), and am considering trying them out - however, many of the arguments for or against a particular VCS seem like they largely come down to subjective preference, so I'll probably wind up giving each one a look.
In thinking about doing so, I was wondering if it was even theoretically possible to use multiple VCS on a single codebase. Which (if any) combinations of VCS might this be a possibility for? And if possible, how much of a logistical nightmare would it be trying to juggle the respective exclusion lists?
One possible argument for doing so could be backup redundancy. Several VCS providers (Beanstalk, Github, Bitbucket) offer one free repository, so you could have the same repo backed up for free in several different places. | 0 |
7,297,343 | 09/04/2011 04:03:22 | 875,804 | 08/03/2011 03:13:39 | 73 | 9 | Can I create a custom lock screen in linux using python? | When the computer resumes from suspend, can I change the regular text-box unlock screen to something made in python. Changing the background is not what I'm asking, I want to know if you can completely override that screen with a widget made in pygtk or something similar. | python | linux | screen | unlock | null | 09/04/2011 05:02:55 | not a real question | Can I create a custom lock screen in linux using python?
===
When the computer resumes from suspend, can I change the regular text-box unlock screen to something made in python. Changing the background is not what I'm asking, I want to know if you can completely override that screen with a widget made in pygtk or something similar. | 1 |
5,365,797 | 03/19/2011 23:57:14 | 292,979 | 03/13/2010 14:42:43 | 814 | 55 | Is there any evidence that lisp actually is better than other languages at artificial intelligence? | There seems to be a long-held belief (mainly by non-lispers) that lisp is only good for developing AI.
Where did this belief originate? And is there any basis in fact to it? | lisp | scheme | artificial-intelligence | myths | null | 03/20/2011 00:00:23 | not constructive | Is there any evidence that lisp actually is better than other languages at artificial intelligence?
===
There seems to be a long-held belief (mainly by non-lispers) that lisp is only good for developing AI.
Where did this belief originate? And is there any basis in fact to it? | 4 |
11,022,052 | 06/13/2012 19:32:06 | 830,519 | 07/05/2011 22:00:40 | 174 | 0 | Converting Store Procedure from C# to VB.net | Dim sql1 As String = ("EXEC [dbo].[usp_GetReportData_All] @ReportID=N'{0}', @StartDate=N'{1}' @EndDate=N'{2}', @StartDate2=N'{3}' @EndDate2=N'{4}'", repotid1, startdata1, EndDate1, StartDate3,Enddate3 )
Ok normally I have this line of code in C# saved into a string then from there I use that string to run the store procedure into a datatable. Apparantly vb.net doesn't seem to like that format so I'm just wondering if it is possible to save this line into a string or not in vb.net | c#-to-vb.net | null | null | null | null | null | open | Converting Store Procedure from C# to VB.net
===
Dim sql1 As String = ("EXEC [dbo].[usp_GetReportData_All] @ReportID=N'{0}', @StartDate=N'{1}' @EndDate=N'{2}', @StartDate2=N'{3}' @EndDate2=N'{4}'", repotid1, startdata1, EndDate1, StartDate3,Enddate3 )
Ok normally I have this line of code in C# saved into a string then from there I use that string to run the store procedure into a datatable. Apparantly vb.net doesn't seem to like that format so I'm just wondering if it is possible to save this line into a string or not in vb.net | 0 |
5,541,519 | 04/04/2011 16:35:07 | 468,972 | 10/07/2010 10:49:26 | 1 | 0 | SQL Server native client 10.0 versus OleDb differences? | We have an SQL Server 2008 R1 Environment.
We have poorly performing queries across linked servers which are quite complex.
First question:
Are there any differences between (particularly performance) of SQL native client 10.0 and the listing for oledb within linked servers? My understanding of this was that Native client just packages up oledb with some other items. But I would appreciate some guidance.
Additionally does anyone know where to find some good white papers on optimising Linked server queries?
many thanks
D | sql | performance | linked-server | null | null | null | open | SQL Server native client 10.0 versus OleDb differences?
===
We have an SQL Server 2008 R1 Environment.
We have poorly performing queries across linked servers which are quite complex.
First question:
Are there any differences between (particularly performance) of SQL native client 10.0 and the listing for oledb within linked servers? My understanding of this was that Native client just packages up oledb with some other items. But I would appreciate some guidance.
Additionally does anyone know where to find some good white papers on optimising Linked server queries?
many thanks
D | 0 |
6,555,418 | 07/02/2011 06:14:00 | 825,808 | 07/02/2011 06:14:00 | 1 | 0 | Compiling wxWidgets source code using Borland C++ 5.5 Compile | I am a beginner C++ programmer and want to write C++ GUI programs with wxWidgets for Windows family. The problem is that how can I configure Borland C++ Compiler for working with wxWidgets? Please suggest me how can I compile wxWidgets code with bcc32.exe?
Thanks! | c++ | null | null | null | null | 11/11/2011 03:04:05 | too localized | Compiling wxWidgets source code using Borland C++ 5.5 Compile
===
I am a beginner C++ programmer and want to write C++ GUI programs with wxWidgets for Windows family. The problem is that how can I configure Borland C++ Compiler for working with wxWidgets? Please suggest me how can I compile wxWidgets code with bcc32.exe?
Thanks! | 3 |
9,998,037 | 04/03/2012 17:06:55 | 1,071,915 | 11/29/2011 18:12:48 | 16 | 0 | Mysql query...WHERE (comma separated string)IN(Comma separated string) | I am trying to pull ids from table where numbers in comma-separated string 1, are all in comma-separated string 2. The IN function gives me ids if any numbers match, but I want all from string 1 to match or that id is not shown in result.
$query = "SELECT teams FROM #__bl_teamcord WHERE u_id = ".$t_id." AND s_id = ".$sid." LIMIT 1";
$db->setQuery($query);
$tcteams = $db->loadResult();
$query = "SELECT r.id FROM #__bl_regions as r WHERE (NOW() between r.start_date and r.end_date) AND r.s_id = ".$sid." AND (r.teams IN($tcteams))";
$db->setQuery($query);
$regions1 = $db->loadResultArray();
| mysql | query | null | null | null | null | open | Mysql query...WHERE (comma separated string)IN(Comma separated string)
===
I am trying to pull ids from table where numbers in comma-separated string 1, are all in comma-separated string 2. The IN function gives me ids if any numbers match, but I want all from string 1 to match or that id is not shown in result.
$query = "SELECT teams FROM #__bl_teamcord WHERE u_id = ".$t_id." AND s_id = ".$sid." LIMIT 1";
$db->setQuery($query);
$tcteams = $db->loadResult();
$query = "SELECT r.id FROM #__bl_regions as r WHERE (NOW() between r.start_date and r.end_date) AND r.s_id = ".$sid." AND (r.teams IN($tcteams))";
$db->setQuery($query);
$regions1 = $db->loadResultArray();
| 0 |
7,978,637 | 11/02/2011 10:12:13 | 1,025,373 | 11/02/2011 10:04:19 | 1 | 0 | Python crawling from main sites' urls and clean tags save to files with www and urls directly | #!usr/bin/python
# -*- coding: utf-8 -*-
import urllib2
import urllib
from lxml.html import fromstring
from lxml.html.clean import Cleaner
from formatter import NullFormatter
import cookielib
import urllib,time
import urlparse
import datetime
import new
from htmllib import HTMLParser
from lxml.html import fromstring
from lxml.html.clean import Cleaner
import urllib2
import sys,popen2,os
import urlparse
def tagclean(url,Data=None):
html = urllib2.urlopen(url).read()
doc = fromstring(html)
tags = ['h1','h2','h3','h4','h5','h6',
'div', 'span',
'img', 'area', 'map']
args = {'meta':False, 'safe_attrs_only':False, 'page_structure':False,
'scripts':True, 'style':True, 'links':True, 'remove_tags':tags}
cleaner = Cleaner(**args)
path = '/html/body'
body = doc.xpath(path)[0]
return cleaner.clean_html(body).text_content().encode('ascii', 'ignore')
def writetofile(text,filename):
writefile = open(""+filename+"", "a")
writefile.write(str(text))
writefile.close()
if __name__=="__main__":
url=raw_input("Enter url:")
spliturl=url.split("http://")[1].replace(".","_")
metin=str(tagclean(url))
writetofile(text,spliturl+".txt")
and under my code url scanner
def scanurl(url):
print "saving: ",url,datetime.datetime.now().strftime("%H:%M:%S")
tmp=urllib.urlretrieve(url)
print "saving finished",datetime.datetime.now().strftime("%H:%M:%S")
parser= HTMLParser(NullFormatter( ))
parser.feed( open(tmp[0]).read( ) )
urls=[]
for a in parser.anchorlist:
urls.append(urlparse.urljoin( url, a ))
return urls
i want to combine tagcleaner with this...
| python | null | null | null | null | 11/03/2011 06:20:49 | not a real question | Python crawling from main sites' urls and clean tags save to files with www and urls directly
===
#!usr/bin/python
# -*- coding: utf-8 -*-
import urllib2
import urllib
from lxml.html import fromstring
from lxml.html.clean import Cleaner
from formatter import NullFormatter
import cookielib
import urllib,time
import urlparse
import datetime
import new
from htmllib import HTMLParser
from lxml.html import fromstring
from lxml.html.clean import Cleaner
import urllib2
import sys,popen2,os
import urlparse
def tagclean(url,Data=None):
html = urllib2.urlopen(url).read()
doc = fromstring(html)
tags = ['h1','h2','h3','h4','h5','h6',
'div', 'span',
'img', 'area', 'map']
args = {'meta':False, 'safe_attrs_only':False, 'page_structure':False,
'scripts':True, 'style':True, 'links':True, 'remove_tags':tags}
cleaner = Cleaner(**args)
path = '/html/body'
body = doc.xpath(path)[0]
return cleaner.clean_html(body).text_content().encode('ascii', 'ignore')
def writetofile(text,filename):
writefile = open(""+filename+"", "a")
writefile.write(str(text))
writefile.close()
if __name__=="__main__":
url=raw_input("Enter url:")
spliturl=url.split("http://")[1].replace(".","_")
metin=str(tagclean(url))
writetofile(text,spliturl+".txt")
and under my code url scanner
def scanurl(url):
print "saving: ",url,datetime.datetime.now().strftime("%H:%M:%S")
tmp=urllib.urlretrieve(url)
print "saving finished",datetime.datetime.now().strftime("%H:%M:%S")
parser= HTMLParser(NullFormatter( ))
parser.feed( open(tmp[0]).read( ) )
urls=[]
for a in parser.anchorlist:
urls.append(urlparse.urljoin( url, a ))
return urls
i want to combine tagcleaner with this...
| 1 |
7,038,163 | 08/12/2011 09:29:20 | 592,103 | 01/27/2011 11:41:54 | 21 | 2 | IPhone Application Scroll to given position in UITableView when page loaded | I want to scroll down to given row in my table view.
if I use following code inside a button event it works correctly.
[planTableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:7 inSection:0 ] atScrollPosition:0 animated:YES];
But I want to do it just after the page load. Placing above code inside viewDidLoad or viewDidAppear did not work.
Any help?? | iphone | xcode | xcode4.2 | null | null | null | open | IPhone Application Scroll to given position in UITableView when page loaded
===
I want to scroll down to given row in my table view.
if I use following code inside a button event it works correctly.
[planTableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:7 inSection:0 ] atScrollPosition:0 animated:YES];
But I want to do it just after the page load. Placing above code inside viewDidLoad or viewDidAppear did not work.
Any help?? | 0 |
1,046,121 | 06/25/2009 20:36:55 | 1,512,634 | 04/04/2009 19:58:17 | 48 | 0 | iphone OS 3 Video api | Does anyone know if its possible to open up the new camera/video API for the new 3gs in the app, similarly to the camera API in 2.2.1? recording functions and all?
but in the same token, is it possible to edit the video recording you just took and edit it?
all the best
| iphone-sdk-3.0 | iphone-3gs | video | api | editing | null | open | iphone OS 3 Video api
===
Does anyone know if its possible to open up the new camera/video API for the new 3gs in the app, similarly to the camera API in 2.2.1? recording functions and all?
but in the same token, is it possible to edit the video recording you just took and edit it?
all the best
| 0 |
8,924,006 | 01/19/2012 09:54:18 | 27,736 | 10/14/2008 06:10:21 | 613 | 14 | Different Types of Problems Relating to Portability | I'm writing my Master's thesis on automatic portability testing. The thesis can be found here: https://yousource.it.jyu.fi/automatic-portability-testing
I would like to hear about different types of real world problems relating to portability. Even better is if you would care to share if you have managed to create automatic test suite for detecting such problems in the future. Hopefully this data would help me write even better Master's thesis which others could use to plan portability testing for their software.
To start the discussion, I'll tell of my own problem which sparked the interest for the thesis.
I was writing a Windows software which had a service component and a client component. Both of these ran on the same computer. The service component gathered data from XML files generated by a third party software. The service would then inform the client when it detected problems which required user interaction. Both of these software were written in C# with NET 4.0 so we decided to use Windows Communication Foundation for communications between the software. The communication was two-way because the user could use the client to tell the service to ignore a certain problem.
This setup worked perfectly in our Windows XP installation which was used mainly during the development of the software. However one of our test users used Windows Vista which has User Account Control which prohibited the communication from the service to the client. Unfortunately this find came late in our development and we had to a major last-minute change to our architecture. The software came out fine in the end but we had slipped past our schedule and of course the client was less than thrilled.
This particular problem could have been detected by adding an UAC-enabled Windows to our testing setup. It wouldn't have required too much of additional resources as there would have been only two test environments but if one would want to test a particular software for example with all Windows versions from XP to 8 with both 32- and 64-bit versions, the amount of manual labor would be a lot bigger and an automatic test environment would probably be in order. | software-engineering | portability | null | null | null | 01/19/2012 14:43:14 | not constructive | Different Types of Problems Relating to Portability
===
I'm writing my Master's thesis on automatic portability testing. The thesis can be found here: https://yousource.it.jyu.fi/automatic-portability-testing
I would like to hear about different types of real world problems relating to portability. Even better is if you would care to share if you have managed to create automatic test suite for detecting such problems in the future. Hopefully this data would help me write even better Master's thesis which others could use to plan portability testing for their software.
To start the discussion, I'll tell of my own problem which sparked the interest for the thesis.
I was writing a Windows software which had a service component and a client component. Both of these ran on the same computer. The service component gathered data from XML files generated by a third party software. The service would then inform the client when it detected problems which required user interaction. Both of these software were written in C# with NET 4.0 so we decided to use Windows Communication Foundation for communications between the software. The communication was two-way because the user could use the client to tell the service to ignore a certain problem.
This setup worked perfectly in our Windows XP installation which was used mainly during the development of the software. However one of our test users used Windows Vista which has User Account Control which prohibited the communication from the service to the client. Unfortunately this find came late in our development and we had to a major last-minute change to our architecture. The software came out fine in the end but we had slipped past our schedule and of course the client was less than thrilled.
This particular problem could have been detected by adding an UAC-enabled Windows to our testing setup. It wouldn't have required too much of additional resources as there would have been only two test environments but if one would want to test a particular software for example with all Windows versions from XP to 8 with both 32- and 64-bit versions, the amount of manual labor would be a lot bigger and an automatic test environment would probably be in order. | 4 |
11,164,507 | 06/22/2012 21:41:03 | 1,073,005 | 11/30/2011 09:18:51 | 8 | 0 | Load large data set with WPF ContextMenu for RichTextBox | I'm into a situation where the number of items of a ContextMenu has gone to a number like 3 thousand. In this scenario, the ContextMenu takes lot of time in loading itself. I'm trying to do UI Virtualization but without any luck.
The sample code is as follows:
<RichTextBox x:Name="FMWpfPopupControlHost" ScrollViewer.CanContentScroll="True" VirtualizingStackPanel.IsVirtualizing="True" HorizontalAlignment="Left" Width="300" Height="600" Focusable="True" Loaded="onLoaded1">
<RichTextBox.ContextMenu >
<ContextMenu VirtualizingStackPanel.IsVirtualizing="True" ItemsSource="{Binding GetLabel, Source ={StaticResource model}}" ScrollViewer.CanContentScroll="True">
<ContextMenu.ItemTemplate>
<DataTemplate>
<TextBlock Initialized="TextBlock_Initialized" Text="{Binding getLabel}"/>
</DataTemplate>
</ContextMenu.ItemTemplate>
<ContextMenu.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel IsItemsHost="True" IsVirtualizing="True" VirtualizationMode="Recycling"/>
</ItemsPanelTemplate>
</ContextMenu.ItemsPanel>
<ContextMenu.Template>
<ControlTemplate>
<Border BorderThickness="{TemplateBinding Border.BorderThickness}" Padding="{TemplateBinding Control.Padding}" BorderBrush="{TemplateBinding Border.BorderBrush}" Background="{TemplateBinding Panel.Background}" SnapsToDevicePixels="True">
<ScrollViewer Padding="{TemplateBinding Control.Padding}" Focusable="False">
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
</ScrollViewer>
</Border>
</ControlTemplate>
</ContextMenu.Template>
</ContextMenu>
</RichTextBox.ContextMenu>
</RichTextBox>
Please guide me how can I resolve this issue?
Thanks!
Harsh Gupta | wpf | performance | contextmenu | large | ui-virtualization | null | open | Load large data set with WPF ContextMenu for RichTextBox
===
I'm into a situation where the number of items of a ContextMenu has gone to a number like 3 thousand. In this scenario, the ContextMenu takes lot of time in loading itself. I'm trying to do UI Virtualization but without any luck.
The sample code is as follows:
<RichTextBox x:Name="FMWpfPopupControlHost" ScrollViewer.CanContentScroll="True" VirtualizingStackPanel.IsVirtualizing="True" HorizontalAlignment="Left" Width="300" Height="600" Focusable="True" Loaded="onLoaded1">
<RichTextBox.ContextMenu >
<ContextMenu VirtualizingStackPanel.IsVirtualizing="True" ItemsSource="{Binding GetLabel, Source ={StaticResource model}}" ScrollViewer.CanContentScroll="True">
<ContextMenu.ItemTemplate>
<DataTemplate>
<TextBlock Initialized="TextBlock_Initialized" Text="{Binding getLabel}"/>
</DataTemplate>
</ContextMenu.ItemTemplate>
<ContextMenu.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel IsItemsHost="True" IsVirtualizing="True" VirtualizationMode="Recycling"/>
</ItemsPanelTemplate>
</ContextMenu.ItemsPanel>
<ContextMenu.Template>
<ControlTemplate>
<Border BorderThickness="{TemplateBinding Border.BorderThickness}" Padding="{TemplateBinding Control.Padding}" BorderBrush="{TemplateBinding Border.BorderBrush}" Background="{TemplateBinding Panel.Background}" SnapsToDevicePixels="True">
<ScrollViewer Padding="{TemplateBinding Control.Padding}" Focusable="False">
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
</ScrollViewer>
</Border>
</ControlTemplate>
</ContextMenu.Template>
</ContextMenu>
</RichTextBox.ContextMenu>
</RichTextBox>
Please guide me how can I resolve this issue?
Thanks!
Harsh Gupta | 0 |
9,001,166 | 01/25/2012 10:31:48 | 1,112,888 | 12/23/2011 05:47:53 | 6 | 1 | How to create a DataSource in JBoss application server | Can anybody provide the steps for creating DataSource in JBoss server(5.0) with Oracle Database..
Thanks in Advance | java | xml | jboss | null | null | 01/27/2012 03:16:22 | not a real question | How to create a DataSource in JBoss application server
===
Can anybody provide the steps for creating DataSource in JBoss server(5.0) with Oracle Database..
Thanks in Advance | 1 |
9,237,997 | 02/11/2012 05:12:23 | 496,949 | 11/04/2010 08:45:00 | 5,018 | 2 | Compare XPS and PDF, which will be the future standard? | Microsoft proposed XPS, how its status compared to PDF? Is there any advantage of XPS over pdf? | pdf | xps | xpsdocument | null | null | 02/13/2012 13:31:24 | not constructive | Compare XPS and PDF, which will be the future standard?
===
Microsoft proposed XPS, how its status compared to PDF? Is there any advantage of XPS over pdf? | 4 |
10,774,576 | 05/27/2012 14:10:22 | 1,420,203 | 05/27/2012 14:01:01 | 1 | 0 | number sorting with c using the aurdino uno board | Hi i was wondering if you could help me i'm trying to create an array sort three numbers in terms of maximum and minimum.
The numbers are in the range of 0 to 255. The result needs to be displayed on eight L.E.Ds on Ardunio board.
The numbers need to be randomly generated.
so far i have manage to find this code:
include <conio.h>
#include <stdlib.h>
int array[] = { 90, 3, 33, 28, 80, 49, 8, 30, 36, 25 };
int sort(const void *x, const void *y) {
return (*(int*)x - *(int*)y);
}
void main() {
clrscr();
int i;
qsort(array, 10, sizeof(int), sort);
for (i=0; i<10; i++) {
printf("%d ", array[i]);
}
getch();
} | c | null | null | null | null | 05/28/2012 02:27:04 | not a real question | number sorting with c using the aurdino uno board
===
Hi i was wondering if you could help me i'm trying to create an array sort three numbers in terms of maximum and minimum.
The numbers are in the range of 0 to 255. The result needs to be displayed on eight L.E.Ds on Ardunio board.
The numbers need to be randomly generated.
so far i have manage to find this code:
include <conio.h>
#include <stdlib.h>
int array[] = { 90, 3, 33, 28, 80, 49, 8, 30, 36, 25 };
int sort(const void *x, const void *y) {
return (*(int*)x - *(int*)y);
}
void main() {
clrscr();
int i;
qsort(array, 10, sizeof(int), sort);
for (i=0; i<10; i++) {
printf("%d ", array[i]);
}
getch();
} | 1 |
5,499,356 | 03/31/2011 11:50:47 | 637,837 | 02/28/2011 14:35:23 | 1 | 0 | Specifying path with whitespace in eclipse on mac os | I need to mention a path variable in eclipse helios on mac os.
The path i am specifying contains whitespace in it.
Example:
user/folder/android sdk
I have tried following ways which failed in the end.
specifying path in quotes both single & double.
Can anyone suggest way to solve this. | eclipse-plugin | eclipse-pde | eclipse-plugin-dev | null | null | null | open | Specifying path with whitespace in eclipse on mac os
===
I need to mention a path variable in eclipse helios on mac os.
The path i am specifying contains whitespace in it.
Example:
user/folder/android sdk
I have tried following ways which failed in the end.
specifying path in quotes both single & double.
Can anyone suggest way to solve this. | 0 |
2,510,362 | 03/24/2010 18:23:59 | 722 | 08/08/2008 11:37:05 | 3,799 | 152 | Passthrough tap from uitableview to superview | I have a `UITableView` which is a read-only, no-scrolling view. It's a subview of a view that manages taps. I'd like to pass through any tapping on the tableView to its superView.
I've seen lots of examples of doing this, but nothing that seems to apply to the tableview.
Any direction would be helpful. Thanks! | iphone | uitableview | null | null | null | null | open | Passthrough tap from uitableview to superview
===
I have a `UITableView` which is a read-only, no-scrolling view. It's a subview of a view that manages taps. I'd like to pass through any tapping on the tableView to its superView.
I've seen lots of examples of doing this, but nothing that seems to apply to the tableview.
Any direction would be helpful. Thanks! | 0 |
3,007,312 | 06/09/2010 15:31:39 | 9,611 | 09/15/2008 19:21:17 | 18,231 | 680 | Resolving LNK4098: defaultlib 'MSVCRT' conflicts with ... | This warning:
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts
with use of other libs; use /NODEFAULTLIB:library
is a fairly common warning in Visual Studio> I'd like to understand the exact reason for it and the right way (if at all) to handle it.
This comes up in a debug build, compiled with `\MDd`. The project is linked to things like windows `Version.dll` and `pdh.dll` which themselves link with `MSVCRT.dll`. Obviously, I don't have the debug versions of these and can't compile them.
So I added `/NODEFAULTLIB:MSVCRT` to the linker command line and it actually did remove the warning. But what does this actually do? And why is it necessary? | visual-studio | dll | linker | warnings | msvcrt | null | open | Resolving LNK4098: defaultlib 'MSVCRT' conflicts with ...
===
This warning:
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts
with use of other libs; use /NODEFAULTLIB:library
is a fairly common warning in Visual Studio> I'd like to understand the exact reason for it and the right way (if at all) to handle it.
This comes up in a debug build, compiled with `\MDd`. The project is linked to things like windows `Version.dll` and `pdh.dll` which themselves link with `MSVCRT.dll`. Obviously, I don't have the debug versions of these and can't compile them.
So I added `/NODEFAULTLIB:MSVCRT` to the linker command line and it actually did remove the warning. But what does this actually do? And why is it necessary? | 0 |
9,504,590 | 02/29/2012 18:26:42 | 963,031 | 09/24/2011 21:17:22 | 122 | 1 | How much information does a geotagged picture contain ? or specifically can contain? | This is an open ended question. With the capabilities of current geo-enabled phones and cameras (based on gps) when a geo-enabled picture is taken at a certain location
What all metadata is added to the picture ? Or rather based on other information within the phone (its location, time, surroundings (nearest city ?)) what more information can be added ?
| android | iphone | geolocation | metadata | geotagging | 07/05/2012 23:27:27 | not a real question | How much information does a geotagged picture contain ? or specifically can contain?
===
This is an open ended question. With the capabilities of current geo-enabled phones and cameras (based on gps) when a geo-enabled picture is taken at a certain location
What all metadata is added to the picture ? Or rather based on other information within the phone (its location, time, surroundings (nearest city ?)) what more information can be added ?
| 1 |
7,857,405 | 10/22/2011 04:29:34 | 999,780 | 10/17/2011 18:44:25 | 3 | 0 | Is there a way to set a type's attribute to a default value? | type raygun( currentCharge as int, maxDamage as int, minDamage as int)
I couldn't find any examples demonstrating how to set the type's attribute to a default value when it is initialized. For example in this instance it would make sense to default the currentCharge to 100. I understand constants aren't supported at the moment, but I was wondering if there was a way to do this that I may not have considered. | basic4android | null | null | null | null | null | open | Is there a way to set a type's attribute to a default value?
===
type raygun( currentCharge as int, maxDamage as int, minDamage as int)
I couldn't find any examples demonstrating how to set the type's attribute to a default value when it is initialized. For example in this instance it would make sense to default the currentCharge to 100. I understand constants aren't supported at the moment, but I was wondering if there was a way to do this that I may not have considered. | 0 |
2,992,437 | 06/07/2010 19:24:38 | 333,283 | 05/05/2010 09:54:55 | 99 | 3 | Is Kohana worth giving up on due to lack of Documentation & Examples? | I've recently chose Kohana for a new project I'm doing <br>
And quite frankly, it's going a bit slow due to lack of resources. <br>
I've stumbled again and again on problems that I can't find a solution to <br>
Examples are probably the hardest to come by, so I'm considering <br>
Switching, especially because I'm only starting and I am still able to do it <br>
without to much trouble. <br><br>
I've been looking at CodeIgniter, although I know that Kohana is a branch out, <br>
CodeIgniter has far more examples and documentation, I'm wondering about your opinion. | codeigniter | documentation | kohana | code-examples | null | 10/03/2011 08:37:37 | not constructive | Is Kohana worth giving up on due to lack of Documentation & Examples?
===
I've recently chose Kohana for a new project I'm doing <br>
And quite frankly, it's going a bit slow due to lack of resources. <br>
I've stumbled again and again on problems that I can't find a solution to <br>
Examples are probably the hardest to come by, so I'm considering <br>
Switching, especially because I'm only starting and I am still able to do it <br>
without to much trouble. <br><br>
I've been looking at CodeIgniter, although I know that Kohana is a branch out, <br>
CodeIgniter has far more examples and documentation, I'm wondering about your opinion. | 4 |
8,002,096 | 11/03/2011 21:27:17 | 1,028,593 | 11/03/2011 21:10:13 | 1 | 0 | Lamp configuration on centos | I have installed lamp on my centos server vm , whene i want to access to my server by the browser of my local machine , it doesn't workd, plz hlep me to find solution | apache | apache2 | null | null | null | null | open | Lamp configuration on centos
===
I have installed lamp on my centos server vm , whene i want to access to my server by the browser of my local machine , it doesn't workd, plz hlep me to find solution | 0 |
393,524 | 12/26/2008 05:50:35 | 31,675 | 10/27/2008 01:49:15 | 307 | 23 | Unable to add a Service Reference to any WCF Service | I'm using Visual Studio 2008 SP1 on .NET 3.5 SP1 on Vista
Any time I try to add a Service Reference to any WCF service I get an error that says "Could not load type 'System.ServiceModel.FaultImportOptions' from assembly 'System.ServiceModel,Version=3.0.0.0, Culture=neutral, PublicKeyToken=..."
This happens when I try to connect to either a local WCF service or one running on the internet.
If I create the blank WCF Service Library and hit run, it brings up the WCF Test Client as expected and then errors out with the same error showing in its error dialog.
I've Googled this issue and found several references to people having the same issue, but none with a definitive fix. Some suggested uninstalling .NET 3.5 and reinstalling, which I did, but it didn't seem to help.
I even uninstalled .NET 3.5 SP1 and replaced it with just .NET 3.5 and still get the same behavior.
I tried to uninstall ALL of .NET, but after I uninstall 3.5 I see no way to uninstall .NET 3 or 2. They show up in the list of programs, but there is no option to uninstall them. I found [this][1] article with explicit instructions for removing it all in Vista, but the pieces to remove for .NET 2 and 3 don't show up as stated.
All of the other .NET stuff seems to work fine. I haven't run into any issues with ASP.NET development or anything else - connecting to a WCF service seems to be the only issue. This is what I'm focusing on currently in my studies though.
Any help would be GREATLY appreciated!
[1]: http://blogs.msdn.com/astebner/archive/2008/08/01/8803442.aspx | wcf | .net | .net-3.5 | visual-studio | null | 12/26/2008 07:23:13 | too localized | Unable to add a Service Reference to any WCF Service
===
I'm using Visual Studio 2008 SP1 on .NET 3.5 SP1 on Vista
Any time I try to add a Service Reference to any WCF service I get an error that says "Could not load type 'System.ServiceModel.FaultImportOptions' from assembly 'System.ServiceModel,Version=3.0.0.0, Culture=neutral, PublicKeyToken=..."
This happens when I try to connect to either a local WCF service or one running on the internet.
If I create the blank WCF Service Library and hit run, it brings up the WCF Test Client as expected and then errors out with the same error showing in its error dialog.
I've Googled this issue and found several references to people having the same issue, but none with a definitive fix. Some suggested uninstalling .NET 3.5 and reinstalling, which I did, but it didn't seem to help.
I even uninstalled .NET 3.5 SP1 and replaced it with just .NET 3.5 and still get the same behavior.
I tried to uninstall ALL of .NET, but after I uninstall 3.5 I see no way to uninstall .NET 3 or 2. They show up in the list of programs, but there is no option to uninstall them. I found [this][1] article with explicit instructions for removing it all in Vista, but the pieces to remove for .NET 2 and 3 don't show up as stated.
All of the other .NET stuff seems to work fine. I haven't run into any issues with ASP.NET development or anything else - connecting to a WCF service seems to be the only issue. This is what I'm focusing on currently in my studies though.
Any help would be GREATLY appreciated!
[1]: http://blogs.msdn.com/astebner/archive/2008/08/01/8803442.aspx | 3 |
5,373,861 | 03/21/2011 04:41:04 | 666,929 | 03/19/2011 02:03:57 | 5 | 0 | renaming the name of the APP alone in Android Eclipse IDE | I created a wonderful app, but I want to rename the "application name" alone... (i.e the name seen by the user on the app icon ) .. ( this isn't package renaming)
How do I do it, without creating a new one ... | android | eclipse | application | rename | null | null | open | renaming the name of the APP alone in Android Eclipse IDE
===
I created a wonderful app, but I want to rename the "application name" alone... (i.e the name seen by the user on the app icon ) .. ( this isn't package renaming)
How do I do it, without creating a new one ... | 0 |
11,331,244 | 07/04/2012 14:41:41 | 962,035 | 09/23/2011 22:13:22 | 1 | 0 | In Unix, how can I register to know when a process is launched? | Let's say I want to have a background process which writes to a file every time a process is launched or exits. Any process (though I'm mostly interested in those with graphical components).
I'd rather not constantly poll the list of running process. My is that I'd have to replace exec or fork with my own copy, but I'm not sure how that's done. Or is there a better way? | unix | process | exec | fork | null | null | open | In Unix, how can I register to know when a process is launched?
===
Let's say I want to have a background process which writes to a file every time a process is launched or exits. Any process (though I'm mostly interested in those with graphical components).
I'd rather not constantly poll the list of running process. My is that I'd have to replace exec or fork with my own copy, but I'm not sure how that's done. Or is there a better way? | 0 |
5,741,138 | 04/21/2011 07:52:15 | 718,524 | 04/21/2011 07:52:15 | 1 | 0 | How to add one line to a set of files in ANT? | is it possible to add one line to a set of files in ANT? basically i have a folder which has sub-folders, each subfolder contains different types of files, such as xml files, cmd files, etc. Now i need to add one line to all cmd files under that folder. have searched around for a while, but couldn't find a clue.
wondering is it possible in ANT? | ant | null | null | null | null | null | open | How to add one line to a set of files in ANT?
===
is it possible to add one line to a set of files in ANT? basically i have a folder which has sub-folders, each subfolder contains different types of files, such as xml files, cmd files, etc. Now i need to add one line to all cmd files under that folder. have searched around for a while, but couldn't find a clue.
wondering is it possible in ANT? | 0 |
5,192,872 | 03/04/2011 11:03:00 | 219,519 | 11/26/2009 15:51:17 | 184 | 6 | Using extra() on ValuesQuerySet in Django | I'm trying to calculate a percentage with two values which are themselves aggregated. The SQL query that explains what I'm after is as follows:
SELECT (SUM(field_a) / SUM(field_b) * 100) AS percent
FROM myapp_mymodel
GROUP BY field_c
ORDER BY field_c
I tried to use the following to construct a QuerySet, but unfortunately it doesn't contain the extra field:
MyModel.objects.values('field_c').annotate(
sum_field_a=Sum('field_a'),
sum_field_b=Sum('field_b')).extra(
select={'percent': 'sum_field_a / sum_field_b * 100'})
What irritates me is that - according to the Django documentation - this seems to be the way to go:
> When a values() clause is used to
> constrain the columns that are
> returned in the result set […]
> instead of returning an
> annotated result for each result in
> the original QuerySet, the original
> results are grouped according to the
> unique combinations of the fields
> specified in the values() clause. An
> annotation is then provided for each
> unique group; the annotation is
> computed over all members of the
> group.
>
> _Source:_ http://docs.djangoproject.com/en/dev/topics/db/aggregation/#values
> If you use a values() clause after an extra() clause, any fields defined by a select argument in the extra() must be explicitly included in the values() clause. However, if the extra() clause is used after the values(), the fields added by the select will be included automatically.
>
> _Source:_ http://docs.djangoproject.com/en/dev/ref/models/querysets/#values | sql | django | django-queryset | values | extra | null | open | Using extra() on ValuesQuerySet in Django
===
I'm trying to calculate a percentage with two values which are themselves aggregated. The SQL query that explains what I'm after is as follows:
SELECT (SUM(field_a) / SUM(field_b) * 100) AS percent
FROM myapp_mymodel
GROUP BY field_c
ORDER BY field_c
I tried to use the following to construct a QuerySet, but unfortunately it doesn't contain the extra field:
MyModel.objects.values('field_c').annotate(
sum_field_a=Sum('field_a'),
sum_field_b=Sum('field_b')).extra(
select={'percent': 'sum_field_a / sum_field_b * 100'})
What irritates me is that - according to the Django documentation - this seems to be the way to go:
> When a values() clause is used to
> constrain the columns that are
> returned in the result set […]
> instead of returning an
> annotated result for each result in
> the original QuerySet, the original
> results are grouped according to the
> unique combinations of the fields
> specified in the values() clause. An
> annotation is then provided for each
> unique group; the annotation is
> computed over all members of the
> group.
>
> _Source:_ http://docs.djangoproject.com/en/dev/topics/db/aggregation/#values
> If you use a values() clause after an extra() clause, any fields defined by a select argument in the extra() must be explicitly included in the values() clause. However, if the extra() clause is used after the values(), the fields added by the select will be included automatically.
>
> _Source:_ http://docs.djangoproject.com/en/dev/ref/models/querysets/#values | 0 |
10,339,509 | 04/26/2012 18:44:43 | 1,357,136 | 04/25/2012 20:12:55 | 2 | 0 | Word detection objective-c | I'd want to detect all those words starting with a specific letter in a UITextField. Thanks for your interest. | objective-c | ios | uitextfield | null | null | 04/26/2012 19:11:18 | not a real question | Word detection objective-c
===
I'd want to detect all those words starting with a specific letter in a UITextField. Thanks for your interest. | 1 |
8,810,124 | 01/10/2012 20:34:19 | 784,827 | 06/05/2011 15:14:32 | 6 | 0 | How to Scraper Google without being banned | I'm try to scraper Google site with php cURL for check keyword ranking by website
because Google API had important limitations, can only get the first 8 results for any search and number of searches per day limited too.
It not problem when run script on localhost but on share hosting will get 503 header
Errors
Code: 22
Message: The requested URL returned error: 503
=============================================
Cause is google will block when same IP try to a lot of request
I'm research for this problem and solution is
1. use proxy when cURL to Google
2. showing the captcha to the user and reset Cookie, Header, user-agent, IP
For choice one it hard to find reliable proxy and must pay for it.
I'm try to resolve problem with choice two but has problem with coding
When you get error 503. If you open with browser will show captcha to user like this
http://i.stack.imgur.com/NHaAu.jpg
But when use PHP cURL I can't get the result on the picture .It will get FALSE boolen and empty value and nothing result
this is code that I write with codeigniter
$this->load->library('curl');
$this->curl->create('http://www.google.co.th/search?&ie=UTF-8&q=game&num=100');
$result = $this->curl->execute();
var_dump($result);
$this->curl->debug();
The result will show same above
bool(false)
cURL Test
=============================================
Response
=============================================
Errors
Code: 22
Message: The requested URL returned error: 503
=============================================
Info
Array
(
)
How to show captcha to user and letting him to write the letters, sending this to Google and saving the cookie to continue with the requests.I can't coding to do this please help me
Thank you | php | google | curl | codeigniter-url | scraper | 01/10/2012 20:50:46 | not a real question | How to Scraper Google without being banned
===
I'm try to scraper Google site with php cURL for check keyword ranking by website
because Google API had important limitations, can only get the first 8 results for any search and number of searches per day limited too.
It not problem when run script on localhost but on share hosting will get 503 header
Errors
Code: 22
Message: The requested URL returned error: 503
=============================================
Cause is google will block when same IP try to a lot of request
I'm research for this problem and solution is
1. use proxy when cURL to Google
2. showing the captcha to the user and reset Cookie, Header, user-agent, IP
For choice one it hard to find reliable proxy and must pay for it.
I'm try to resolve problem with choice two but has problem with coding
When you get error 503. If you open with browser will show captcha to user like this
http://i.stack.imgur.com/NHaAu.jpg
But when use PHP cURL I can't get the result on the picture .It will get FALSE boolen and empty value and nothing result
this is code that I write with codeigniter
$this->load->library('curl');
$this->curl->create('http://www.google.co.th/search?&ie=UTF-8&q=game&num=100');
$result = $this->curl->execute();
var_dump($result);
$this->curl->debug();
The result will show same above
bool(false)
cURL Test
=============================================
Response
=============================================
Errors
Code: 22
Message: The requested URL returned error: 503
=============================================
Info
Array
(
)
How to show captcha to user and letting him to write the letters, sending this to Google and saving the cookie to continue with the requests.I can't coding to do this please help me
Thank you | 1 |
9,867,071 | 03/26/2012 05:31:48 | 253,986 | 01/19/2010 12:22:59 | 322 | 3 | How to select single column using ruby activerecord query | I am having two classes under migration dir.
class1
create_table :table1 do |t|
t.integer :name
end
end
class2
create_table :table2 do |t|
t.integer :table1_id
t.integer :name
t.text :value
end
end
I want to fetch only value column from table2 using conditions table2.table1_id = "1" and table2.name = "A"
How to write this in ruby?
I want to get the text value as a result.
Same as like sql query
select value from table2 where table1_id = 1 and name = 'A';
| activerecord | ruby-1.9.2 | null | null | null | null | open | How to select single column using ruby activerecord query
===
I am having two classes under migration dir.
class1
create_table :table1 do |t|
t.integer :name
end
end
class2
create_table :table2 do |t|
t.integer :table1_id
t.integer :name
t.text :value
end
end
I want to fetch only value column from table2 using conditions table2.table1_id = "1" and table2.name = "A"
How to write this in ruby?
I want to get the text value as a result.
Same as like sql query
select value from table2 where table1_id = 1 and name = 'A';
| 0 |
4,635,267 | 01/08/2011 17:51:31 | 568,210 | 12/20/2010 19:11:50 | 1 | 0 | Efficient programming | What are some examples of increasing efficiency, improving performance?
This is a broad question, so feel free to talk about any examples of where you rewrote code and made it run faster... | c++ | null | null | null | null | 01/08/2011 17:58:08 | not a real question | Efficient programming
===
What are some examples of increasing efficiency, improving performance?
This is a broad question, so feel free to talk about any examples of where you rewrote code and made it run faster... | 1 |
4,089,483 | 11/03/2010 16:53:52 | 164,923 | 08/28/2009 14:42:17 | 784 | 22 | Advice for lone in-house developer about to welcome a contractor | I'm the sole in-house .NET developer for a small company. Because I've got so much work on, the company have decided to recruit a contractor for 3 months to help me get some stuff done.
I'm quite used to my own way of doing things I suppose and since I've worked alone so long an outsider would maybe find some of my coding methods quite quirky.
One issue of interest is that an experienced contractor would quite likely have more coding experience than I have, but obviously I am the one with the specific knowledge of the systems I have created.
Does anyone have any advice to give me in terms of recruitment, working practices etc? I'm particularly concerned about version control (I use SVN).
Massively appreciated. | team | contracting | in-house | null | null | 02/23/2012 04:45:26 | off topic | Advice for lone in-house developer about to welcome a contractor
===
I'm the sole in-house .NET developer for a small company. Because I've got so much work on, the company have decided to recruit a contractor for 3 months to help me get some stuff done.
I'm quite used to my own way of doing things I suppose and since I've worked alone so long an outsider would maybe find some of my coding methods quite quirky.
One issue of interest is that an experienced contractor would quite likely have more coding experience than I have, but obviously I am the one with the specific knowledge of the systems I have created.
Does anyone have any advice to give me in terms of recruitment, working practices etc? I'm particularly concerned about version control (I use SVN).
Massively appreciated. | 2 |
1,094,659 | 07/07/2009 20:25:58 | 49,299 | 12/27/2008 01:13:08 | 6 | 0 | What's the insert performance like for the WPF Toolkit DataGrid? | Just wondering if anyone knows about what performance is like for the WPF Toolkit DataGrid for inserting rows to the top of the visible area. I know that ListBox and ListView will recreate all new visuals for all of the rows that are pushed down, which is a major impact on performance; I was wondering if the WPF Toolkit DataGrid does the same thing. | wpf | performance | wpftoolkit | datagrid | null | null | open | What's the insert performance like for the WPF Toolkit DataGrid?
===
Just wondering if anyone knows about what performance is like for the WPF Toolkit DataGrid for inserting rows to the top of the visible area. I know that ListBox and ListView will recreate all new visuals for all of the rows that are pushed down, which is a major impact on performance; I was wondering if the WPF Toolkit DataGrid does the same thing. | 0 |
7,923,598 | 10/27/2011 23:23:43 | 980,962 | 10/05/2011 18:14:46 | 65 | 1 | ContentViewController design decisions for UIPopoverController | I'm trying to do something similar to the Yelp filter on the iPad. It looks like this: ![enter image description here][1]
[1]: http://i.stack.imgur.com/Lub3O.jpg
I'm trying to figure out what the best way to do this. It looks very neat, like it's two sections in a UITableView, with each row doing something different. The first Sort Results By is just a UISegmentedControl, the second is some custom control that has multiple selections for the UISegmentContrl, and the Neighborhoods button acts like a UINavigationController, pushing another viewController onto the stack, that hides all the current info in the pic, and has a back button at the top. I was wondering how someone would go about building this. When I first see this, I would
1) create the first UISegmentedControl in the .xib
2) create the second custom control in code (saw a post on SO about how to create a segment control with multiple selections
3) have the Neighborhoods button allocate a new UINavigationController with the rootViewController being the new class I show.
4) add the appropriate "Sort Results By" and "Narrow Results By" UILabels in .xib
5) draw the rounded rects in the code behind in viewDidLoad or something
That's how I would approach it. I'm not sure if that's a good way to approach it or not. I am open to people's suggestions! Thanks a bunch. | iphone | objective-c | uinavigationcontroller | uipopovercontroller | null | null | open | ContentViewController design decisions for UIPopoverController
===
I'm trying to do something similar to the Yelp filter on the iPad. It looks like this: ![enter image description here][1]
[1]: http://i.stack.imgur.com/Lub3O.jpg
I'm trying to figure out what the best way to do this. It looks very neat, like it's two sections in a UITableView, with each row doing something different. The first Sort Results By is just a UISegmentedControl, the second is some custom control that has multiple selections for the UISegmentContrl, and the Neighborhoods button acts like a UINavigationController, pushing another viewController onto the stack, that hides all the current info in the pic, and has a back button at the top. I was wondering how someone would go about building this. When I first see this, I would
1) create the first UISegmentedControl in the .xib
2) create the second custom control in code (saw a post on SO about how to create a segment control with multiple selections
3) have the Neighborhoods button allocate a new UINavigationController with the rootViewController being the new class I show.
4) add the appropriate "Sort Results By" and "Narrow Results By" UILabels in .xib
5) draw the rounded rects in the code behind in viewDidLoad or something
That's how I would approach it. I'm not sure if that's a good way to approach it or not. I am open to people's suggestions! Thanks a bunch. | 0 |
11,309,443 | 07/03/2012 10:55:43 | 1,098,606 | 12/14/2011 19:56:13 | 12 | 0 | how to check bad character present in the string in java | i have a string and i need a utility method which looks for bad character presence in the string and return some flag on that. Thanks for help in advance | java | null | null | null | null | 07/03/2012 11:09:48 | not a real question | how to check bad character present in the string in java
===
i have a string and i need a utility method which looks for bad character presence in the string and return some flag on that. Thanks for help in advance | 1 |
3,619,260 | 09/01/2010 14:42:00 | 293,849 | 09/18/2009 08:53:54 | 84 | 8 | Authentication in ASP.NET HttpHandler | I have created a HttpHandler to be used with SWFUpload to upload images to the server. This upload is done in an administration backend so users need to be authenticated to upload images.
Initially I made the whole administration area deny annonymous users but because of the way SWFUpload appears to work it wouldn't work correctly with Forms authentication and would return a 302 status code.
I had thought it would be possible to make the location of my handler public in Web.config and use context.User.Identity.IsAuthenticated in my handler to determine if the user is logged in.
**My problem is that context.User.Identity.IsAuthenticated always seems false in the handler after I have logged in. Does anyone have any thoughts on why this might be?** | asp.net | null | null | null | null | null | open | Authentication in ASP.NET HttpHandler
===
I have created a HttpHandler to be used with SWFUpload to upload images to the server. This upload is done in an administration backend so users need to be authenticated to upload images.
Initially I made the whole administration area deny annonymous users but because of the way SWFUpload appears to work it wouldn't work correctly with Forms authentication and would return a 302 status code.
I had thought it would be possible to make the location of my handler public in Web.config and use context.User.Identity.IsAuthenticated in my handler to determine if the user is logged in.
**My problem is that context.User.Identity.IsAuthenticated always seems false in the handler after I have logged in. Does anyone have any thoughts on why this might be?** | 0 |
10,940,357 | 06/07/2012 21:48:44 | 1,443,275 | 06/07/2012 21:28:25 | 1 | 0 | I want to License My chrome extension | I developed a Chrome Plugin that is really effective, but if I host the app on the Chrome Store, there are no options to monetize the extension. This, to me, is a complete missed segment of the market, as I am sure developers would love to come up with creative applications and generate Revenue for them!
As such, I can't seem to find any site/Marketplace that would allow me to sell this extension as well. I know that Firefox is building an app store to compete with Google and other HTML5 based app stores, but that doesn't help me too much either.
Is there any way I can:
1. Host my Chrome Extension for download on either my own server/another app marketplace?
2. Provide some type of Payment Gateway with Licensing that prevents users from downloading a copy of the .crx and illegally distributing it?
I have a great little app, I dont want to give it away for Free.
Any Ideas?
| google-chrome | google-chrome-extension | licensing | crx | null | 06/15/2012 18:18:40 | off topic | I want to License My chrome extension
===
I developed a Chrome Plugin that is really effective, but if I host the app on the Chrome Store, there are no options to monetize the extension. This, to me, is a complete missed segment of the market, as I am sure developers would love to come up with creative applications and generate Revenue for them!
As such, I can't seem to find any site/Marketplace that would allow me to sell this extension as well. I know that Firefox is building an app store to compete with Google and other HTML5 based app stores, but that doesn't help me too much either.
Is there any way I can:
1. Host my Chrome Extension for download on either my own server/another app marketplace?
2. Provide some type of Payment Gateway with Licensing that prevents users from downloading a copy of the .crx and illegally distributing it?
I have a great little app, I dont want to give it away for Free.
Any Ideas?
| 2 |
8,634,830 | 12/26/2011 10:22:32 | 562,417 | 01/04/2011 10:45:35 | 537 | 31 | custom error message in yii | I have a password reset system in my yii application. The issue is that, yes, I can define the rules of a password that - It shouldn't be empty, it should be a valid password. Also I need to display a message in the same way on the form if the password being entered does not exists in the database.
how?
Any kind of help is appreciated. | yii | yii-mvc | null | null | null | 12/27/2011 18:06:20 | not a real question | custom error message in yii
===
I have a password reset system in my yii application. The issue is that, yes, I can define the rules of a password that - It shouldn't be empty, it should be a valid password. Also I need to display a message in the same way on the form if the password being entered does not exists in the database.
how?
Any kind of help is appreciated. | 1 |
9,463,764 | 02/27/2012 10:53:05 | 988,959 | 10/11/2011 06:47:37 | 11 | 0 | Mysql query optimizaiton | could you please optimize the below mysql query.
SELECT COUNT(DISTINCT a.cust_id ) as total FROM all_ids AS a LEFT JOIN id_details AS b ON a.cust_id = b.cust_id WHERE (a.status = 'A' or a.status = 'I') and b.cust_id IS NOT NULL and a.type = 'abc';
Thanks in Advance. | mysql | query | query-optimization | null | null | 02/28/2012 14:00:59 | not a real question | Mysql query optimizaiton
===
could you please optimize the below mysql query.
SELECT COUNT(DISTINCT a.cust_id ) as total FROM all_ids AS a LEFT JOIN id_details AS b ON a.cust_id = b.cust_id WHERE (a.status = 'A' or a.status = 'I') and b.cust_id IS NOT NULL and a.type = 'abc';
Thanks in Advance. | 1 |
7,465,520 | 09/19/2011 00:59:42 | 187,543 | 10/10/2009 04:13:36 | 2,754 | 90 | When to use conversion operators? | Considering the following example, the line `int a = objT + 5;` gives ambiguous conversion which is handled in two ways, using the explicit cast which i think shouldn't be necessary and replacing the use of conversion operators with member functions instead. and here, my question becomes should you still use conversions operators or not at all?
class Testable {
public:
Testable(int val = 0):x(val){}
operator int() const { return x; }
operator double() const { return x; }
int toInt() { return x; }
double toDouble() { return x; }
private:
int x;
};
int main()
{
Testable objT(10);
// ambiguous conversion
int a = objT + 5;
// why to use explicit cast when
// the conversion operator is for to handle
// this automatically
int b = static_cast<int>(objT) + 5;
// member functions
int c = objT.toInt() + 5;
} | c++ | operators | implicit-conversion | null | null | null | open | When to use conversion operators?
===
Considering the following example, the line `int a = objT + 5;` gives ambiguous conversion which is handled in two ways, using the explicit cast which i think shouldn't be necessary and replacing the use of conversion operators with member functions instead. and here, my question becomes should you still use conversions operators or not at all?
class Testable {
public:
Testable(int val = 0):x(val){}
operator int() const { return x; }
operator double() const { return x; }
int toInt() { return x; }
double toDouble() { return x; }
private:
int x;
};
int main()
{
Testable objT(10);
// ambiguous conversion
int a = objT + 5;
// why to use explicit cast when
// the conversion operator is for to handle
// this automatically
int b = static_cast<int>(objT) + 5;
// member functions
int c = objT.toInt() + 5;
} | 0 |
4,442,166 | 12/14/2010 17:30:47 | 349,223 | 05/24/2010 18:49:03 | 166 | 1 | html section jump with <a name="something"> more than once?? | I have a simple
<a name="top></a>
and another link:
<a href="#top">Back to Top of Page</a>
it works but after the first time the url turns to:
www.site.com/#top
and it doesn't work after a user uses it one time.
How can I make it so it will work multiple times? | html | xhtml | anchor | anchor-tag | null | null | open | html section jump with <a name="something"> more than once??
===
I have a simple
<a name="top></a>
and another link:
<a href="#top">Back to Top of Page</a>
it works but after the first time the url turns to:
www.site.com/#top
and it doesn't work after a user uses it one time.
How can I make it so it will work multiple times? | 0 |
4,081,751 | 11/02/2010 20:20:10 | 495,214 | 11/02/2010 20:20:10 | 1 | 0 | How To Interpret Siege and or Apache Bench Results | We have a MySQL driven site that will occasionally get 100K users in the space of 48 hours, all logging into the site and making purchases.
We are attempting to simulate this kind of load using tools like Apache Bench and Siege.
While the key metric seems to me number of concurrent users, and we've got our report results, we still feel like we're in the dark.
What I want to ask is: What kinds of things should we be testing to anticipate this kind of traffic?
50 concurrent users 1000 Times? 500 concurrent users 10 times?
We're looking at DB errors, apache timeouts, and response times. What else should we be looking at?
This is a vague question and I know there is no "right" answer, we're just looking for some general thoughts on how to determine what our infrastructure can realistically handle.
Thanks in advance! | stress-testing | apachebench | null | null | null | null | open | How To Interpret Siege and or Apache Bench Results
===
We have a MySQL driven site that will occasionally get 100K users in the space of 48 hours, all logging into the site and making purchases.
We are attempting to simulate this kind of load using tools like Apache Bench and Siege.
While the key metric seems to me number of concurrent users, and we've got our report results, we still feel like we're in the dark.
What I want to ask is: What kinds of things should we be testing to anticipate this kind of traffic?
50 concurrent users 1000 Times? 500 concurrent users 10 times?
We're looking at DB errors, apache timeouts, and response times. What else should we be looking at?
This is a vague question and I know there is no "right" answer, we're just looking for some general thoughts on how to determine what our infrastructure can realistically handle.
Thanks in advance! | 0 |
4,718,705 | 01/17/2011 22:41:33 | 573,425 | 01/12/2011 22:22:43 | 1 | 0 | Converting bitmap to grayscale | I want to convert an image from bitmap to grayscale, but when I load it in a picturebox...not on a button click event...
Like this...I load a bitmap picture and in the picturebox and it appears directly as a grayscale picture...
I found some source code on the Internet, but I don't really kmow how where to put the code to do what I want...
Thank you | c# | .net | image-processing | null | null | 01/17/2011 23:05:15 | not a real question | Converting bitmap to grayscale
===
I want to convert an image from bitmap to grayscale, but when I load it in a picturebox...not on a button click event...
Like this...I load a bitmap picture and in the picturebox and it appears directly as a grayscale picture...
I found some source code on the Internet, but I don't really kmow how where to put the code to do what I want...
Thank you | 1 |
9,664,011 | 03/12/2012 08:50:05 | 1,263,621 | 03/12/2012 08:31:11 | 1 | 0 | PHP: Sorting a multidimensional array by string? | I need to sort this array by the subsubkey "description" ascending.
I tried a few methods like usort,ksort,subval_sort but none of these work (I guess the main problem is that these are strings, always)
Any help is appreciated
array(77) {
[0]=>
array(3) {
["name"]=>
string(17) "abcd"
["description"]=>
string(15) "Delete XY"
["level"]=>
int(1)
}
[1]=>
array(3) {
["name"]=>
string(13) "fgfgdgfd"
["description"]=>
string(18) "Uploader XY"
["level"]=>
int(1)
}
[2]=>
array(3) {
["name"]=>
string(15) "sdfdsfsdfs"
["description"]=>
string(20) "Download abc"
["level"]=>
int(0)
}
} | php | string | sorting | multidimensional-array | null | null | open | PHP: Sorting a multidimensional array by string?
===
I need to sort this array by the subsubkey "description" ascending.
I tried a few methods like usort,ksort,subval_sort but none of these work (I guess the main problem is that these are strings, always)
Any help is appreciated
array(77) {
[0]=>
array(3) {
["name"]=>
string(17) "abcd"
["description"]=>
string(15) "Delete XY"
["level"]=>
int(1)
}
[1]=>
array(3) {
["name"]=>
string(13) "fgfgdgfd"
["description"]=>
string(18) "Uploader XY"
["level"]=>
int(1)
}
[2]=>
array(3) {
["name"]=>
string(15) "sdfdsfsdfs"
["description"]=>
string(20) "Download abc"
["level"]=>
int(0)
}
} | 0 |
11,019,539 | 06/13/2012 16:45:50 | 1,454,258 | 06/13/2012 16:42:42 | 1 | 0 | Is Sams Java 2 in 21 days going to confuse me | I have Sams Teach Yourself Java 2 in 21 days and i know Java is at version 9. Would reading this book confuse me too much? | java | null | null | null | null | 06/13/2012 16:49:48 | not a real question | Is Sams Java 2 in 21 days going to confuse me
===
I have Sams Teach Yourself Java 2 in 21 days and i know Java is at version 9. Would reading this book confuse me too much? | 1 |
9,117,477 | 02/02/2012 18:02:54 | 979,092 | 10/04/2011 18:42:11 | 57 | 0 | PMP certification | I would like to know how much time did you take to finish the PMP certification and I also would love to know how much is exam fee and how tough the exams are..etc
Also did it really help in your career or in your Job?
Thanks. | pmp | null | null | null | null | 02/03/2012 14:52:28 | not constructive | PMP certification
===
I would like to know how much time did you take to finish the PMP certification and I also would love to know how much is exam fee and how tough the exams are..etc
Also did it really help in your career or in your Job?
Thanks. | 4 |
11,295,768 | 07/02/2012 14:34:04 | 1,195,114 | 02/07/2012 16:15:03 | 113 | 0 | limiting align-current in LaTeX-mode | In a LaTeX document `align-current` aligns `&` and `\\`, but does so for entire sections at a time. Anyone have any idea as to how one limits its range (in a new macro) to say the current environment?
I seldom need to do an align of anythis other than a matrix or a table.
My attempts to build something on top of `align-regexp` have not been successful.
Ideas? | latex | alignment | elisp | null | null | 07/02/2012 15:19:38 | off topic | limiting align-current in LaTeX-mode
===
In a LaTeX document `align-current` aligns `&` and `\\`, but does so for entire sections at a time. Anyone have any idea as to how one limits its range (in a new macro) to say the current environment?
I seldom need to do an align of anythis other than a matrix or a table.
My attempts to build something on top of `align-regexp` have not been successful.
Ideas? | 2 |
8,533,097 | 12/16/2011 10:49:44 | 489,146 | 10/27/2010 17:17:48 | 125 | 7 | Android Application that stores data on a remote DB: complete code and architecture example? | I'm creating an Android app that should store data in a database in the internet.
I'd like a COMPLETE EXAMPLE on how to proceed deploying client and, also more, server side.
I explain: I need a DB, web services and so on...
So:
1. Which free product I need to install on the server to create web services?
2. Which DB server (I think MySQL)
Are these two above servers enough or I need other software to be installed on the server machine? And, when I'll buy ad internet second level address, should I pay attention for something in particular, some particular services or other?
Thank you very much :-)
Geltry | android | mysql | database | web-services | tomcat | 12/16/2011 11:40:35 | not a real question | Android Application that stores data on a remote DB: complete code and architecture example?
===
I'm creating an Android app that should store data in a database in the internet.
I'd like a COMPLETE EXAMPLE on how to proceed deploying client and, also more, server side.
I explain: I need a DB, web services and so on...
So:
1. Which free product I need to install on the server to create web services?
2. Which DB server (I think MySQL)
Are these two above servers enough or I need other software to be installed on the server machine? And, when I'll buy ad internet second level address, should I pay attention for something in particular, some particular services or other?
Thank you very much :-)
Geltry | 1 |
3,043,227 | 06/15/2010 07:20:22 | 466,534 | 04/21/2010 12:03:08 | 278 | 4 | question about cryptography | i have question can anybody give me link about cryptography with algorithms ?
thanks i need it very much in general i am using java language also it is possible in c++
but heart of site should be methods and theory part
| algorithm | null | null | null | null | 06/15/2010 12:58:09 | not a real question | question about cryptography
===
i have question can anybody give me link about cryptography with algorithms ?
thanks i need it very much in general i am using java language also it is possible in c++
but heart of site should be methods and theory part
| 1 |
8,300,156 | 11/28/2011 17:58:50 | 652,386 | 03/09/2011 20:45:34 | 1 | 2 | How to predict the currency rates changes between Indian Rupee and Japanese Yen? | How to predict the currency rates changes
(Only wrt Indian Rupee and Japanese Yen)
I know its hard for any supercomputer to predict these changes in conversion rates.
But, I want to have certain understandings based on some assumptions.
Like India is developing economy (8% approx) & Japan is little stagnant economy.
If this same state is continuing for next 20 years then
which currency will price will be increasing against the other ?
My question also means, we know some countries like india are developing and making more & more business & some like japan are mostly reached their peak of the development & their real estate business is not going to increase as the other. Will this give any data for predicting the currency rates changes in longterm scale ? | exchange | currency | rates | null | null | 11/28/2011 20:45:29 | off topic | How to predict the currency rates changes between Indian Rupee and Japanese Yen?
===
How to predict the currency rates changes
(Only wrt Indian Rupee and Japanese Yen)
I know its hard for any supercomputer to predict these changes in conversion rates.
But, I want to have certain understandings based on some assumptions.
Like India is developing economy (8% approx) & Japan is little stagnant economy.
If this same state is continuing for next 20 years then
which currency will price will be increasing against the other ?
My question also means, we know some countries like india are developing and making more & more business & some like japan are mostly reached their peak of the development & their real estate business is not going to increase as the other. Will this give any data for predicting the currency rates changes in longterm scale ? | 2 |
10,758,105 | 05/25/2012 16:27:31 | 62,536 | 02/04/2009 17:50:08 | 161 | 6 | Difference between cURL and web browser? | I am trying to retrieve a web page from the following url:
http://www.medicare.gov/find-a-doctor/provider-results.aspx?searchtype=OHP&specgrpids=922&loc=43615&pref=No&gender=Unknown&dist=25&lat=41.65603&lng=-83.66676
It works when I paste it into a browser, but when I run it through cURL, I receive a page with the following error: <b>"One or more query string parameters of requested url are invalid or has unexpected value, please correct and retry."</b>
It doesn't seem to make a difference if I provider a different userAgent or referrer. There is a redirect, so I use CURLOPT_FOLLOWLOCATION.
Here is my code:
$ch = curl_init($page);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20100101 Firefox/12.0');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$html = curl_exec($ch);
curl_close($ch);
echo $html;
Any thoughts on why a request like this will work in the browser and not with cURL? | php | curl | get | null | null | null | open | Difference between cURL and web browser?
===
I am trying to retrieve a web page from the following url:
http://www.medicare.gov/find-a-doctor/provider-results.aspx?searchtype=OHP&specgrpids=922&loc=43615&pref=No&gender=Unknown&dist=25&lat=41.65603&lng=-83.66676
It works when I paste it into a browser, but when I run it through cURL, I receive a page with the following error: <b>"One or more query string parameters of requested url are invalid or has unexpected value, please correct and retry."</b>
It doesn't seem to make a difference if I provider a different userAgent or referrer. There is a redirect, so I use CURLOPT_FOLLOWLOCATION.
Here is my code:
$ch = curl_init($page);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20100101 Firefox/12.0');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$html = curl_exec($ch);
curl_close($ch);
echo $html;
Any thoughts on why a request like this will work in the browser and not with cURL? | 0 |
11,071,916 | 06/17/2012 14:11:16 | 1,163,855 | 01/22/2012 19:56:55 | 23 | 1 | BigQuery Double Imports | I am using Google BigQuery from app engine. I have a cron job that runs every 15 minutes to do an export to BigQuery. Randomly though, the import runs twice. However, the appengine logs do not reflect this. I have a set of blobs I maintain to write data to bigquery with, and duplicate data is not being written to them. Has anyone else had bigquery problems with duplicate imports? Again, my appengine logs show the imports happening only one time, and I'm kind of at a loss how to troubleshoot. | google-bigquery | null | null | null | null | null | open | BigQuery Double Imports
===
I am using Google BigQuery from app engine. I have a cron job that runs every 15 minutes to do an export to BigQuery. Randomly though, the import runs twice. However, the appengine logs do not reflect this. I have a set of blobs I maintain to write data to bigquery with, and duplicate data is not being written to them. Has anyone else had bigquery problems with duplicate imports? Again, my appengine logs show the imports happening only one time, and I'm kind of at a loss how to troubleshoot. | 0 |
10,529,041 | 05/10/2012 07:09:55 | 1,162,402 | 01/21/2012 14:53:31 | 340 | 5 | Country List in chronological order in iphone | For country list,I have take array from Iphone itself like from
`[NSLocale ISOCountryCodes]`
It return all country code from that I got full country name with some coding in alphabetical order.
but I want that it in chronological order to display in pickerview.
can any one help me shortest way to get country list in chronological order. | iphone | ios | iphone-sdk-4.0 | null | null | 05/10/2012 13:38:34 | not a real question | Country List in chronological order in iphone
===
For country list,I have take array from Iphone itself like from
`[NSLocale ISOCountryCodes]`
It return all country code from that I got full country name with some coding in alphabetical order.
but I want that it in chronological order to display in pickerview.
can any one help me shortest way to get country list in chronological order. | 1 |
4,631,174 | 01/07/2011 23:20:52 | 480,950 | 10/19/2010 20:04:03 | 1 | 0 | no callback are called in Firefox after ajax request with jquery with 302 redirect | I have a Rails application that uses ajax extensively. With jQuery. For example one of the models is entirely managed with jQuery: records are created, updated and deleted ajaxly. Evertything works great except for updating records.
I did some testing and what I figured is that jQuery in Firefox (3.6 on Mac, 3.5 on Windows is what I've tested) has problem with detecting server's response when it's **302 redirected to the same URL**. What I get in Firebug is:
>POST localhost:3000/resources/1 -> 302 Found
>GET localhost:3000/resources/1 -> 200 OK
And no jQuery's ajax callback is called. Neither success, complete nor error.
But when I create a record and server redirects to another URL "success" callback is called:
>POST localhost:3000/resources -> 302 Found
>GET localhost:3000/resources/1 -> 200 OK
It doesn't matter if I call $.ajax myself or if I use jquery.form's ajaxForm().
Any ideas?
| jquery | ajax | http-status-code-302 | null | null | null | open | no callback are called in Firefox after ajax request with jquery with 302 redirect
===
I have a Rails application that uses ajax extensively. With jQuery. For example one of the models is entirely managed with jQuery: records are created, updated and deleted ajaxly. Evertything works great except for updating records.
I did some testing and what I figured is that jQuery in Firefox (3.6 on Mac, 3.5 on Windows is what I've tested) has problem with detecting server's response when it's **302 redirected to the same URL**. What I get in Firebug is:
>POST localhost:3000/resources/1 -> 302 Found
>GET localhost:3000/resources/1 -> 200 OK
And no jQuery's ajax callback is called. Neither success, complete nor error.
But when I create a record and server redirects to another URL "success" callback is called:
>POST localhost:3000/resources -> 302 Found
>GET localhost:3000/resources/1 -> 200 OK
It doesn't matter if I call $.ajax myself or if I use jquery.form's ajaxForm().
Any ideas?
| 0 |
8,644,597 | 12/27/2011 12:25:57 | 1,016,403 | 10/27/2011 11:50:55 | 157 | 0 | image is not displayed in html page? | I am using html. inside a table i have to display a logo. PFB code.
<table>
<tr>
<td>
<img src="C:\Documents and Settings\user\Desktop.company.jpg" />
</td>
</tr>
</table>
but image is not displayed. instead a blank image is displayed as below. ![enter image description here][1]
[1]: http://i.stack.imgur.com/LHtBh.jpg
what is wrong with my code? why actual image is not displaying here? Please help me.
Thanks! | html | null | null | null | null | null | open | image is not displayed in html page?
===
I am using html. inside a table i have to display a logo. PFB code.
<table>
<tr>
<td>
<img src="C:\Documents and Settings\user\Desktop.company.jpg" />
</td>
</tr>
</table>
but image is not displayed. instead a blank image is displayed as below. ![enter image description here][1]
[1]: http://i.stack.imgur.com/LHtBh.jpg
what is wrong with my code? why actual image is not displaying here? Please help me.
Thanks! | 0 |
8,415,774 | 12/07/2011 13:06:45 | 1,085,630 | 12/07/2011 12:55:24 | 1 | 0 | a social networking sites using Ruby on Rails | i,m planning on creating a social networking website for international students in the US with a database of schools and universities , users blogs , using RoR with, the issue is that my knowledge of programming is limited , i'm only good in HTML and CSS, do you think ill be able to learn Ruby+rails and JavaScript(Ajax) in a period of 6 month to a year to accomplish this project on my own if not ,how long would it take me to learn if i dedicated 3-4 hours every day on learning and practicing | javascript | ruby-on-rails | ruby | social-networking | null | 12/07/2011 13:11:01 | not constructive | a social networking sites using Ruby on Rails
===
i,m planning on creating a social networking website for international students in the US with a database of schools and universities , users blogs , using RoR with, the issue is that my knowledge of programming is limited , i'm only good in HTML and CSS, do you think ill be able to learn Ruby+rails and JavaScript(Ajax) in a period of 6 month to a year to accomplish this project on my own if not ,how long would it take me to learn if i dedicated 3-4 hours every day on learning and practicing | 4 |
9,179,663 | 02/07/2012 16:11:34 | 429,984 | 08/24/2010 20:15:18 | 21 | 0 | How to replace single web resources locally? | I am often working with websites to which I have no code access but for which I need to test javascripts, ajax calls and other resources in locally modified versions.
As an example I needed to test a new creative code originally coming from a DoubleClick server. Instead of working directly on DoubleClick and loose a lot of time waiting for my changes to take effect I needed to manipulate a local copy of that javascript resource.
So I changed my /etc/hosts to point the DoubleClick server to localhost where I run a local web server. This way I was able to test a local script instead of the original.
Of course this redirected all resources and not only the one i was interested in what often results in either weird behaviour as resources become unavailable or a lot of effort on my part to make them available.
Is there a way to replace a specific URL by redirecting it to a local file/URL and let all the others from the same origin be untampered? | redirect | proxy | null | null | null | null | open | How to replace single web resources locally?
===
I am often working with websites to which I have no code access but for which I need to test javascripts, ajax calls and other resources in locally modified versions.
As an example I needed to test a new creative code originally coming from a DoubleClick server. Instead of working directly on DoubleClick and loose a lot of time waiting for my changes to take effect I needed to manipulate a local copy of that javascript resource.
So I changed my /etc/hosts to point the DoubleClick server to localhost where I run a local web server. This way I was able to test a local script instead of the original.
Of course this redirected all resources and not only the one i was interested in what often results in either weird behaviour as resources become unavailable or a lot of effort on my part to make them available.
Is there a way to replace a specific URL by redirecting it to a local file/URL and let all the others from the same origin be untampered? | 0 |
2,854,234 | 05/18/2010 02:30:49 | 162,273 | 08/24/2009 20:09:02 | 934 | 52 | Help with custom asp.net two-way databinding | I hate long code snippets and I'm sorry about this one, but it turns out that this asp.net stuff can't get much shorter and it's so specific that I haven't been able to generalize it without a full code listing.
I just want simple two-way, declarative databinding to a single instance of an object. Not a list of objects of a type with a bunch of NotImplementedExceptions for Add, Delete, and Select, but just a single view-state persisted object. This is certainly something that can be done but I've struggled with an implementation for years. This newest, closest implementation was inspired by this article from 4-Guys-From-Rolla, http://msdn.microsoft.com/en-us/library/aa478964.aspx. Unfortunately, after implementing, I'm getting the following error and I don't know what I'm missing:
System.InvalidOperationException: Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.
If I don't use Bind(), and only use Eval() functionality, it works. In that way, the error is especially confusing. Here's the simplified codeset that still produces the error:
using System.ComponentModel;
namespace System.Web.UI.WebControls.Special
{
public class SampleFormData
{
public string SampleString = "Sample String Data";
public int SampleInt = -1;
}
[ToolboxItem(false)]
public class SampleSpecificFormDataContainer : WebControl, INamingContainer
{
SampleSpecificEntryForm entryForm;
internal SampleSpecificEntryForm EntryForm
{
get { return entryForm; }
}
[Bindable(true), Category("Data")]
public string SampleString
{
get { return entryForm.FormData.SampleString; }
set { entryForm.FormData.SampleString = value; }
}
[Bindable(true), Category("Data")]
public int SampleInt
{
get { return entryForm.FormData.SampleInt; }
set { entryForm.FormData.SampleInt = value; }
}
internal SampleSpecificFormDataContainer(SampleSpecificEntryForm entryForm)
{
this.entryForm = entryForm;
}
}
public class SampleSpecificEntryForm : WebControl, INamingContainer
{
#region Template
private IBindableTemplate formTemplate = null;
[Browsable(false), DefaultValue(null),
TemplateContainer(typeof(SampleSpecificFormDataContainer), ComponentModel.BindingDirection.TwoWay),
PersistenceMode(PersistenceMode.InnerProperty)]
public virtual IBindableTemplate FormTemplate
{
get { return formTemplate; }
set { formTemplate = value; }
}
#endregion
#region Viewstate
SampleFormData FormDataVS
{
get { return (ViewState["FormData"] as SampleFormData) ?? new SampleFormData(); }
set { ViewState["FormData"] = value; SaveViewState(); }
}
#endregion
public override ControlCollection Controls
{
get
{
EnsureChildControls();
return base.Controls;
}
}
private SampleSpecificFormDataContainer formDataContainer = null;
[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public SampleSpecificFormDataContainer FormDataContainer
{
get
{
EnsureChildControls();
return formDataContainer;
}
}
[Bindable(true), Browsable(false)]
public SampleFormData FormData
{
get { return FormDataVS; }
set { FormDataVS = value; }
}
protected override void CreateChildControls()
{
if (!this.ChildControlsCreated)
{
Controls.Clear();
formDataContainer = new SampleSpecificFormDataContainer(this);
Controls.Add(formDataContainer);
FormTemplate.InstantiateIn(formDataContainer);
this.ChildControlsCreated = true;
}
}
public override void DataBind()
{
CreateChildControls();
base.DataBind();
}
}
}
With an ASP.NET page the following:
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
CodeBehind="Default2.aspx.cs" Inherits="EntryFormTest._Default2" EnableEventValidation="false" %>
<%@ Register Assembly="EntryForm" Namespace="System.Web.UI.WebControls.Special" TagPrefix="cc1" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<h2>
Welcome to ASP.NET!
</h2>
<cc1:SampleSpecificEntryForm ID="EntryForm1" runat="server">
<FormTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("SampleString") %>'></asp:TextBox><br />
<h3>(<%# Container.SampleString %>)</h3><br />
<asp:Button ID="Button1" runat="server" Text="Button" />
</FormTemplate>
</cc1:SampleSpecificEntryForm>
</asp:Content>
Default2.aspx.cs
using System;
namespace EntryFormTest
{
public partial class _Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
EntryForm1.DataBind();
}
}
}
Thanks for any help! | asp.net | two-way-object-databindin | c# | ibindabletemplate | null | null | open | Help with custom asp.net two-way databinding
===
I hate long code snippets and I'm sorry about this one, but it turns out that this asp.net stuff can't get much shorter and it's so specific that I haven't been able to generalize it without a full code listing.
I just want simple two-way, declarative databinding to a single instance of an object. Not a list of objects of a type with a bunch of NotImplementedExceptions for Add, Delete, and Select, but just a single view-state persisted object. This is certainly something that can be done but I've struggled with an implementation for years. This newest, closest implementation was inspired by this article from 4-Guys-From-Rolla, http://msdn.microsoft.com/en-us/library/aa478964.aspx. Unfortunately, after implementing, I'm getting the following error and I don't know what I'm missing:
System.InvalidOperationException: Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.
If I don't use Bind(), and only use Eval() functionality, it works. In that way, the error is especially confusing. Here's the simplified codeset that still produces the error:
using System.ComponentModel;
namespace System.Web.UI.WebControls.Special
{
public class SampleFormData
{
public string SampleString = "Sample String Data";
public int SampleInt = -1;
}
[ToolboxItem(false)]
public class SampleSpecificFormDataContainer : WebControl, INamingContainer
{
SampleSpecificEntryForm entryForm;
internal SampleSpecificEntryForm EntryForm
{
get { return entryForm; }
}
[Bindable(true), Category("Data")]
public string SampleString
{
get { return entryForm.FormData.SampleString; }
set { entryForm.FormData.SampleString = value; }
}
[Bindable(true), Category("Data")]
public int SampleInt
{
get { return entryForm.FormData.SampleInt; }
set { entryForm.FormData.SampleInt = value; }
}
internal SampleSpecificFormDataContainer(SampleSpecificEntryForm entryForm)
{
this.entryForm = entryForm;
}
}
public class SampleSpecificEntryForm : WebControl, INamingContainer
{
#region Template
private IBindableTemplate formTemplate = null;
[Browsable(false), DefaultValue(null),
TemplateContainer(typeof(SampleSpecificFormDataContainer), ComponentModel.BindingDirection.TwoWay),
PersistenceMode(PersistenceMode.InnerProperty)]
public virtual IBindableTemplate FormTemplate
{
get { return formTemplate; }
set { formTemplate = value; }
}
#endregion
#region Viewstate
SampleFormData FormDataVS
{
get { return (ViewState["FormData"] as SampleFormData) ?? new SampleFormData(); }
set { ViewState["FormData"] = value; SaveViewState(); }
}
#endregion
public override ControlCollection Controls
{
get
{
EnsureChildControls();
return base.Controls;
}
}
private SampleSpecificFormDataContainer formDataContainer = null;
[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public SampleSpecificFormDataContainer FormDataContainer
{
get
{
EnsureChildControls();
return formDataContainer;
}
}
[Bindable(true), Browsable(false)]
public SampleFormData FormData
{
get { return FormDataVS; }
set { FormDataVS = value; }
}
protected override void CreateChildControls()
{
if (!this.ChildControlsCreated)
{
Controls.Clear();
formDataContainer = new SampleSpecificFormDataContainer(this);
Controls.Add(formDataContainer);
FormTemplate.InstantiateIn(formDataContainer);
this.ChildControlsCreated = true;
}
}
public override void DataBind()
{
CreateChildControls();
base.DataBind();
}
}
}
With an ASP.NET page the following:
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
CodeBehind="Default2.aspx.cs" Inherits="EntryFormTest._Default2" EnableEventValidation="false" %>
<%@ Register Assembly="EntryForm" Namespace="System.Web.UI.WebControls.Special" TagPrefix="cc1" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<h2>
Welcome to ASP.NET!
</h2>
<cc1:SampleSpecificEntryForm ID="EntryForm1" runat="server">
<FormTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("SampleString") %>'></asp:TextBox><br />
<h3>(<%# Container.SampleString %>)</h3><br />
<asp:Button ID="Button1" runat="server" Text="Button" />
</FormTemplate>
</cc1:SampleSpecificEntryForm>
</asp:Content>
Default2.aspx.cs
using System;
namespace EntryFormTest
{
public partial class _Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
EntryForm1.DataBind();
}
}
}
Thanks for any help! | 0 |
1,590,408 | 10/19/2009 18:50:56 | 192,626 | 10/19/2009 18:50:56 | 1 | 0 | need help with what direction to go in for a project | ive been given the following scenario and am not to sure what programing languages to use, i have used c# for a similar project but am not sure about the mobile phone part, i dont really need a full on answer just a push in the right direction.
The aim of this project is to produce a server for monitoring home
security. The server should have a broadband connection to the Internet,
a connection to an existing intruder alarm system and a connection to an
existing doorbell. If the alarm system detects an intruder then the
server should use an embedded GSM mobile phone module to send a warning
text message to the householder's mobile phone. The householder should
then be able to view moving images from at least 3 webcams on the mobile
phone via the Internet.
If a caller rings the front doorbell, the server should send a text
message to the householder's mobile phone. The householder should then
be able to phone the embedded GSM mobile phone module at the house and
speak to the caller at the front door so that it appears that there is
someone at home who is speaking to the caller via an intercom.
| home | security | null | null | null | 06/07/2012 14:27:59 | not a real question | need help with what direction to go in for a project
===
ive been given the following scenario and am not to sure what programing languages to use, i have used c# for a similar project but am not sure about the mobile phone part, i dont really need a full on answer just a push in the right direction.
The aim of this project is to produce a server for monitoring home
security. The server should have a broadband connection to the Internet,
a connection to an existing intruder alarm system and a connection to an
existing doorbell. If the alarm system detects an intruder then the
server should use an embedded GSM mobile phone module to send a warning
text message to the householder's mobile phone. The householder should
then be able to view moving images from at least 3 webcams on the mobile
phone via the Internet.
If a caller rings the front doorbell, the server should send a text
message to the householder's mobile phone. The householder should then
be able to phone the embedded GSM mobile phone module at the house and
speak to the caller at the front door so that it appears that there is
someone at home who is speaking to the caller via an intercom.
| 1 |
2,340,139 | 02/26/2010 07:45:11 | 195,093 | 10/23/2009 05:51:26 | 1 | 0 | Dependency propery for ValueConverter or rebind control? | I have custom control with some text in content template:
<ControlTemplate TargetType="{x:Type local:TouchScreenKey}">
<TextBlock><ContentPresenter Content="{TemplateBinding Title, Converter={StaticResource CaseConverter}}" /></TextBlock>
</ControlTemplate>
and custom IValueConverter CaseConverter - with property UpperCase. So, when UpperCase property of converter set to true it converts text to upper case on binding. Everything goes fine if I change UpperCase in markup. But if i change property in runtime - nothing happens - because changing converter property not force my control to rebind.
How can I rebind control which uses converter on converter's property change? | wpf | ivalueconverter | text | case | binding | null | open | Dependency propery for ValueConverter or rebind control?
===
I have custom control with some text in content template:
<ControlTemplate TargetType="{x:Type local:TouchScreenKey}">
<TextBlock><ContentPresenter Content="{TemplateBinding Title, Converter={StaticResource CaseConverter}}" /></TextBlock>
</ControlTemplate>
and custom IValueConverter CaseConverter - with property UpperCase. So, when UpperCase property of converter set to true it converts text to upper case on binding. Everything goes fine if I change UpperCase in markup. But if i change property in runtime - nothing happens - because changing converter property not force my control to rebind.
How can I rebind control which uses converter on converter's property change? | 0 |
11,609,631 | 07/23/2012 09:19:02 | 1,545,364 | 07/23/2012 08:53:50 | 1 | 0 | How to create a GUI in HTML5 using webkit for an embedded device | I want to implement a HTML5 basd GUI using webkit for an embedded device (ARM development board running Angstrom) but could not find any resource on the net. These are the problem areas
1. Integrating webkit to the linux distribution
2. If I implement a GUI using any of the HTML5 editor (e.g bluegriffon). How do I integrate this into the platfrom
Any resources/links would be very helpful
Thanks | html5 | null | null | null | null | 07/23/2012 23:14:09 | not a real question | How to create a GUI in HTML5 using webkit for an embedded device
===
I want to implement a HTML5 basd GUI using webkit for an embedded device (ARM development board running Angstrom) but could not find any resource on the net. These are the problem areas
1. Integrating webkit to the linux distribution
2. If I implement a GUI using any of the HTML5 editor (e.g bluegriffon). How do I integrate this into the platfrom
Any resources/links would be very helpful
Thanks | 1 |
11,736,450 | 07/31/2012 08:53:43 | 1,565,177 | 07/31/2012 08:48:46 | 1 | 0 | ssh in cygwin doesn't work | In cygwin:
>$ ssh login@host
>Pseudo-terminal will not be allocated because stdin is not a terminal.
-T, -tt, -t didn't help | ssh | cygwin | null | null | null | 07/31/2012 19:19:01 | off topic | ssh in cygwin doesn't work
===
In cygwin:
>$ ssh login@host
>Pseudo-terminal will not be allocated because stdin is not a terminal.
-T, -tt, -t didn't help | 2 |
10,558,578 | 05/11/2012 21:01:19 | 898,390 | 08/17/2011 10:00:27 | 461 | 14 | Duplicate error: C file include | One of my questions, as I'm pretty new to C is about ways to avoid getting the duplication error. Basically, when I build the project in Netbeans if I have the file in the project and also include it, I get that error.
Defining the functions static, is a correct way to avoid it? What other solutions are there? Thanks | c | null | null | null | null | null | open | Duplicate error: C file include
===
One of my questions, as I'm pretty new to C is about ways to avoid getting the duplication error. Basically, when I build the project in Netbeans if I have the file in the project and also include it, I get that error.
Defining the functions static, is a correct way to avoid it? What other solutions are there? Thanks | 0 |
10,218,409 | 04/18/2012 21:36:12 | 1,319,512 | 04/07/2012 19:22:11 | 13 | 0 | ASP.NET MVC VS HTML/Web Services | Before all, I just want to make sure that everyone here understands that this is just a question, and that I am in no way trying to get any technology down.
Last time I used ASP.NET was in 2006, and even then, I did not used most of the things that ASP.NET makes available. I did not use Web Forms, did not use any Integrated Security features, nothing. I was asked to develop an intranet application, and the only requirement was that, it had to be built in ASP.NET. Well I had worked before with classic ASP, but after that moved to the Java world, and done some development using Servlets with MVC patterns, hence I was quite reluctant to use any Web Forms stuff. So instead, I did all of the front end development using JavaScript with AJAX calls to empty ASP.Net pages, which were acting like Controllers. In the end everybody was happy, we did have a very nice laid interface which was also very fast, and I was also happy because I had not been forced to use Web Forms. I haven't worked with ASP.NET ever since, I've been working mainly with Windows Forms, and since 2009, I moved to WPF/Silverlight development, so as it seems I did miss a couple of things when it comes to Web Development. The truth is that nowadays, I hear a lot of developers talking about MVC, like if it was something out of this world, but I really cannot understand all this hype.
If I was asked to build a web site, I would use, plain HTML/JavaScript/Ajax, with some REST web services in the back-end, I guess a lot of people would do it this way too, but what I cannot understand is why are people using ASP.NET MVC, what does it bring?
I can understand people using, now classic ASP.NET, because by using Web Forms, development for less experienced web developers is a lot easier and faster, but when it comes down to ASP.NET MVC, I am completely lost.
Am I missing something here?
Thanks,
Marco | asp.net | asp.net-mvc | web-services | null | null | 04/19/2012 12:34:54 | not constructive | ASP.NET MVC VS HTML/Web Services
===
Before all, I just want to make sure that everyone here understands that this is just a question, and that I am in no way trying to get any technology down.
Last time I used ASP.NET was in 2006, and even then, I did not used most of the things that ASP.NET makes available. I did not use Web Forms, did not use any Integrated Security features, nothing. I was asked to develop an intranet application, and the only requirement was that, it had to be built in ASP.NET. Well I had worked before with classic ASP, but after that moved to the Java world, and done some development using Servlets with MVC patterns, hence I was quite reluctant to use any Web Forms stuff. So instead, I did all of the front end development using JavaScript with AJAX calls to empty ASP.Net pages, which were acting like Controllers. In the end everybody was happy, we did have a very nice laid interface which was also very fast, and I was also happy because I had not been forced to use Web Forms. I haven't worked with ASP.NET ever since, I've been working mainly with Windows Forms, and since 2009, I moved to WPF/Silverlight development, so as it seems I did miss a couple of things when it comes to Web Development. The truth is that nowadays, I hear a lot of developers talking about MVC, like if it was something out of this world, but I really cannot understand all this hype.
If I was asked to build a web site, I would use, plain HTML/JavaScript/Ajax, with some REST web services in the back-end, I guess a lot of people would do it this way too, but what I cannot understand is why are people using ASP.NET MVC, what does it bring?
I can understand people using, now classic ASP.NET, because by using Web Forms, development for less experienced web developers is a lot easier and faster, but when it comes down to ASP.NET MVC, I am completely lost.
Am I missing something here?
Thanks,
Marco | 4 |
8,322,968 | 11/30/2011 08:25:30 | 1,072,908 | 11/30/2011 08:18:19 | 1 | 0 | How to display arraylist class in a list view with a parameter of the arraylist class | I have this array list. Currently it displays random ID like names on the list
package try.project;
import java.util.ArrayList;
public class ProductList {
ArrayList<Product> list;
public ProductList (){
list = new ArrayList<Product>();
//CREATE PRODUCT HERE
Product basketball;
list.add(new Product("basketball",99));
Product rice;
list.add(new soccer("soccer",11));
}
Then this is my arraylist
public class ProductListView extends ListActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ProductList pl = new ProductList();
//setListAdapter(new ArrayAdapter<String>(this, R.layout.list_item, PRODUCTS));
setListAdapter(new ArrayAdapter<Product>(this, R.layout.list_item, pl.getList() ));
ListView lv = getListView();
lv.setTextFilterEnabled(true);
lv.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
// When clicked, show a toast with the TextView text
Toast.makeText(getApplicationContext(), "View Product", Toast.LENGTH_SHORT).show();
startActivity(new Intent("kfc.project.PRODUCTDETAIL"));
}
});
}
It is made up of a class with parameters like name, age etc. I want to display a parameter name | java | android | eclipse | listview | arraylist | 11/30/2011 15:12:19 | not a real question | How to display arraylist class in a list view with a parameter of the arraylist class
===
I have this array list. Currently it displays random ID like names on the list
package try.project;
import java.util.ArrayList;
public class ProductList {
ArrayList<Product> list;
public ProductList (){
list = new ArrayList<Product>();
//CREATE PRODUCT HERE
Product basketball;
list.add(new Product("basketball",99));
Product rice;
list.add(new soccer("soccer",11));
}
Then this is my arraylist
public class ProductListView extends ListActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ProductList pl = new ProductList();
//setListAdapter(new ArrayAdapter<String>(this, R.layout.list_item, PRODUCTS));
setListAdapter(new ArrayAdapter<Product>(this, R.layout.list_item, pl.getList() ));
ListView lv = getListView();
lv.setTextFilterEnabled(true);
lv.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
// When clicked, show a toast with the TextView text
Toast.makeText(getApplicationContext(), "View Product", Toast.LENGTH_SHORT).show();
startActivity(new Intent("kfc.project.PRODUCTDETAIL"));
}
});
}
It is made up of a class with parameters like name, age etc. I want to display a parameter name | 1 |
6,984,042 | 08/08/2011 14:56:44 | 727,074 | 04/27/2011 10:52:56 | 170 | 22 | Currently available cross-browser nine-patch solution for border-radius | I've recently developed for Android and discovered how great 9-patch is. I wondered could it be used in web design, so did [zng](http://stackoverflow.com/questions/3659457/nine-patch-images-for-web-development); the answer is yes.
My question now is, is there anything (a jQuery plugin possibly) out there right now which uses the 9-patch technique to tackle border-radius' lack of cross-browser compatibility, specifically IE? | javascript | jquery | css | border-radius | nine-patch | null | open | Currently available cross-browser nine-patch solution for border-radius
===
I've recently developed for Android and discovered how great 9-patch is. I wondered could it be used in web design, so did [zng](http://stackoverflow.com/questions/3659457/nine-patch-images-for-web-development); the answer is yes.
My question now is, is there anything (a jQuery plugin possibly) out there right now which uses the 9-patch technique to tackle border-radius' lack of cross-browser compatibility, specifically IE? | 0 |
6,295,210 | 06/09/2011 15:19:23 | 540,798 | 12/13/2010 16:48:22 | 104 | 1 | Any suggestions on the sort of application that is best suited for a data structures project | After learning data structures I thought to start developing an application (that covers the trees and graph concepts) so that I can be strong in that subject area.
Any suggestions on the sort of application that is best suited for an intensive use of the data structures.
Note: I am ready for any further research of other subjects that may require for this project
and it is not a college project.
Thanks | algorithm | data-structures | null | null | null | 08/13/2011 23:18:35 | not constructive | Any suggestions on the sort of application that is best suited for a data structures project
===
After learning data structures I thought to start developing an application (that covers the trees and graph concepts) so that I can be strong in that subject area.
Any suggestions on the sort of application that is best suited for an intensive use of the data structures.
Note: I am ready for any further research of other subjects that may require for this project
and it is not a college project.
Thanks | 4 |
11,305,905 | 07/03/2012 06:56:13 | 857,628 | 04/05/2011 06:26:22 | 71 | 0 | populate dropdown from database in codeigniter | I have a table in that table have 3 field (category1,category2,category3).Now i want to populate the Dropdown if dropdown one select ,dropdown 2 values will genarat from the data base . Can any one help me.
My Controller
$this->load->model('quiz_mode');
$arrStates = $this->quiz_mode->get_unique_catg1();
foreach ($arrStates as $states)
{
$arrFinal[$states->quiz_category1 ] = $states->quiz_category1 ;
}
$data['states'] = $arrFinal;
function ajax_call()
{
//Checking so that people cannot go to the page directly.
if (isset($_POST) && isset($_POST['quiz_category1']))
{
$catogory = $_POST['quiz_category1'];
$arrcategory = $this->quiz_mode->get_cities_from_catgo1($catogory);
foreach ($arrcategory as $category)
{
$arrFinal[$category->quiz_category2] = $category->quiz_category2;
}
//Using the form_dropdown helper function to get the new dropdown.
print form_dropdown('category2',$arrFinal);
}
else
{
redirect('logged_in_user'); //Else redire to the site home page.
}
}
My Model
function get_unique_catg1()
{
$query = $this->db->query("SELECT DISTINCT category1 FROM sampl_table");
if ($query->num_rows > 0) {
return $query->result();
}
}
function get_cities_from_catgo1($category) {
$query = $this->db->query("SELECT category2 FROM sampl_table WHERE category2 = '{$category}'");
if ($query->num_rows > 0) {
return $query->result();
}
}
My view
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>untitled</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#catgo1-dropdown').change(function () {
var selCat1 = $('#catgo1-dropdown').val();
console.log(selCat1);
$.ajax({
url: "<?php echo base_url();?>index.php/sample/ajax_call", //The url where the server req would we made.
async: false,
type: "POST", //The type which you want to use: GET/POST
data: "category1="+selCat1, //The variables which are going.
dataType: "html", //Return data type (what we expect).
//This is the function which will be called if ajax call is successful.
success: function(data) {
//data is the html of the page where the request is made.
$('#cotegory').html(data);
}
})
});
});
</script>
</head>
<body>
<div id="wrapper">
<div id="catgo1-dropdown"><?php print form_dropdown('quiz_category1'); ?></div>
<div id="cotegory2"></div>
</div>
</body>
</html> | codeigniter | null | null | null | null | null | open | populate dropdown from database in codeigniter
===
I have a table in that table have 3 field (category1,category2,category3).Now i want to populate the Dropdown if dropdown one select ,dropdown 2 values will genarat from the data base . Can any one help me.
My Controller
$this->load->model('quiz_mode');
$arrStates = $this->quiz_mode->get_unique_catg1();
foreach ($arrStates as $states)
{
$arrFinal[$states->quiz_category1 ] = $states->quiz_category1 ;
}
$data['states'] = $arrFinal;
function ajax_call()
{
//Checking so that people cannot go to the page directly.
if (isset($_POST) && isset($_POST['quiz_category1']))
{
$catogory = $_POST['quiz_category1'];
$arrcategory = $this->quiz_mode->get_cities_from_catgo1($catogory);
foreach ($arrcategory as $category)
{
$arrFinal[$category->quiz_category2] = $category->quiz_category2;
}
//Using the form_dropdown helper function to get the new dropdown.
print form_dropdown('category2',$arrFinal);
}
else
{
redirect('logged_in_user'); //Else redire to the site home page.
}
}
My Model
function get_unique_catg1()
{
$query = $this->db->query("SELECT DISTINCT category1 FROM sampl_table");
if ($query->num_rows > 0) {
return $query->result();
}
}
function get_cities_from_catgo1($category) {
$query = $this->db->query("SELECT category2 FROM sampl_table WHERE category2 = '{$category}'");
if ($query->num_rows > 0) {
return $query->result();
}
}
My view
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>untitled</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#catgo1-dropdown').change(function () {
var selCat1 = $('#catgo1-dropdown').val();
console.log(selCat1);
$.ajax({
url: "<?php echo base_url();?>index.php/sample/ajax_call", //The url where the server req would we made.
async: false,
type: "POST", //The type which you want to use: GET/POST
data: "category1="+selCat1, //The variables which are going.
dataType: "html", //Return data type (what we expect).
//This is the function which will be called if ajax call is successful.
success: function(data) {
//data is the html of the page where the request is made.
$('#cotegory').html(data);
}
})
});
});
</script>
</head>
<body>
<div id="wrapper">
<div id="catgo1-dropdown"><?php print form_dropdown('quiz_category1'); ?></div>
<div id="cotegory2"></div>
</div>
</body>
</html> | 0 |
10,112,581 | 04/11/2012 19:26:13 | 955,413 | 09/20/2011 18:30:35 | 1 | 1 | How to evaluate potentially undeclared variable's properties? | I have a variable that in some cases isn't declared, and I want to use it in a jQuery template. This is what I am trying to achieve, but it throws an *payment_method is not defined* exception:
{{if payment_method && (payment_method.id == $value.id)}}
// this throws an exception when payment_method is undeclared!
{{/if}}
This works:
{{if payment_method }}
{{if payment_method.id == $value.id}}
// nested works!
{{/if}}
{{/if}}
but I'm not too keen of a nested solution since I use it alot. I clearly understand why the first case throws the error, what I am looking for is a possible workaround for this without resorting to the second solution.
This issue probably boils down to problems in js to check properties for undeclared/undefined variables. This works:
if("undefined" !== typeof undefinedVariable) {
// this works just fine also for undeclared variables
}
but this doesn't:
if("undefined" !== typeof undefinedVariable.property) {
// this throws an exception
}
Any ideas? | javascript | undefined | jquery-templates | jquery-tmpl | null | null | open | How to evaluate potentially undeclared variable's properties?
===
I have a variable that in some cases isn't declared, and I want to use it in a jQuery template. This is what I am trying to achieve, but it throws an *payment_method is not defined* exception:
{{if payment_method && (payment_method.id == $value.id)}}
// this throws an exception when payment_method is undeclared!
{{/if}}
This works:
{{if payment_method }}
{{if payment_method.id == $value.id}}
// nested works!
{{/if}}
{{/if}}
but I'm not too keen of a nested solution since I use it alot. I clearly understand why the first case throws the error, what I am looking for is a possible workaround for this without resorting to the second solution.
This issue probably boils down to problems in js to check properties for undeclared/undefined variables. This works:
if("undefined" !== typeof undefinedVariable) {
// this works just fine also for undeclared variables
}
but this doesn't:
if("undefined" !== typeof undefinedVariable.property) {
// this throws an exception
}
Any ideas? | 0 |
6,308,567 | 06/10/2011 15:28:34 | 508,248 | 11/15/2010 12:39:32 | 26 | 0 | Is JQuery considered to be outdated? | This may be an open and close case but may open some debate. I was speaking with my friend recently who said to me `"JQuery is so 2008"` Now while I don't pretend to know a whole lot about this language (Or JavaScript for that matter), I have used both for projects that I have done in the past. So my question is, is this Framework still widely used? Are there newer more "2011" frameworks?
I see that this may be a daft question, as different frameworks have different uses but I have seen a lot of large companies have used JQuery on their site which leads me to believe that of course it has it's uses (as does any other language).
What's the general consensus among designers/developers? Is it outdated? Is it still widely used in industry?
EDIT: The reason I ask this is because all the time I've searched for things JQuery related the articles that come up first seem to be dated back a few years... | jquery | null | null | null | null | 06/10/2011 15:33:33 | not constructive | Is JQuery considered to be outdated?
===
This may be an open and close case but may open some debate. I was speaking with my friend recently who said to me `"JQuery is so 2008"` Now while I don't pretend to know a whole lot about this language (Or JavaScript for that matter), I have used both for projects that I have done in the past. So my question is, is this Framework still widely used? Are there newer more "2011" frameworks?
I see that this may be a daft question, as different frameworks have different uses but I have seen a lot of large companies have used JQuery on their site which leads me to believe that of course it has it's uses (as does any other language).
What's the general consensus among designers/developers? Is it outdated? Is it still widely used in industry?
EDIT: The reason I ask this is because all the time I've searched for things JQuery related the articles that come up first seem to be dated back a few years... | 4 |
9,215,432 | 02/09/2012 17:10:06 | 501,211 | 11/08/2010 21:57:46 | 35 | 2 | SQL Group By - Get unique key of every type | I have a problem with this SQL Grouping.
If i have a table with 3 columns. Key is a unique key for every record. Type is the type of record and Version is the version of the type.
ID Type Version
------------------------
1 A 200
2 A 100
3 B 200
4 B 200
5 B 100
I need to get 1 row for each version of each type
so it would look something like
ID Type Version
------------------------
1 A 200
2 A 100
3 B 200
5 B 100
I know I need to group by the Type and version but I cant seem to figure out how to get the unique key for each Type and Version since they are on the same table
SELECT Type, Version FROM TableName GROUP BY Type, Version
Gets me all the unique Types and Versions, but I cant figure out how to finish off the query.
| sql | sql-server-2008 | tsql | group-by | null | null | open | SQL Group By - Get unique key of every type
===
I have a problem with this SQL Grouping.
If i have a table with 3 columns. Key is a unique key for every record. Type is the type of record and Version is the version of the type.
ID Type Version
------------------------
1 A 200
2 A 100
3 B 200
4 B 200
5 B 100
I need to get 1 row for each version of each type
so it would look something like
ID Type Version
------------------------
1 A 200
2 A 100
3 B 200
5 B 100
I know I need to group by the Type and version but I cant seem to figure out how to get the unique key for each Type and Version since they are on the same table
SELECT Type, Version FROM TableName GROUP BY Type, Version
Gets me all the unique Types and Versions, but I cant figure out how to finish off the query.
| 0 |
10,721,148 | 05/23/2012 13:37:42 | 886,669 | 08/09/2011 19:51:39 | 1,189 | 18 | How to implement thread safe queues in C | I have used multithreading library before in Python, but this is the first time I am trying threading in C. I want to create pool of workers. In turn, these workers supposed to push to or pop from queue.Following code is not quite there yet, but is what I have done so far:
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#define NUMTHREADS 20 /* number of threads to create */
typedef struct node node;
typedef struct queue queue;
struct node {
char *name;
node *next;
};
struct queue {
node *head;
node *tail;
};
/* pop: remove and return first name from a queue */
char *pop(queue *q)
{
if (q->head == NULL)
return NULL;
char *name = q->head->name;
node *tmp = q->head;
q->head = q->head->next;
free(tmp);
return name;
}
/* push: add name to the end of the queue */
int push(queue *q, char *name)
{
node *new = malloc(sizeof(node));
if (new == NULL)
return -1;
new->name = name;
new->next = NULL;
if (q->tail != NULL)
q->tail->next = new;
q->tail = new;
if (q->head == NULL) /* first value */
q->head = new;
return 0;
}
/* printname: get a name from the queue, and print it. */
void *printname(void *sharedQ)
{
queue *q = (queue *) sharedQ;
char *name = pop(q);
if (name == NULL)
pthread_exit(NULL);
printf("%s\n",name);
pthread_exit(NULL);
}
int main()
{
size_t i;
int rc;
pthread_t threads[NUMTHREADS];
char *names[] = {
"yasar",
"arabaci",
"osman",
"ahmet",
"mehmet",
"zeliha"
};
queue *q = malloc(sizeof(queue));
q->head = NULL;
q->tail = NULL;
/* number of elements in the array */
size_t numelems = sizeof(names) / sizeof(char *);
for (i = 0; i < numelems; i++) /* push each name */
push(q, names[i]);
for (i = 0; i < NUMTHREADS; i++) { /* fire up threads */
rc = pthread_create(&threads[i], NULL, printname,
(void *)q);
if (rc) {
printf("Error, return code from pthread is %d\n", rc);
exit(-1);
}
}
pthread_exit(NULL);
}
I tried above code, and it always printed each name exactly once. It didn't skip any names, or printed same name twice. On the other hand, I am not sure how thread safe this queue implementation is. So my question is, Is this a threadsafe queue? If not, why not? And how to make it thread safe? | c | multithreading | pthreads | queue | posix | null | open | How to implement thread safe queues in C
===
I have used multithreading library before in Python, but this is the first time I am trying threading in C. I want to create pool of workers. In turn, these workers supposed to push to or pop from queue.Following code is not quite there yet, but is what I have done so far:
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#define NUMTHREADS 20 /* number of threads to create */
typedef struct node node;
typedef struct queue queue;
struct node {
char *name;
node *next;
};
struct queue {
node *head;
node *tail;
};
/* pop: remove and return first name from a queue */
char *pop(queue *q)
{
if (q->head == NULL)
return NULL;
char *name = q->head->name;
node *tmp = q->head;
q->head = q->head->next;
free(tmp);
return name;
}
/* push: add name to the end of the queue */
int push(queue *q, char *name)
{
node *new = malloc(sizeof(node));
if (new == NULL)
return -1;
new->name = name;
new->next = NULL;
if (q->tail != NULL)
q->tail->next = new;
q->tail = new;
if (q->head == NULL) /* first value */
q->head = new;
return 0;
}
/* printname: get a name from the queue, and print it. */
void *printname(void *sharedQ)
{
queue *q = (queue *) sharedQ;
char *name = pop(q);
if (name == NULL)
pthread_exit(NULL);
printf("%s\n",name);
pthread_exit(NULL);
}
int main()
{
size_t i;
int rc;
pthread_t threads[NUMTHREADS];
char *names[] = {
"yasar",
"arabaci",
"osman",
"ahmet",
"mehmet",
"zeliha"
};
queue *q = malloc(sizeof(queue));
q->head = NULL;
q->tail = NULL;
/* number of elements in the array */
size_t numelems = sizeof(names) / sizeof(char *);
for (i = 0; i < numelems; i++) /* push each name */
push(q, names[i]);
for (i = 0; i < NUMTHREADS; i++) { /* fire up threads */
rc = pthread_create(&threads[i], NULL, printname,
(void *)q);
if (rc) {
printf("Error, return code from pthread is %d\n", rc);
exit(-1);
}
}
pthread_exit(NULL);
}
I tried above code, and it always printed each name exactly once. It didn't skip any names, or printed same name twice. On the other hand, I am not sure how thread safe this queue implementation is. So my question is, Is this a threadsafe queue? If not, why not? And how to make it thread safe? | 0 |
11,227,822 | 06/27/2012 13:52:21 | 1,485,833 | 06/27/2012 13:42:33 | 1 | 0 | How to implement equalizer for iphone app? | plz i'm working in app for record voice and make it playback and i want sample codes for implementing effects in this recording like change in the frequency ..
can any one help ? | iphone | core-audio | null | null | null | 06/27/2012 20:23:50 | not a real question | How to implement equalizer for iphone app?
===
plz i'm working in app for record voice and make it playback and i want sample codes for implementing effects in this recording like change in the frequency ..
can any one help ? | 1 |
7,489,371 | 09/20/2011 17:41:23 | 955,318 | 09/20/2011 17:30:34 | 1 | 0 | Programming for serial data | I'd like to ask which programming language you would recommend if I'm trying to accumulate data from a serial device. An example is a weather station which outputs temperature, humidity, and etc in every set time interval. I'm thinking of graphing it. (e.g. temperature vs. time).
Thanks in advance.
| database | web-development | serialization | serial-port | serial | 09/20/2011 21:34:56 | not constructive | Programming for serial data
===
I'd like to ask which programming language you would recommend if I'm trying to accumulate data from a serial device. An example is a weather station which outputs temperature, humidity, and etc in every set time interval. I'm thinking of graphing it. (e.g. temperature vs. time).
Thanks in advance.
| 4 |
2,571,426 | 04/03/2010 13:58:54 | 6,939 | 09/15/2008 12:52:05 | 90 | 10 | IE6 Hacks: Getting jQuery tools expose to work properly on my site | I am trying to get the jQuery tools 'expose' function to work properly in IE6. The page is http://204.51.246.10:12123/
You will need IE6 to reproduce the bug (obviously :)). If you click 'Sign In' on the top-right corner (below the 'Join Today!' button), you will notice that the sign in panel (fieldset#login-controls) is getting covered by the background of its parent element (.signinPanel), which is very weird. It is not on the top of z-index, and I can't figure out why.
Please note that in order to get fieldset#login-controls positioned correctly, I have applied the following hack for IE6:
$("#header, #header div, #header table, #header td, #header tr").css("position", "static");
$("fieldset#login-controls *").css("position", "static");
This might be the reason for the above. I am pretty lost at this point, as I can't figure what's going on - any advise would be appreciated.
Cheers,
Wild Thing | ie6-bug | jquery | javascript | css | null | null | open | IE6 Hacks: Getting jQuery tools expose to work properly on my site
===
I am trying to get the jQuery tools 'expose' function to work properly in IE6. The page is http://204.51.246.10:12123/
You will need IE6 to reproduce the bug (obviously :)). If you click 'Sign In' on the top-right corner (below the 'Join Today!' button), you will notice that the sign in panel (fieldset#login-controls) is getting covered by the background of its parent element (.signinPanel), which is very weird. It is not on the top of z-index, and I can't figure out why.
Please note that in order to get fieldset#login-controls positioned correctly, I have applied the following hack for IE6:
$("#header, #header div, #header table, #header td, #header tr").css("position", "static");
$("fieldset#login-controls *").css("position", "static");
This might be the reason for the above. I am pretty lost at this point, as I can't figure what's going on - any advise would be appreciated.
Cheers,
Wild Thing | 0 |
9,152,686 | 02/05/2012 20:23:45 | 514,757 | 11/20/2010 22:56:06 | 45 | 1 | Use GeoNames Java API to retrieve coordinates given Wikipedia article title | Say I have the title of a Wikipedia article, e.g. Philadelphia, and I want the coordinates of that place. I don't want to get this from Wikipedia because it looks like I'd have to retrieve the whole article. And I don't want to just loosely query GeoNames for places "like philadelphia" because that will have lots of results, and I know I want the specific Wikipedia article [[Philadelphia]]'s coordinates.
It seems like the GeoNames API allows you to do this with the class [WikipediaArticle][1] and its methods like setTitle() and getLatitude(). But I've been fiddling around with that class and [WebService][2] and haven't been able to retrieve the coordinates that way. I won't bore you with all the combinations I've tried, but I can't find an example of how to do it. Something like:
WebService.setUserName("whateveritis");
List<WikipediaArticle> wikiResults = WebService.wikipediaSearchForTitle(
"Philadelphia","en");
for (WikipediaArticle r : wikiResults) {
System.out.println(r.getLatitude());
}
That gives a lot of errors, that I can share, but make me think I'm just using it wrong. Or maybe:
WikipediaArticle myPlace = new WikipediaArticle();
myPlace.setTitle("Philadelphia");
Double lat = myPlace.getLatitude();
This returns 0.0. Is anyone familiar with API and can tell me where I'm going wrong? I do think it's meant to do stuff like this because the web version does it: http://api.geonames.org/wikipediaSearch?title=Philadelphia&maxRows=1&username=demo
[1]: http://www.geonames.org/source-code/javadoc/org/geonames/WikipediaArticle.html
[2]: http://www.geonames.org/source-code/javadoc/org/geonames/WebService.html | wikipedia | geonames | null | null | null | null | open | Use GeoNames Java API to retrieve coordinates given Wikipedia article title
===
Say I have the title of a Wikipedia article, e.g. Philadelphia, and I want the coordinates of that place. I don't want to get this from Wikipedia because it looks like I'd have to retrieve the whole article. And I don't want to just loosely query GeoNames for places "like philadelphia" because that will have lots of results, and I know I want the specific Wikipedia article [[Philadelphia]]'s coordinates.
It seems like the GeoNames API allows you to do this with the class [WikipediaArticle][1] and its methods like setTitle() and getLatitude(). But I've been fiddling around with that class and [WebService][2] and haven't been able to retrieve the coordinates that way. I won't bore you with all the combinations I've tried, but I can't find an example of how to do it. Something like:
WebService.setUserName("whateveritis");
List<WikipediaArticle> wikiResults = WebService.wikipediaSearchForTitle(
"Philadelphia","en");
for (WikipediaArticle r : wikiResults) {
System.out.println(r.getLatitude());
}
That gives a lot of errors, that I can share, but make me think I'm just using it wrong. Or maybe:
WikipediaArticle myPlace = new WikipediaArticle();
myPlace.setTitle("Philadelphia");
Double lat = myPlace.getLatitude();
This returns 0.0. Is anyone familiar with API and can tell me where I'm going wrong? I do think it's meant to do stuff like this because the web version does it: http://api.geonames.org/wikipediaSearch?title=Philadelphia&maxRows=1&username=demo
[1]: http://www.geonames.org/source-code/javadoc/org/geonames/WikipediaArticle.html
[2]: http://www.geonames.org/source-code/javadoc/org/geonames/WebService.html | 0 |
8,521,707 | 12/15/2011 14:34:04 | 1,033,412 | 11/07/2011 08:29:37 | 15 | 1 | PHP store hours, closed dates | I've downloaded PHP store hours to show the weekday's opening hours, but now I would like to add some specific dates with different opening hours ( soon christmas you know! :-D ) but I really don't know how to do that so I was hoping for your help. E.g; I would like to change the opening hours for 25/12 and 1/1 ONLY, not all sundays.
Lots of thanks in advance!
// -------- PHP STORE HOURS ---------
// ---------- Version 1.1 -----------
// -------- BY CORY ETZKORN ---------
// -------- coryetzkorn.com ---------
// -------- EDIT FOLLOWING SECTION ONLY ---------
// Set your timezone (codes listed at http://php.net/manual/en/timezones.php)
// Delete the following line if you've already defined a timezone elsewhere.
date_default_timezone_set('Europe/Stockholm');
// Define daily open hours. Must be in 24-hour format, separated by dash.
$time_range_mon = '11:00-20:30';
$time_range_tue = '11:00-20:30';
$time_range_wed = '11:00-20:30';
$time_range_thu = '11:00-20:30';
$time_range_fri = '11:00-21:30';
$time_range_sat = '11:00-21:30';
$time_range_sun = '12:00-19:30';
// OPTIONAL: Output current day's open hours
$echo_daily_hours = false; // Switch to FALSE to hide numerical display of current hours
$time_output = 'g a'; // Enter custom time output format (options listed here: http://php.net/manual/en/function.date.php)
$time_separator = ' - '; // Choose how to indicate range (i.e XX - XX, XX to XX, XX until XX)
// -------- END EDITING --------
// Gets current day of week
$status_today = date("D");
// Gets current time of day in 00:00 format
$current_time = date("G:i");
// Makes current time of day computer-readable
$current_time_x = strtotime($current_time);
// Builds an array, assigning user-defined time ranges to each day of week
$all_days = array("Mon" => $time_range_mon, "Tue" => $time_range_tue, "Wed" => $time_range_wed, "Thu" => $time_range_thu, "Fri" => $time_range_fri, "Sat" => $time_range_sat, "Sun" => $time_range_sun);
foreach ($all_days as &$each_day) {
$each_day = explode("-", $each_day);
$each_day[0] = strtotime($each_day[0]);
$each_day[1] = strtotime($each_day[1]);
}
// Defines array of possible days of week
$week_days = array("Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun");
// Compares current day of week to possible days of week and determines open vs closed output based on current day and time.
foreach ($week_days as &$each_week_day) {
if ($status_today == $each_week_day) {
echo '';
if (($all_days[$each_week_day][0] <= $current_time_x) && ($all_days[$each_week_day][1] >= $current_time_x)) {
} else {
header( 'Location: http://www.bristolhotel.com/pizzeria/offlinepizza.php' ) ;
}
}
} | php | date | redirect | time | null | 12/23/2011 07:23:35 | not a real question | PHP store hours, closed dates
===
I've downloaded PHP store hours to show the weekday's opening hours, but now I would like to add some specific dates with different opening hours ( soon christmas you know! :-D ) but I really don't know how to do that so I was hoping for your help. E.g; I would like to change the opening hours for 25/12 and 1/1 ONLY, not all sundays.
Lots of thanks in advance!
// -------- PHP STORE HOURS ---------
// ---------- Version 1.1 -----------
// -------- BY CORY ETZKORN ---------
// -------- coryetzkorn.com ---------
// -------- EDIT FOLLOWING SECTION ONLY ---------
// Set your timezone (codes listed at http://php.net/manual/en/timezones.php)
// Delete the following line if you've already defined a timezone elsewhere.
date_default_timezone_set('Europe/Stockholm');
// Define daily open hours. Must be in 24-hour format, separated by dash.
$time_range_mon = '11:00-20:30';
$time_range_tue = '11:00-20:30';
$time_range_wed = '11:00-20:30';
$time_range_thu = '11:00-20:30';
$time_range_fri = '11:00-21:30';
$time_range_sat = '11:00-21:30';
$time_range_sun = '12:00-19:30';
// OPTIONAL: Output current day's open hours
$echo_daily_hours = false; // Switch to FALSE to hide numerical display of current hours
$time_output = 'g a'; // Enter custom time output format (options listed here: http://php.net/manual/en/function.date.php)
$time_separator = ' - '; // Choose how to indicate range (i.e XX - XX, XX to XX, XX until XX)
// -------- END EDITING --------
// Gets current day of week
$status_today = date("D");
// Gets current time of day in 00:00 format
$current_time = date("G:i");
// Makes current time of day computer-readable
$current_time_x = strtotime($current_time);
// Builds an array, assigning user-defined time ranges to each day of week
$all_days = array("Mon" => $time_range_mon, "Tue" => $time_range_tue, "Wed" => $time_range_wed, "Thu" => $time_range_thu, "Fri" => $time_range_fri, "Sat" => $time_range_sat, "Sun" => $time_range_sun);
foreach ($all_days as &$each_day) {
$each_day = explode("-", $each_day);
$each_day[0] = strtotime($each_day[0]);
$each_day[1] = strtotime($each_day[1]);
}
// Defines array of possible days of week
$week_days = array("Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun");
// Compares current day of week to possible days of week and determines open vs closed output based on current day and time.
foreach ($week_days as &$each_week_day) {
if ($status_today == $each_week_day) {
echo '';
if (($all_days[$each_week_day][0] <= $current_time_x) && ($all_days[$each_week_day][1] >= $current_time_x)) {
} else {
header( 'Location: http://www.bristolhotel.com/pizzeria/offlinepizza.php' ) ;
}
}
} | 1 |
3,398,606 | 08/03/2010 16:32:14 | 246,963 | 01/09/2010 07:25:34 | 363 | 42 | how to make fancy scroll | [link text][1]
![alt text][2]
how to make fancy scroll somthing like this image.
[1]: http://img237.imageshack.us/img237/5896/fancyscroll.gif
[2]: http://img237.imageshack.us/img237/5896/fancyscroll.gif | javascript | jquery | css | null | null | null | open | how to make fancy scroll
===
[link text][1]
![alt text][2]
how to make fancy scroll somthing like this image.
[1]: http://img237.imageshack.us/img237/5896/fancyscroll.gif
[2]: http://img237.imageshack.us/img237/5896/fancyscroll.gif | 0 |
10,725,902 | 05/23/2012 18:38:57 | 353,046 | 05/28/2010 15:34:54 | 138 | 1 | Joomla Development File Handling | I'm making a simple component for joomla following the MVC model (From the hello world tutorial for the most part), all it does is display a list of ads in the front end, once you click that it displays the single ad, with the ads being added in the back end. I had to do a lot of trial and error as Jooomla is the worst documented thing I've ever seen.
I'm trying to add an image to each item, so I changed the field type (In admin/model/forms) to "file", and it displays a file select option, but it does not save the file name or upload it, everything else works.
I've been trying to figure out how to use JFile, or another way to do this (without using the "media" field type), but no luck.
How do I get this to work?
And one last thing, is there a good tutorial on Joomla that actually explains what is happening? I've been looking for quite some time but everything online is vague at best, I can get things to work but have no clue why or how they are working, it's very frustrating. | mvc | file-upload | joomla | file-handling | null | null | open | Joomla Development File Handling
===
I'm making a simple component for joomla following the MVC model (From the hello world tutorial for the most part), all it does is display a list of ads in the front end, once you click that it displays the single ad, with the ads being added in the back end. I had to do a lot of trial and error as Jooomla is the worst documented thing I've ever seen.
I'm trying to add an image to each item, so I changed the field type (In admin/model/forms) to "file", and it displays a file select option, but it does not save the file name or upload it, everything else works.
I've been trying to figure out how to use JFile, or another way to do this (without using the "media" field type), but no luck.
How do I get this to work?
And one last thing, is there a good tutorial on Joomla that actually explains what is happening? I've been looking for quite some time but everything online is vague at best, I can get things to work but have no clue why or how they are working, it's very frustrating. | 0 |
9,189,071 | 02/08/2012 07:03:47 | 1,196,485 | 02/08/2012 06:48:50 | 1 | 0 | iam getting error. connect with facebook with asp.net 4.0 | [HttpRequestValidationException (0x80004005): A potentially dangerous Request.QueryString value was detected from the client (next="...m?fb_login&#fname=_opener&guid...").] | facebook | null | null | null | null | 02/09/2012 09:16:36 | not a real question | iam getting error. connect with facebook with asp.net 4.0
===
[HttpRequestValidationException (0x80004005): A potentially dangerous Request.QueryString value was detected from the client (next="...m?fb_login&#fname=_opener&guid...").] | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.