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
1,099,093
07/08/2009 16:17:20
52,236
01/06/2009 23:27:05
128
4
ASP.NET MVC Html.TextBox won't compile at runtime - same files work in other projects
We have two separate front end projects for the same company which are basically the same except for all the html and css. (Different divisions within the same company) I'm trying to add a page that was built in one over to the other. (Yes, yes, I know we probably should've built a single app that display different presentations based on which division's instance was running so that we wouldn't have to maintain two separate but the same codebases, but we just can't go there with this client.) Anyway, I copied over the controller, the model, and the aspx and ascx pages. All I needed to change was the name on the root namespace. For some reason, a particular ascx page that compiles successfully in the first project, fails in the second project. Here's the error message: e:\pathtocode\Web\Views\EmailToFriend\Email.ascx(24): error CS1061: 'System.Web.Mvc.HtmlHelper<MainWeb.Models.EmailToFriend>' does not contain a definition for 'TextBox' and no extension method 'TextBox' accepting a first argument of type 'System.Web.Mvc.HtmlHelper<MainWeb.Models.EmailToFriend>' could be found (are you missing a using directive or an assembly reference?) Here's the code for the ascx: <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Form.ascx.cs" Inherits="MainWeb.Views.EmailToFriend.Form" %> <%@ Import Namespace="System.Web.Mvc" %> <table> <span class="error" style="color: red;"> <%= Model.ErrorString %> </span> <tr> <td>Friend's Name: </td> <td><%= Html.TextBox("RecipientName", Model.RecipientName)%></td> </tr> <tr> <td>Friend's Email Address: </td> <td><%= Html.TextBox("RecipientAddress", Model.RecipientEmail)%></td> </tr> <tr> <td>Your Name: </td> <td><%= Html.TextBox("SenderName", Model.SenderName ?? UserName)%></td> </tr> <tr> <td>Your Email Address: </td> <td><%= Html.TextBox("SenderAddress", Model.SenderEmail ?? UserEmail)%></td> </tr> <tr> <td>Message</td> <td><%= Html.TextArea("Message", Model.Message) %></td> </tr> <tr> <td colspan="2"><input type="submit" value="Send" style="float: right;"/></td> </tr> </table> I've been futzing around with everything I could think of. Html.TextBox works fine in other files in the same project, so I can't figure out why this is blowing chunks.
asp.net
mvc
html-helper
null
null
null
open
ASP.NET MVC Html.TextBox won't compile at runtime - same files work in other projects === We have two separate front end projects for the same company which are basically the same except for all the html and css. (Different divisions within the same company) I'm trying to add a page that was built in one over to the other. (Yes, yes, I know we probably should've built a single app that display different presentations based on which division's instance was running so that we wouldn't have to maintain two separate but the same codebases, but we just can't go there with this client.) Anyway, I copied over the controller, the model, and the aspx and ascx pages. All I needed to change was the name on the root namespace. For some reason, a particular ascx page that compiles successfully in the first project, fails in the second project. Here's the error message: e:\pathtocode\Web\Views\EmailToFriend\Email.ascx(24): error CS1061: 'System.Web.Mvc.HtmlHelper<MainWeb.Models.EmailToFriend>' does not contain a definition for 'TextBox' and no extension method 'TextBox' accepting a first argument of type 'System.Web.Mvc.HtmlHelper<MainWeb.Models.EmailToFriend>' could be found (are you missing a using directive or an assembly reference?) Here's the code for the ascx: <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Form.ascx.cs" Inherits="MainWeb.Views.EmailToFriend.Form" %> <%@ Import Namespace="System.Web.Mvc" %> <table> <span class="error" style="color: red;"> <%= Model.ErrorString %> </span> <tr> <td>Friend's Name: </td> <td><%= Html.TextBox("RecipientName", Model.RecipientName)%></td> </tr> <tr> <td>Friend's Email Address: </td> <td><%= Html.TextBox("RecipientAddress", Model.RecipientEmail)%></td> </tr> <tr> <td>Your Name: </td> <td><%= Html.TextBox("SenderName", Model.SenderName ?? UserName)%></td> </tr> <tr> <td>Your Email Address: </td> <td><%= Html.TextBox("SenderAddress", Model.SenderEmail ?? UserEmail)%></td> </tr> <tr> <td>Message</td> <td><%= Html.TextArea("Message", Model.Message) %></td> </tr> <tr> <td colspan="2"><input type="submit" value="Send" style="float: right;"/></td> </tr> </table> I've been futzing around with everything I could think of. Html.TextBox works fine in other files in the same project, so I can't figure out why this is blowing chunks.
0
10,152,903
04/14/2012 10:34:40
1,332,899
04/14/2012 05:34:58
11
3
Popover Controller in iPhone
friend can some one tell me how we create popover in iPhone in ios 5. I use open source means one code folder i dont want that so plz some one guide me. Thank you.
iphone
null
null
null
null
04/20/2012 04:13:26
not a real question
Popover Controller in iPhone === friend can some one tell me how we create popover in iPhone in ios 5. I use open source means one code folder i dont want that so plz some one guide me. Thank you.
1
5,973,338
05/12/2011 04:34:41
749,880
05/12/2011 04:34:41
1
0
Associate a file type to an application
I am developing an application in windows using vs2005 c++ and want to associate a file extension to the application which I can do in the registry settings. However, when I click on the file I want to associate it with a running instance of my application and not launch a new one. How can I achieve this behavior.
c++
windows
null
null
null
null
open
Associate a file type to an application === I am developing an application in windows using vs2005 c++ and want to associate a file extension to the application which I can do in the registry settings. However, when I click on the file I want to associate it with a running instance of my application and not launch a new one. How can I achieve this behavior.
0
8,493,094
12/13/2011 17:00:44
1,096,236
12/13/2011 16:51:00
1
0
Getting "People talking about this" metric (PTAT)
I'm using the facebook api to pull some metrics, I want to get the "talking about this" metric, I reviewd the "Stories and People talking about this" from the facebook api and I'm pulling the "page_storytellers" metric, but I see that the number from this metric does not match with the "talking about this" metric from the facebook original page. My question here is How does the facebook api calculate this value for (page_storytellers metric)? The "page_storytellers" metric is the correct one to get the "talking about this metric"? Thanks for your help http://developers.facebook.com/docs/reference/fql/insights/
facebook
metric
null
null
null
null
open
Getting "People talking about this" metric (PTAT) === I'm using the facebook api to pull some metrics, I want to get the "talking about this" metric, I reviewd the "Stories and People talking about this" from the facebook api and I'm pulling the "page_storytellers" metric, but I see that the number from this metric does not match with the "talking about this" metric from the facebook original page. My question here is How does the facebook api calculate this value for (page_storytellers metric)? The "page_storytellers" metric is the correct one to get the "talking about this metric"? Thanks for your help http://developers.facebook.com/docs/reference/fql/insights/
0
10,123,342
04/12/2012 12:13:39
1,239,062
02/28/2012 23:36:38
21
0
tic tac toe coding for tie
I have a tic tac toe program and I've got everything working that way it should be. But, the one final problem I am having with this coding is that I can't seem to figure out when there is a tie how to code it. here is what i have so far. Public Class Form1 Private turn As Integer = 1 Private play() As String = {"O", "X"} Private board(2, 2) As String Private Structure arrayIndex Dim x As Integer Dim y As Integer End Structure Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load For x As Integer = 1 To 9 Dim b As New Button With { _ .Width = 80, _ .Height = 80, _ .Text = "", _ .Location = New Point(60 + (((x - 1) Mod 3) * 80), 60 + (((x - 1) \ 3) * 80)), _ .Tag = New arrayIndex With {.x = (x - 1) Mod 3, .y = (x - 1) \ 3}} Me.Controls.Add(b) AddHandler b.Click, AddressOf buttons_click Next Me.SetClientSizeCore(360, 360) For x2 As Integer = 1 To 1 Dim a As New Button With { _ .Width = 80, _ .Height = 60, _ .Text = "New Game", _ .Location = New Point(100 + (((x2 - 1) Mod 6) * 80), 60 + (((x2 - 1) \ 3) * 80)), _ .Tag = New arrayIndex With {.x = (x2 - 1) Mod 3, .y = (x2 - 1) \ 3}} Me.Controls.Add(a) Next End Sub Private Sub buttons_click(ByVal sender As System.Object, ByVal e As System.EventArgs) If DirectCast(sender, Button).Text <> "" Then Return DirectCast(sender, Button).Text = play(turn Mod 2) Dim index As arrayIndex = DirectCast(DirectCast(sender, Button).Tag, arrayIndex) board(index.x, index.y) = play(turn Mod 2) turn += 1 winner() End Sub Private Sub winner() Dim rows(7) As String rows(0) = board(0, 0) & board(1, 0) & board(2, 0) rows(1) = board(0, 1) & board(1, 1) & board(2, 1) rows(2) = board(0, 2) & board(1, 2) & board(2, 2) rows(3) = board(0, 0) & board(0, 1) & board(0, 2) rows(4) = board(1, 0) & board(1, 1) & board(1, 2) rows(5) = board(2, 0) & board(2, 1) & board(2, 2) rows(6) = board(0, 0) & board(1, 1) & board(2, 2) rows(7) = board(2, 0) & board(1, 1) & board(0, 2) For x As Integer = 0 To 7 If rows(x).Length = 3 AndAlso (rows(x)(0) = rows(x)(1) AndAlso rows(x)(0) = rows(x)(2)) Then If MessageBox.Show(rows(x)(0) & "'s winsssss!", "We have a winner!", MessageBoxButtons.OKCancel, MessageBoxIcon.Information) = DialogResult.OK Then turn = 1 ReDim board(2, 2) For Each ctrl As Control In Controls ctrl.Text = "" Next Return Else Me.Close() End If End If Next End Sub End Class
vb
null
null
null
null
null
open
tic tac toe coding for tie === I have a tic tac toe program and I've got everything working that way it should be. But, the one final problem I am having with this coding is that I can't seem to figure out when there is a tie how to code it. here is what i have so far. Public Class Form1 Private turn As Integer = 1 Private play() As String = {"O", "X"} Private board(2, 2) As String Private Structure arrayIndex Dim x As Integer Dim y As Integer End Structure Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load For x As Integer = 1 To 9 Dim b As New Button With { _ .Width = 80, _ .Height = 80, _ .Text = "", _ .Location = New Point(60 + (((x - 1) Mod 3) * 80), 60 + (((x - 1) \ 3) * 80)), _ .Tag = New arrayIndex With {.x = (x - 1) Mod 3, .y = (x - 1) \ 3}} Me.Controls.Add(b) AddHandler b.Click, AddressOf buttons_click Next Me.SetClientSizeCore(360, 360) For x2 As Integer = 1 To 1 Dim a As New Button With { _ .Width = 80, _ .Height = 60, _ .Text = "New Game", _ .Location = New Point(100 + (((x2 - 1) Mod 6) * 80), 60 + (((x2 - 1) \ 3) * 80)), _ .Tag = New arrayIndex With {.x = (x2 - 1) Mod 3, .y = (x2 - 1) \ 3}} Me.Controls.Add(a) Next End Sub Private Sub buttons_click(ByVal sender As System.Object, ByVal e As System.EventArgs) If DirectCast(sender, Button).Text <> "" Then Return DirectCast(sender, Button).Text = play(turn Mod 2) Dim index As arrayIndex = DirectCast(DirectCast(sender, Button).Tag, arrayIndex) board(index.x, index.y) = play(turn Mod 2) turn += 1 winner() End Sub Private Sub winner() Dim rows(7) As String rows(0) = board(0, 0) & board(1, 0) & board(2, 0) rows(1) = board(0, 1) & board(1, 1) & board(2, 1) rows(2) = board(0, 2) & board(1, 2) & board(2, 2) rows(3) = board(0, 0) & board(0, 1) & board(0, 2) rows(4) = board(1, 0) & board(1, 1) & board(1, 2) rows(5) = board(2, 0) & board(2, 1) & board(2, 2) rows(6) = board(0, 0) & board(1, 1) & board(2, 2) rows(7) = board(2, 0) & board(1, 1) & board(0, 2) For x As Integer = 0 To 7 If rows(x).Length = 3 AndAlso (rows(x)(0) = rows(x)(1) AndAlso rows(x)(0) = rows(x)(2)) Then If MessageBox.Show(rows(x)(0) & "'s winsssss!", "We have a winner!", MessageBoxButtons.OKCancel, MessageBoxIcon.Information) = DialogResult.OK Then turn = 1 ReDim board(2, 2) For Each ctrl As Control In Controls ctrl.Text = "" Next Return Else Me.Close() End If End If Next End Sub End Class
0
7,205,613
08/26/2011 13:46:52
914,127
08/26/2011 13:07:31
1
0
Problem with Foreign keys and some operations
hi there i got 3 tables: plain_table(plain_id(PK), plain_name, FK_temperature_id(FK), FK_material_id(FK), FK_drive_id(FK)) temperature(temperature_id(PK), temperature_name) material(material_id(PK), material_name) drive(drive_id(PK), drive_name) listBox1.Items.Clear(); conn.Open(); string query = ("SELECT plain_name FROM plain_table"); SqlCommand command = new SqlCommand(query, conn); command.ExecuteNonQuery(); SqlDataReader dr = command.ExecuteReader(CommandBehavior.CloseConnection); while (dr.Read()) { string plain_name = Convert.ToString(dr["plain_name"]); this.listBox1.Items.Add(plain_name); } conn.Close(); I got a name's on listbox... Now i would love to click on some of it and download values of record to controls: plain_name to textBox control FK_temperature_id(FK) to comboBox control FK_material_id(FK) to comboBox control FK_drive_id(FK)) to comboBox control so on mouse click event i tried to do it and i done but i have in comboxes an integer values so it's not user friendly when someone want to change this fk - should be a name not value, but if i do it i don't know how to send update case n ow it's varchar. I hope u understand what i mean. I think a dataset and value member and display member should help but i don't know how, can u plz help me how to download values to controls and then could change some and make update? Please help
c#
sql-server
null
null
null
08/26/2011 23:01:57
too localized
Problem with Foreign keys and some operations === hi there i got 3 tables: plain_table(plain_id(PK), plain_name, FK_temperature_id(FK), FK_material_id(FK), FK_drive_id(FK)) temperature(temperature_id(PK), temperature_name) material(material_id(PK), material_name) drive(drive_id(PK), drive_name) listBox1.Items.Clear(); conn.Open(); string query = ("SELECT plain_name FROM plain_table"); SqlCommand command = new SqlCommand(query, conn); command.ExecuteNonQuery(); SqlDataReader dr = command.ExecuteReader(CommandBehavior.CloseConnection); while (dr.Read()) { string plain_name = Convert.ToString(dr["plain_name"]); this.listBox1.Items.Add(plain_name); } conn.Close(); I got a name's on listbox... Now i would love to click on some of it and download values of record to controls: plain_name to textBox control FK_temperature_id(FK) to comboBox control FK_material_id(FK) to comboBox control FK_drive_id(FK)) to comboBox control so on mouse click event i tried to do it and i done but i have in comboxes an integer values so it's not user friendly when someone want to change this fk - should be a name not value, but if i do it i don't know how to send update case n ow it's varchar. I hope u understand what i mean. I think a dataset and value member and display member should help but i don't know how, can u plz help me how to download values to controls and then could change some and make update? Please help
3
5,371,622
03/20/2011 21:26:18
561,395
01/03/2011 15:06:36
261
1
Memory leak coming from this code, how do i get rid of it?
This is my code, which the app runs upon changing to the view that it's inside of. It's causing a memory leak with colourButtonsArray when you change to this view more than once (so not the first time you run it) but i'm unsure how to get rid of it: -(void)setColours { colourButtonsArray = [[NSMutableArray alloc] init]; [colourButtonsArray addObject:@""]; int buttonsI = 1; while (buttonsI < 7) { //Make a button UIButton *colourButton = [UIButton buttonWithType:UIButtonTypeCustom]; colourButton.frame = CGRectMake((53*(buttonsI-1))+3, 5, 49, 49); colourButton.tag = buttonsI; [colourButton addTarget:self action:@selector(colourButtonPressed:) forControlEvents:UIControlEventTouchUpInside]; [colourView addSubview:colourButton]; [colourButtonsArray addObject:colourButton]; [colourButton release]; buttonsI++; } }
iphone
objective-c
memory-leaks
nsmutablearray
null
null
open
Memory leak coming from this code, how do i get rid of it? === This is my code, which the app runs upon changing to the view that it's inside of. It's causing a memory leak with colourButtonsArray when you change to this view more than once (so not the first time you run it) but i'm unsure how to get rid of it: -(void)setColours { colourButtonsArray = [[NSMutableArray alloc] init]; [colourButtonsArray addObject:@""]; int buttonsI = 1; while (buttonsI < 7) { //Make a button UIButton *colourButton = [UIButton buttonWithType:UIButtonTypeCustom]; colourButton.frame = CGRectMake((53*(buttonsI-1))+3, 5, 49, 49); colourButton.tag = buttonsI; [colourButton addTarget:self action:@selector(colourButtonPressed:) forControlEvents:UIControlEventTouchUpInside]; [colourView addSubview:colourButton]; [colourButtonsArray addObject:colourButton]; [colourButton release]; buttonsI++; } }
0
10,416,515
05/02/2012 15:09:51
543,832
12/15/2010 19:45:52
152
10
Same code works on VS 2010 but not on 2005
Right now I'm working on an ASP.NET web application that recquires Ajax. After reading [this tutorial][1] I tried running the following code in Visual Studio 2005, after adding the neccessary Controls by right-clicking the Toolbox and clicking "Choose Items...": <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %> <%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"/> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" /> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> </ContentTemplate> </asp:UpdatePanel> </form> </body> </html> --------------------------------- protected void Button1_Click(object sender, EventArgs e) { Label1.Text += "<br/>" + DateTime.Now.ToString(); } But for some reason, the page did not work with Ajax. When I clicked the button, the page refreshed and showed the label with updated values. I couldn't find anything wrong with this code, so I tried opening the same exact project in Visual Studio 2010 and running it. This time it worked! (the label was updated with the current date without refreshing the page) What could prevent this code from working in Visual Studio 2005? Thanks, Itamar [1]: http://ajax.net-tutorials.com/basics/hello-world/
asp.net
ajax
visual-studio-2010
visual-studio-2005
null
null
open
Same code works on VS 2010 but not on 2005 === Right now I'm working on an ASP.NET web application that recquires Ajax. After reading [this tutorial][1] I tried running the following code in Visual Studio 2005, after adding the neccessary Controls by right-clicking the Toolbox and clicking "Choose Items...": <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %> <%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"/> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" /> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> </ContentTemplate> </asp:UpdatePanel> </form> </body> </html> --------------------------------- protected void Button1_Click(object sender, EventArgs e) { Label1.Text += "<br/>" + DateTime.Now.ToString(); } But for some reason, the page did not work with Ajax. When I clicked the button, the page refreshed and showed the label with updated values. I couldn't find anything wrong with this code, so I tried opening the same exact project in Visual Studio 2010 and running it. This time it worked! (the label was updated with the current date without refreshing the page) What could prevent this code from working in Visual Studio 2005? Thanks, Itamar [1]: http://ajax.net-tutorials.com/basics/hello-world/
0
10,682,323
05/21/2012 09:06:11
1,065,207
11/25/2011 08:00:03
64
0
Swing components misplaced on JFrame when using Singleton
Let's say I have a `JFrame` that is created through a singleton pattern like this : private static Dist2PuncteFrame instance = null; public static Dist2PuncteFrame getInstance() { if (instance == null) instance = new Dist2PuncteFrame(); return instance; } I call it through a `JMenuItem` like this : `dist2PcteItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { dist2PcteFrame = Dist2PuncteFrame.getInstance(); dist2PcteFrame.setSomeParameters(blablabla); dist2PcteFrame.init(); } });` Nothing complicated. The problem occurs when I open the window the second time. My close button and the 2 input labels seem to move (labels left/right, button up/down). ![][1] I have frames that are called the exact same way and they don't have this problem. Anyone knows what seems to be the problem? I am using NetBeans 7.1. [1]: http://i.stack.imgur.com/AEVCu.png
java
swing
singleton
jframe
null
null
open
Swing components misplaced on JFrame when using Singleton === Let's say I have a `JFrame` that is created through a singleton pattern like this : private static Dist2PuncteFrame instance = null; public static Dist2PuncteFrame getInstance() { if (instance == null) instance = new Dist2PuncteFrame(); return instance; } I call it through a `JMenuItem` like this : `dist2PcteItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { dist2PcteFrame = Dist2PuncteFrame.getInstance(); dist2PcteFrame.setSomeParameters(blablabla); dist2PcteFrame.init(); } });` Nothing complicated. The problem occurs when I open the window the second time. My close button and the 2 input labels seem to move (labels left/right, button up/down). ![][1] I have frames that are called the exact same way and they don't have this problem. Anyone knows what seems to be the problem? I am using NetBeans 7.1. [1]: http://i.stack.imgur.com/AEVCu.png
0
11,681,126
07/27/2012 03:40:42
1,319,475
04/07/2012 18:55:19
1
0
remove rememberMe from script
i was wondering if anyone can help me out? what im trying to do is remove the rememberMe code from this script, but im having a had time doing it. If anyone can help me do this and give me any info on if the script is secure that would be great thanks... include("db.php"); $user = mysql_real_escape_string(strip_tags($_POST['user'])); $datetime = mysql_real_escape_string(strip_tags($_POST['lastlogin'])); $pass = mysql_real_escape_string(strip_tags($_POST['pass'])); $pass = hash('sha512', $_POST['pass']); $rememberMe = mysql_real_escape_string(strip_tags($_POST['rememberMe'])); if ($rememberMe == "rememberMe"){ $rememberMe = "1"; }else{ $rememberMe = "0"; } $sql = "Select * from members WHERE user = '{$user}'"; $result = mysql_query($sql, $conn) or die(); if ($row = mysql_fetch_array($result)){ if ($row["actnum"] == "0"){ if ($row["numloginfail"] &lt;= 5){ if ($row["pass"] == $pass){ $datetime = date("d-m-Y G:i "); $sql = "UPDATE members Set lastlogin = '{$datetime}' WHERE user = '{$user}'"; mysql_query($sql, $conn) or die(); $sql = "UPDATE members Set numloginfail = '5' WHERE user = '{$user}'"; mysql_query($sql, $conn) or die(); session_start(); session_unset(); session_destroy(); session_register('pass'); $_SESSION['pass'] = $pass; session_register('id'); $_SESSION['id'] = $user; if($rememberMe=="1"){ setcookie("rememberCookieUname",$user,(time()+604800)); setcookie("rememberCookiePassword",md5($pass),(time()+604800)); } header("Location: members"); exit(); } else{ $datetime = date("d")*10000000000 + date("m")*100000000 + date("Y")*10000 + date("G")*100 + date("i"); if ($row["lastloginfail"] &gt;= ($datetime-5)){ $sql = "UPDATE members Set numloginfail = numloginfail + 1 WHERE user = '{$user}'"; mysql_query($sql, $conn) or die(); $sql = "UPDATE members Set lastloginfail = '{$datetime}' WHERE user = '{$user}'"; mysql_query($sql, $conn) or die(); } else{ $sql = "UPDATE members Set lastloginfail = '{$datetime}' WHERE user = '{$user}'"; mysql_query($sql, $conn) or die(); } makeform($incorrectLogin);} } else { $datetime = date("d")*10000000000 + date("m")*100000000 + date("Y")*10000 + date("G")*100 + date("i"); if ($row["lastloginfail"] &lt;= ($datetime-30)){ $sql = "UPDATE members Set numloginfail = '0' WHERE user = '{$user}'"; mysql_query($sql, $conn) or die(); makeform($underAttackReLogin, "$user"); } else{ makeform($underAttackPleaseWait); } } } else{ makeform($accountNotActivated); } } else{ if ($user == ""){ makeform(""); } else { makeform($incorrectLogin); } } function makeform($errormessage="", $user = ""){
php
php5
null
null
null
07/27/2012 03:45:47
not constructive
remove rememberMe from script === i was wondering if anyone can help me out? what im trying to do is remove the rememberMe code from this script, but im having a had time doing it. If anyone can help me do this and give me any info on if the script is secure that would be great thanks... include("db.php"); $user = mysql_real_escape_string(strip_tags($_POST['user'])); $datetime = mysql_real_escape_string(strip_tags($_POST['lastlogin'])); $pass = mysql_real_escape_string(strip_tags($_POST['pass'])); $pass = hash('sha512', $_POST['pass']); $rememberMe = mysql_real_escape_string(strip_tags($_POST['rememberMe'])); if ($rememberMe == "rememberMe"){ $rememberMe = "1"; }else{ $rememberMe = "0"; } $sql = "Select * from members WHERE user = '{$user}'"; $result = mysql_query($sql, $conn) or die(); if ($row = mysql_fetch_array($result)){ if ($row["actnum"] == "0"){ if ($row["numloginfail"] &lt;= 5){ if ($row["pass"] == $pass){ $datetime = date("d-m-Y G:i "); $sql = "UPDATE members Set lastlogin = '{$datetime}' WHERE user = '{$user}'"; mysql_query($sql, $conn) or die(); $sql = "UPDATE members Set numloginfail = '5' WHERE user = '{$user}'"; mysql_query($sql, $conn) or die(); session_start(); session_unset(); session_destroy(); session_register('pass'); $_SESSION['pass'] = $pass; session_register('id'); $_SESSION['id'] = $user; if($rememberMe=="1"){ setcookie("rememberCookieUname",$user,(time()+604800)); setcookie("rememberCookiePassword",md5($pass),(time()+604800)); } header("Location: members"); exit(); } else{ $datetime = date("d")*10000000000 + date("m")*100000000 + date("Y")*10000 + date("G")*100 + date("i"); if ($row["lastloginfail"] &gt;= ($datetime-5)){ $sql = "UPDATE members Set numloginfail = numloginfail + 1 WHERE user = '{$user}'"; mysql_query($sql, $conn) or die(); $sql = "UPDATE members Set lastloginfail = '{$datetime}' WHERE user = '{$user}'"; mysql_query($sql, $conn) or die(); } else{ $sql = "UPDATE members Set lastloginfail = '{$datetime}' WHERE user = '{$user}'"; mysql_query($sql, $conn) or die(); } makeform($incorrectLogin);} } else { $datetime = date("d")*10000000000 + date("m")*100000000 + date("Y")*10000 + date("G")*100 + date("i"); if ($row["lastloginfail"] &lt;= ($datetime-30)){ $sql = "UPDATE members Set numloginfail = '0' WHERE user = '{$user}'"; mysql_query($sql, $conn) or die(); makeform($underAttackReLogin, "$user"); } else{ makeform($underAttackPleaseWait); } } } else{ makeform($accountNotActivated); } } else{ if ($user == ""){ makeform(""); } else { makeform($incorrectLogin); } } function makeform($errormessage="", $user = ""){
4
2,963,826
06/03/2010 06:51:00
62,765
02/05/2009 05:19:43
749
33
Which namespace from the .NET Framework should I research ?
I am just beginning to play around with .NET (using C#). Which namespace, aside from System.*, do I need to research ?
c#
.net
null
null
null
null
open
Which namespace from the .NET Framework should I research ? === I am just beginning to play around with .NET (using C#). Which namespace, aside from System.*, do I need to research ?
0
7,213,248
08/27/2011 07:54:19
915,252
08/27/2011 07:54:19
1
0
Sql server responding very slow in windows 7 as compared to windows xp
Hi i made a website and i am running in local computer with cassini webserver but when i am trying to run it in windows 7 computer the data retrieval is very slow and it takes too much time in accessing data in the data fields. i don't understand what the problem as the same runs very fast in windows xp and even my machine is also brand new it is sony vaio VPCEA36FG with i5 processor and 4 gb ram but the performance is very slow in this case and my other task are running very fine. please help me out of this problem..
asp.net
null
null
null
null
08/28/2011 01:44:41
off topic
Sql server responding very slow in windows 7 as compared to windows xp === Hi i made a website and i am running in local computer with cassini webserver but when i am trying to run it in windows 7 computer the data retrieval is very slow and it takes too much time in accessing data in the data fields. i don't understand what the problem as the same runs very fast in windows xp and even my machine is also brand new it is sony vaio VPCEA36FG with i5 processor and 4 gb ram but the performance is very slow in this case and my other task are running very fine. please help me out of this problem..
2
7,785,859
10/16/2011 17:03:14
290,082
03/09/2010 23:31:23
1,029
1
Framework for mvc
Does anyone know framework for MVC which provide following functional: 1. Registration\Autorization 2. Profile page 3. Membership 4. Administaration pages. 5. Other stuff which helping create typical WebApp fast.
asp.net
mvc
null
null
null
10/17/2011 02:46:07
not constructive
Framework for mvc === Does anyone know framework for MVC which provide following functional: 1. Registration\Autorization 2. Profile page 3. Membership 4. Administaration pages. 5. Other stuff which helping create typical WebApp fast.
4
7,922,022
10/27/2011 20:34:48
802,727
06/17/2011 05:30:51
106
13
CSS3 transition for :after pseudoelement
Check out this fiddle: http://jsfiddle.net/sajYc/ The transition for the `:after` pseudo element works in firefox, but fails in webkit based browsers. Any idea if this is coming up in a future release? Any non-jquery overkill workarounds for it? Basically, I'm using it on a page to fade between two states of a background image sprite(instead of two colors like in the fiddle). A smooth transition between an icon's normal and hover state. So I don't want to add a bunch of actual elements to it just to make this animation work.
jquery
html
css
css3
css-transitions
null
open
CSS3 transition for :after pseudoelement === Check out this fiddle: http://jsfiddle.net/sajYc/ The transition for the `:after` pseudo element works in firefox, but fails in webkit based browsers. Any idea if this is coming up in a future release? Any non-jquery overkill workarounds for it? Basically, I'm using it on a page to fade between two states of a background image sprite(instead of two colors like in the fiddle). A smooth transition between an icon's normal and hover state. So I don't want to add a bunch of actual elements to it just to make this animation work.
0
5,689,960
04/16/2011 22:11:25
648,855
03/07/2011 21:19:01
13
0
How do I create a commit without a parent in Git?
I have a small project I was working on without any kind of version control software, and I ended up with three different versions of the same script, where each one does something slightly different from the others. I initialized a git repo with one of the versions, and I'd really like to commit each of the other two without parents. That way, I can merge the differences as though each of the three versions of the script were the tips of different branches. I'm not even sure whether this is necessarily a sane or reasonable way to go about solving this problem... Any advice on how to do things this way, or advice on a better way to handle this situation would be much appreciated.
git
null
null
null
null
null
open
How do I create a commit without a parent in Git? === I have a small project I was working on without any kind of version control software, and I ended up with three different versions of the same script, where each one does something slightly different from the others. I initialized a git repo with one of the versions, and I'd really like to commit each of the other two without parents. That way, I can merge the differences as though each of the three versions of the script were the tips of different branches. I'm not even sure whether this is necessarily a sane or reasonable way to go about solving this problem... Any advice on how to do things this way, or advice on a better way to handle this situation would be much appreciated.
0
8,707,080
01/03/2012 01:44:42
1,124,197
12/31/2011 10:00:55
8
0
How do you connect to a back end server in Iphone Programming?
I'm tasked to create a connection to a server located in my university. To create back end server apps, i understand that a connection to a restful server needs to be done. However, i'm slightly confused as to go about doing this as my server and databases are already up and running. So i just basically need to put the connection details in a code snippet and hopefully that will be able to solve everything. Or do i still need to create everything from start again? Correct me if i'm wrong about the connection part. Just need a lil advice to get me going. Thank you. The Database i'm working on is Postgres.
iphone
database
backend
null
null
01/03/2012 03:13:49
not a real question
How do you connect to a back end server in Iphone Programming? === I'm tasked to create a connection to a server located in my university. To create back end server apps, i understand that a connection to a restful server needs to be done. However, i'm slightly confused as to go about doing this as my server and databases are already up and running. So i just basically need to put the connection details in a code snippet and hopefully that will be able to solve everything. Or do i still need to create everything from start again? Correct me if i'm wrong about the connection part. Just need a lil advice to get me going. Thank you. The Database i'm working on is Postgres.
1
9,449,934
02/26/2012 02:11:16
1,153,032
01/17/2012 02:07:38
15
0
how to find the index of min value in each row of a matrix in c++?
I have a matrix and I want to find the index of the min value. I tried to extend the idea behind doing it in arrays, but it gives me the error of "illegal indirection". Here is the code: double *CTempMinPosition=0; for(i=0;i<I;i++) { do { double CtempMin=*min_element(cTemp[i][1],cTemp[i][1] + J); double *CTempMinPosition=min_element(cTemp[i][1],cTemp[i][1] + J); if(Y[CTempMinPosition-cTemp[i][1]]=0) cTemp[i][j]=99999; }while(Y[CTempMinPosition-cTemp[i][1]]==0);
matrix
while-loops
minimum
null
null
null
open
how to find the index of min value in each row of a matrix in c++? === I have a matrix and I want to find the index of the min value. I tried to extend the idea behind doing it in arrays, but it gives me the error of "illegal indirection". Here is the code: double *CTempMinPosition=0; for(i=0;i<I;i++) { do { double CtempMin=*min_element(cTemp[i][1],cTemp[i][1] + J); double *CTempMinPosition=min_element(cTemp[i][1],cTemp[i][1] + J); if(Y[CTempMinPosition-cTemp[i][1]]=0) cTemp[i][j]=99999; }while(Y[CTempMinPosition-cTemp[i][1]]==0);
0
7,931,971
10/28/2011 16:19:33
240,364
12/29/2009 18:20:55
926
40
which is the best reason to use MongoDB instead Mysql or PostgreSQL?
i've been thinking to use MongoDB for my next project (python), but for now, i don't understand which are the advantages of use NoSQL MongoDB against SQL. Can you give some ideas or reasons of why to use NoSQL MongoDB? Thanks in advance and sorry for my english :(
python
sql
mongodb
nosql
null
10/29/2011 04:43:34
not constructive
which is the best reason to use MongoDB instead Mysql or PostgreSQL? === i've been thinking to use MongoDB for my next project (python), but for now, i don't understand which are the advantages of use NoSQL MongoDB against SQL. Can you give some ideas or reasons of why to use NoSQL MongoDB? Thanks in advance and sorry for my english :(
4
9,027,477
01/27/2012 00:24:16
1,172,524
01/27/2012 00:17:40
1
0
PDO prepared statements Like and OR statements used together
Instead of OR for the custodian = :query" I would rather have LIKE functionality. Do I just replace OR with LIKE? I would like the query to search through and if the user searches by serial it will match and display results. It they happen to search by custodian (which is a name) and they happen to spell Zak Za It will still display all results with Zak as custodian. Hope I'm clear. Thanks. Will LIKE add just another operator to the query? $STH = $dbh->prepare("SELECT COUNT(*) FROM inv_assets WHERE po = :query OR serialNum = :query OR dop = :query OR purchaseFrom = :query OR custodian = :query");
php
pdo
null
null
null
null
open
PDO prepared statements Like and OR statements used together === Instead of OR for the custodian = :query" I would rather have LIKE functionality. Do I just replace OR with LIKE? I would like the query to search through and if the user searches by serial it will match and display results. It they happen to search by custodian (which is a name) and they happen to spell Zak Za It will still display all results with Zak as custodian. Hope I'm clear. Thanks. Will LIKE add just another operator to the query? $STH = $dbh->prepare("SELECT COUNT(*) FROM inv_assets WHERE po = :query OR serialNum = :query OR dop = :query OR purchaseFrom = :query OR custodian = :query");
0
7,175,293
08/24/2011 12:19:49
738,737
05/04/2011 20:12:15
95
3
Why does unix link not appear in browser?
I have created a link of file stored elsewhere in public_html directory so that I can access through the web. But When I am opening the directory in web, it does not contain the link to original file. How can we create this?
html
unix
null
null
null
08/24/2011 19:39:15
off topic
Why does unix link not appear in browser? === I have created a link of file stored elsewhere in public_html directory so that I can access through the web. But When I am opening the directory in web, it does not contain the link to original file. How can we create this?
2
10,847,067
06/01/2012 08:42:47
848,454
07/17/2011 07:05:42
10
0
How are Route Targets assigned in overlapping MPLS-VPNs?
I am not sure if I should ask this question here or in ServerFault. But since the question is more about the concept of networking rather than it's implementation in a specific hardware, I decided to post it here. As per my understanding Route Targets are used in MPLS-VPNs to distinguish between the different VRFs in a PE router. Assuming that no site is shared between any two VPNs, then the export and import route targets are the same, so a PE can compare the route target in an incoming BGP packet to it's own export route target and install in the appropriate VRF. My doubt is, how is this allotment of route targets handled when there are sites that belong to more than one VPN? Are the route targets to various VRFs manually installed in all the PEs? If so won't it lead to scalability issues? If not, how are the route targets for the VRFs installed?
networking
vpn
bgp
null
null
06/02/2012 20:22:18
off topic
How are Route Targets assigned in overlapping MPLS-VPNs? === I am not sure if I should ask this question here or in ServerFault. But since the question is more about the concept of networking rather than it's implementation in a specific hardware, I decided to post it here. As per my understanding Route Targets are used in MPLS-VPNs to distinguish between the different VRFs in a PE router. Assuming that no site is shared between any two VPNs, then the export and import route targets are the same, so a PE can compare the route target in an incoming BGP packet to it's own export route target and install in the appropriate VRF. My doubt is, how is this allotment of route targets handled when there are sites that belong to more than one VPN? Are the route targets to various VRFs manually installed in all the PEs? If so won't it lead to scalability issues? If not, how are the route targets for the VRFs installed?
2
6,373,978
06/16/2011 14:58:27
801,733
06/16/2011 14:58:27
1
0
Benefits of C# over Java and/or C++
Can anybody provide a comprehensive list of pros and cons of using C# versus Java and C++?
c#
java
c++
null
null
06/16/2011 15:00:15
not constructive
Benefits of C# over Java and/or C++ === Can anybody provide a comprehensive list of pros and cons of using C# versus Java and C++?
4
8,476,749
12/12/2011 15:34:02
722,869
04/24/2011 19:05:41
136
0
what's the preferred commenting style for for loops? (C++, but should be relevant to other languages as well)
I've been programming for years, but I can never quite decide the correct place to comment on the function of a for loop. Before, to the right, or after? // iterate over rows, blah blah... for (std::string row : csv) { ... } for (std::string row : csv) { // iterate over rows, blah blah... ... } for (std::string row : csv) { // iterate over rows, blah blah... ... } Commenting to the right saves a line, but is less readable and tends to make the line go over 80 characters. Commenting below kind of works, but that may be where I place the comment for the first block of code within the for loop. What's your preferred style and why?
c++
coding-style
for-loop
comments
null
12/12/2011 15:44:09
not constructive
what's the preferred commenting style for for loops? (C++, but should be relevant to other languages as well) === I've been programming for years, but I can never quite decide the correct place to comment on the function of a for loop. Before, to the right, or after? // iterate over rows, blah blah... for (std::string row : csv) { ... } for (std::string row : csv) { // iterate over rows, blah blah... ... } for (std::string row : csv) { // iterate over rows, blah blah... ... } Commenting to the right saves a line, but is less readable and tends to make the line go over 80 characters. Commenting below kind of works, but that may be where I place the comment for the first block of code within the for loop. What's your preferred style and why?
4
5,539,583
04/04/2011 14:00:31
486,806
10/25/2010 19:01:33
23
0
Does the :any flag overwrites the :on (context) flag in acts_as_taggable_on's tagged_with ?
I'm confused with how the flags :on and :any works together in the "tagged_with" method of acts_as_taggable_on. For example, if I have the following users @user1 and @user2: class User < ActiveRecord::Base acts_as_taggable_on :skills, :interests end @user1 = User.new(:name => "Bobby") @user1.interest_list = "1, 15" @user1.skill_list = "2, 17" @user1.save @user2 = User.new(:name => "Al") @user2.interest_list = "3, 10" @user2.skill_list = "4, 6" @user2.save When I want to get all users who's interest-list include any of the tag ["2", "50"], i tried this: User.tagged_with(["2", "50"], :on => :interests, :any => true) The problem is I get back @user1 (which has "2" in the skill_list, not interest_list), even though I was expecting none. It seems that the flag :any might have overwritten the flag :on. Is there a way to actually perform the filter I described above? Also, a side question is, how do you find all the flags available to a method? For example, tagged_with has :on, :any, :match_all, ..., how do i list all of them ? Thanks for your help, everyone!
ruby-on-rails
ruby-on-rails-3
acts-as-taggable-on
acts-as-taggable
null
null
open
Does the :any flag overwrites the :on (context) flag in acts_as_taggable_on's tagged_with ? === I'm confused with how the flags :on and :any works together in the "tagged_with" method of acts_as_taggable_on. For example, if I have the following users @user1 and @user2: class User < ActiveRecord::Base acts_as_taggable_on :skills, :interests end @user1 = User.new(:name => "Bobby") @user1.interest_list = "1, 15" @user1.skill_list = "2, 17" @user1.save @user2 = User.new(:name => "Al") @user2.interest_list = "3, 10" @user2.skill_list = "4, 6" @user2.save When I want to get all users who's interest-list include any of the tag ["2", "50"], i tried this: User.tagged_with(["2", "50"], :on => :interests, :any => true) The problem is I get back @user1 (which has "2" in the skill_list, not interest_list), even though I was expecting none. It seems that the flag :any might have overwritten the flag :on. Is there a way to actually perform the filter I described above? Also, a side question is, how do you find all the flags available to a method? For example, tagged_with has :on, :any, :match_all, ..., how do i list all of them ? Thanks for your help, everyone!
0
6,971,333
08/07/2011 07:18:21
871,326
07/31/2011 06:25:07
5
0
How to use themes with gtk+ in windows
I am trying to learn gtk+. I use windows. By default gtk+ gives a look of Windows 98/2000. But on linux there are different themes available. I have downloaded the aurora theme engine and theme. I have also successfully complied it on windows. But don't know how to use it. I am using Mingw/MSYS.
c
themes
mingw
gtk+
null
08/09/2011 15:13:33
off topic
How to use themes with gtk+ in windows === I am trying to learn gtk+. I use windows. By default gtk+ gives a look of Windows 98/2000. But on linux there are different themes available. I have downloaded the aurora theme engine and theme. I have also successfully complied it on windows. But don't know how to use it. I am using Mingw/MSYS.
2
501,302
02/01/2009 18:18:49
27,211
10/12/2008 13:58:16
65
5
Can I Write Or Modify Data On An RFID Tag?
maybe my question would be lost in the forum, but has somebody work with RFID tags? I know I can read them, but can I write or modify the inside data? Does anyone know where can I find more about this?
hardware
null
null
null
null
12/13/2011 14:13:22
off topic
Can I Write Or Modify Data On An RFID Tag? === maybe my question would be lost in the forum, but has somebody work with RFID tags? I know I can read them, but can I write or modify the inside data? Does anyone know where can I find more about this?
2
895,110
05/21/2009 20:56:55
100,288
05/03/2009 14:36:04
589
37
What is your favorite feature of jQuery?
I just had the jQuery epiphany the other day and still feel like there is tons of power in it that I'm not utilizing. So that said, what is your favorite feature of jQuery that saves you time and/or makes your client side applications that much more cool or powerful?
jquery
null
null
null
null
02/22/2012 01:57:22
not constructive
What is your favorite feature of jQuery? === I just had the jQuery epiphany the other day and still feel like there is tons of power in it that I'm not utilizing. So that said, what is your favorite feature of jQuery that saves you time and/or makes your client side applications that much more cool or powerful?
4
7,981,818
11/02/2011 14:17:07
989,103
10/11/2011 08:32:27
67
2
htaccess redirect url parameter as segment
Is it possible to redirect url parameters as segments in .htaccess file? i.e. test/index.php?parameter=MYVALUE to test/MYVALUE/
.htaccess
null
null
null
null
07/27/2012 13:28:50
off topic
htaccess redirect url parameter as segment === Is it possible to redirect url parameters as segments in .htaccess file? i.e. test/index.php?parameter=MYVALUE to test/MYVALUE/
2
7,185,190
08/25/2011 04:35:00
891,157
08/12/2011 05:12:57
23
0
Unbound class path variable java android eclipse problem
What does the meaning of Unbound Class Path variable on Eclipse? I got the error and don't know how to fix it. Thanks in advance
java
android
eclipse
null
null
null
open
Unbound class path variable java android eclipse problem === What does the meaning of Unbound Class Path variable on Eclipse? I got the error and don't know how to fix it. Thanks in advance
0
2,920,335
05/27/2010 10:37:14
350,554
05/26/2010 05:22:50
10
1
how to calculate time difference in PHP
I Have to calculate date time difference how to do that in PHP. I need exact hours , mins and secs. any body have the scripts for that please give me :-P
php
php5
null
null
null
06/03/2012 09:57:11
not a real question
how to calculate time difference in PHP === I Have to calculate date time difference how to do that in PHP. I need exact hours , mins and secs. any body have the scripts for that please give me :-P
1
10,514,235
05/09/2012 10:27:36
989,562
10/11/2011 13:07:19
118
1
How to make an JFrame visible only if the control button is clicked twice
I am creating an desktop application that runs at background and while clicking the control button it should be visible i have made the `setVisible(false)` to the JFrame any idea how to do it . The application should triggered if you click the control button twice in desktop or in any application this should work.
java
swing
null
null
null
null
open
How to make an JFrame visible only if the control button is clicked twice === I am creating an desktop application that runs at background and while clicking the control button it should be visible i have made the `setVisible(false)` to the JFrame any idea how to do it . The application should triggered if you click the control button twice in desktop or in any application this should work.
0
8,456,324
12/10/2011 11:56:58
499,280
11/06/2010 15:20:05
35
2
Change html table cell color depending on its value
Hi i am trying to change the colors of a html table depending on values i read from a database. I am sending an image of what i m trying to achieve. ![table](http://oi40.tinypic.com/ejzuz9.jpg)
php
html
null
null
null
12/10/2011 14:28:56
not a real question
Change html table cell color depending on its value === Hi i am trying to change the colors of a html table depending on values i read from a database. I am sending an image of what i m trying to achieve. ![table](http://oi40.tinypic.com/ejzuz9.jpg)
1
10,535,568
05/10/2012 13:57:53
1,387,287
05/10/2012 13:51:41
1
0
C# and Rich Text Box
Why when right-click on a textbox it showed the copy/cut/paste menu but it's not doing that in the Rich Text box. Does anyone know why? Thanks...
c#
richtextbox
null
null
null
05/10/2012 14:22:29
not a real question
C# and Rich Text Box === Why when right-click on a textbox it showed the copy/cut/paste menu but it's not doing that in the Rich Text box. Does anyone know why? Thanks...
1
11,210,836
06/26/2012 15:34:21
1,477,539
06/24/2012 01:35:23
1
0
What is wrong with my python code?
So I am trying to web scrape (data scrape) a link:http://www.fftoolbox.com/nfl_draft/index.cfm I ger an error that says:AttributeError: 'NoneType' object has no attribute 'findAll' File "/Users/seanyeh/nfl.py", line 8, in <module> rows = soup.findAll("table",{'class': 'grid'})[0].tbody.findAll("tr")[1:] Could anyone please help me solve it? THIS IS MY CODE: import urllib2 from BeautifulSoup import BeautifulSoup # or if your're using BeautifulSoup4: # from bs4 import BeautifulSoup soup = BeautifulSoup(urllib2.urlopen('http://www.fftoolbox.com/nfl_draft/2012/2012-nfl-draft- results.cfm').read()) rows = soup.findAll("table",{'class': 'grid'})[0].tbody.findAll("tr")[1:] for row in rows: fields = row.findAll("td") if len(fields) >= 3: anchor = row.findAll("tr")[2].find("a") if anchor: print anchor[0].string
python
data
python-2.7
web-scraping
nfl
06/26/2012 15:48:14
too localized
What is wrong with my python code? === So I am trying to web scrape (data scrape) a link:http://www.fftoolbox.com/nfl_draft/index.cfm I ger an error that says:AttributeError: 'NoneType' object has no attribute 'findAll' File "/Users/seanyeh/nfl.py", line 8, in <module> rows = soup.findAll("table",{'class': 'grid'})[0].tbody.findAll("tr")[1:] Could anyone please help me solve it? THIS IS MY CODE: import urllib2 from BeautifulSoup import BeautifulSoup # or if your're using BeautifulSoup4: # from bs4 import BeautifulSoup soup = BeautifulSoup(urllib2.urlopen('http://www.fftoolbox.com/nfl_draft/2012/2012-nfl-draft- results.cfm').read()) rows = soup.findAll("table",{'class': 'grid'})[0].tbody.findAll("tr")[1:] for row in rows: fields = row.findAll("td") if len(fields) >= 3: anchor = row.findAll("tr")[2].find("a") if anchor: print anchor[0].string
3
9,419,830
02/23/2012 19:27:39
510,346
11/17/2010 04:07:26
736
18
html: q versus p with quotes
The q element for short quotes adds quotation marks to the text. Can you tell me how this is advantageous to simply using quotes (i.e. " ") directly within a paragraph? One could style it specially, but it seems like one could use a span element for that too, so what's the main advantage(s) of the q element? Thanks
html
css
null
null
null
null
open
html: q versus p with quotes === The q element for short quotes adds quotation marks to the text. Can you tell me how this is advantageous to simply using quotes (i.e. " ") directly within a paragraph? One could style it specially, but it seems like one could use a span element for that too, so what's the main advantage(s) of the q element? Thanks
0
9,119,731
02/02/2012 20:44:33
520,692
11/25/2010 22:15:54
1,215
18
Why shouldn't we put business logic in services? Will we ever replace our services?
I am designing a system and I have read many articles saying don't put business logic in your service code. And only put your business logic in your domain objects. I am not hosting my service code anywhere and it is directly accessed by my presentation layer. In future, I might want to expose this service code via WCF IIS service. But I don't understand why services should be light-weight? What is the advantage of it? When will we ever replace our services? Please explain
c#
java
visual-studio-2010
asp.net-mvc-3
null
null
open
Why shouldn't we put business logic in services? Will we ever replace our services? === I am designing a system and I have read many articles saying don't put business logic in your service code. And only put your business logic in your domain objects. I am not hosting my service code anywhere and it is directly accessed by my presentation layer. In future, I might want to expose this service code via WCF IIS service. But I don't understand why services should be light-weight? What is the advantage of it? When will we ever replace our services? Please explain
0
10,016,284
04/04/2012 17:28:26
1,238,934
02/28/2012 22:00:36
102
1
xcode loading view
I would like to show a progress view while my app is downloading files when starts. Loading view should be active until download ends, then, main tab controller will be shown. Which is the best method to reach it? Thanks
iphone
objective-c
ios
xcode
null
null
open
xcode loading view === I would like to show a progress view while my app is downloading files when starts. Loading view should be active until download ends, then, main tab controller will be shown. Which is the best method to reach it? Thanks
0
1,727,079
11/13/2009 04:07:36
209,631
11/12/2009 14:07:19
1
0
Is it practical to learn and use visual basic 6 as a 2nd year BSIT student?
Is it wise to learn and use visual basic 6 in these days? Because many powerful programming languages are emerging. If no, then why and what is the best programming language to use as a Bachelor of Science in Information Technology student?
vb
6
vb6
null
null
05/08/2012 15:56:22
not constructive
Is it practical to learn and use visual basic 6 as a 2nd year BSIT student? === Is it wise to learn and use visual basic 6 in these days? Because many powerful programming languages are emerging. If no, then why and what is the best programming language to use as a Bachelor of Science in Information Technology student?
4
6,242,131
06/05/2011 09:49:32
784,610
06/05/2011 09:35:58
1
0
Using AVAssetReader to read from a remote asset (streaming)
My main purpose is to stream a video from a server, and cut it frame by frame while streaming (in order to be used by opengl). For that, I've used this code that I found everywhere on the internet (as I recall it was from Apple's GLVideoFrame sample code): NSArray * tracks = [asset tracks]; NSLog(@"%d", tracks.count); for(AVAssetTrack* track in tracks) { NSLog(@"type: %@", [track mediaType]); initialFPS = track.nominalFrameRate; width = (GLuint)track.naturalSize.width; height = (GLuint)track.naturalSize.height; NSError * error = nil; // _movieReader is a member variable @try { self._movieReader = [[[AVAssetReader alloc] initWithAsset:asset error:&error] autorelease]; } @catch (NSException *exception) { NSLog(@"%@ -- %@", [exception name], [exception reason]); NSLog(@"skipping track"); continue; } if (error) { NSLog(@"CODE:%d\nDOMAIN:%@\nDESCRIPTION:%@\nFAILURE_REASON:%@", [error code], [error domain], error.localizedDescription, [error localizedFailureReason]); continue; } NSString* key = (NSString*)kCVPixelBufferPixelFormatTypeKey; NSNumber* value = [NSNumber numberWithUnsignedInt:kCVPixelFormatType_32BGRA]; NSDictionary* videoSettings = [NSDictionary dictionaryWithObject:value forKey:key]; [_movieReader addOutput:[AVAssetReaderTrackOutput assetReaderTrackOutputWithTrack:track outputSettings:videoSettings]]; [_movieReader startReading]; [self performSelectorOnMainThread:@selector(frameStarter) withObject:nil waitUntilDone:NO]; } }); But I always get this exception at the [[AVAssetReader alloc] initWithAsset:error:] : NSInvalidArgumentException -- *** -[AVAssetReader initWithAsset:error:] Cannot initialize an instance of AVAssetReader with an asset at non-local URL 'http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8' So my two questions are: 1. Is it really what I'm getting from the exception that AVAssetReader must have a local URL? can it be used for streaming (just like the rest of AVFoundation classes)? 2. If the AVFoundation approach won't work, what are other suggestions to stream the video and splitting its frames at the same time? Thanks a lot for your help.
iphone
objective-c
video-streaming
avfoundation
null
null
open
Using AVAssetReader to read from a remote asset (streaming) === My main purpose is to stream a video from a server, and cut it frame by frame while streaming (in order to be used by opengl). For that, I've used this code that I found everywhere on the internet (as I recall it was from Apple's GLVideoFrame sample code): NSArray * tracks = [asset tracks]; NSLog(@"%d", tracks.count); for(AVAssetTrack* track in tracks) { NSLog(@"type: %@", [track mediaType]); initialFPS = track.nominalFrameRate; width = (GLuint)track.naturalSize.width; height = (GLuint)track.naturalSize.height; NSError * error = nil; // _movieReader is a member variable @try { self._movieReader = [[[AVAssetReader alloc] initWithAsset:asset error:&error] autorelease]; } @catch (NSException *exception) { NSLog(@"%@ -- %@", [exception name], [exception reason]); NSLog(@"skipping track"); continue; } if (error) { NSLog(@"CODE:%d\nDOMAIN:%@\nDESCRIPTION:%@\nFAILURE_REASON:%@", [error code], [error domain], error.localizedDescription, [error localizedFailureReason]); continue; } NSString* key = (NSString*)kCVPixelBufferPixelFormatTypeKey; NSNumber* value = [NSNumber numberWithUnsignedInt:kCVPixelFormatType_32BGRA]; NSDictionary* videoSettings = [NSDictionary dictionaryWithObject:value forKey:key]; [_movieReader addOutput:[AVAssetReaderTrackOutput assetReaderTrackOutputWithTrack:track outputSettings:videoSettings]]; [_movieReader startReading]; [self performSelectorOnMainThread:@selector(frameStarter) withObject:nil waitUntilDone:NO]; } }); But I always get this exception at the [[AVAssetReader alloc] initWithAsset:error:] : NSInvalidArgumentException -- *** -[AVAssetReader initWithAsset:error:] Cannot initialize an instance of AVAssetReader with an asset at non-local URL 'http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8' So my two questions are: 1. Is it really what I'm getting from the exception that AVAssetReader must have a local URL? can it be used for streaming (just like the rest of AVFoundation classes)? 2. If the AVFoundation approach won't work, what are other suggestions to stream the video and splitting its frames at the same time? Thanks a lot for your help.
0
3,972,888
10/19/2010 21:23:35
472,056
10/11/2010 07:55:39
353
19
Interview question: the duck and the fox
Brainteaser i have been given while competing for C++ programmer vacancy. Assume there is the pond of perfect circle shape. Right in the center of this pond the duck sits on a water. And right at the coast the fox stays. Of course she cannot swim. The fox is constantly trying to chase and catch the duck so her primary objective is to stay as close to the duck as it is possible. And it I had believed i found the solution but then it turned out to be incorrect.
c++
algorithm
interview-questions
brainteaser
null
10/19/2010 21:30:12
not a real question
Interview question: the duck and the fox === Brainteaser i have been given while competing for C++ programmer vacancy. Assume there is the pond of perfect circle shape. Right in the center of this pond the duck sits on a water. And right at the coast the fox stays. Of course she cannot swim. The fox is constantly trying to chase and catch the duck so her primary objective is to stay as close to the duck as it is possible. And it I had believed i found the solution but then it turned out to be incorrect.
1
9,955,734
03/31/2012 12:11:16
310,291
03/02/2010 15:22:39
3,813
21
What traits lib really brings to javascript?
Javascript already support extension so what real supplement advantages would jstraits http://code.google.com/p/jstraits/ would bring to it ?
javascript
oop
traits
null
null
04/01/2012 12:44:58
not a real question
What traits lib really brings to javascript? === Javascript already support extension so what real supplement advantages would jstraits http://code.google.com/p/jstraits/ would bring to it ?
1
11,243,285
06/28/2012 11:06:29
1,414,157
05/24/2012 05:21:27
12
0
create a wizard using winforms
I want to implement a wizard using winforms and VS 2010. i got this [tutorial](http://www.codeproject.com/Articles/120607/Simple-Wizard-for-WinForms), but as i'm new to Visual Studio and C# i don't really understand it. could someone help me out? my main problem is taht i don't know where to put the listings in this tutorial? should i put all the code in one class? or in one form.cs? or how is it divided? greetz Bl!tz
c#
winforms
wizard
null
null
06/29/2012 12:53:37
not a real question
create a wizard using winforms === I want to implement a wizard using winforms and VS 2010. i got this [tutorial](http://www.codeproject.com/Articles/120607/Simple-Wizard-for-WinForms), but as i'm new to Visual Studio and C# i don't really understand it. could someone help me out? my main problem is taht i don't know where to put the listings in this tutorial? should i put all the code in one class? or in one form.cs? or how is it divided? greetz Bl!tz
1
7,489,000
09/20/2011 17:11:26
903,612
08/20/2011 09:59:22
18
0
What MAC address see server
I execute command arp -a on my windows and get it: Interface: 192.168.1.33 --- 0xb address Physical address Type 192.168.1.1 40-4a-03-20-82-0e dynamic 192.168.1.255 ff-ff-ff-ff-ff-ff static 224.0.0.2 01-00-5e-00-00-02 static 224.0.0.22 01-00-5e-00-00-16 static 224.0.0.252 01-00-5e-00-00-fc static 239.255.255.250 01-00-5e-7f-ff-fa static 192.168.1.33 is my modem, i add iptables rule to server: /sbin/iptables -I INPUT -m mac --mac-source 40-4a-03-20-82-0e -j DROP /sbin/iptables -I INPUT -m mac --mac-source 01-00-5e-7f-ff-fa -j DROP but i still have access to server, which mac address i must use to add to iptables rule? Thanks!
osx
drop
iptables
null
null
09/20/2011 17:36:39
off topic
What MAC address see server === I execute command arp -a on my windows and get it: Interface: 192.168.1.33 --- 0xb address Physical address Type 192.168.1.1 40-4a-03-20-82-0e dynamic 192.168.1.255 ff-ff-ff-ff-ff-ff static 224.0.0.2 01-00-5e-00-00-02 static 224.0.0.22 01-00-5e-00-00-16 static 224.0.0.252 01-00-5e-00-00-fc static 239.255.255.250 01-00-5e-7f-ff-fa static 192.168.1.33 is my modem, i add iptables rule to server: /sbin/iptables -I INPUT -m mac --mac-source 40-4a-03-20-82-0e -j DROP /sbin/iptables -I INPUT -m mac --mac-source 01-00-5e-7f-ff-fa -j DROP but i still have access to server, which mac address i must use to add to iptables rule? Thanks!
2
7,733,040
10/11/2011 22:00:22
445,299
09/11/2010 21:35:07
52
13
IS there a way to determine if a bluetooth device is a headset other than from device class or major class?
I'm using device class to determine if a handsfree headset is connected. But I found out that Qnine 3.0 doesn't have a distinguishable device id or class id. Both of which are zeros. Android OS knows that it is a headset and update the status icon--But for my app, I need an alternative way to determine that it is a headset.
android
class
bluetooth
headset
null
null
open
IS there a way to determine if a bluetooth device is a headset other than from device class or major class? === I'm using device class to determine if a handsfree headset is connected. But I found out that Qnine 3.0 doesn't have a distinguishable device id or class id. Both of which are zeros. Android OS knows that it is a headset and update the status icon--But for my app, I need an alternative way to determine that it is a headset.
0
6,950,976
08/05/2011 03:09:02
877,629
08/03/2011 23:55:04
9
0
PHP - Difficulty switching between code
I'm in a bit of a predicament with a much larger code than this, but this is roughly how it is... <?php $other = 'white'; $array = array(red, blue, red, red, red); foreach($array[1] as $match) //OR $match = $other; { //Core Area if($match = 'red') { echo 'RED!'; } if($match = 'blue') { echo 'BLUE!'; } if($match = 'white') { echo 'white!'; } ?> } As it is now, **$other** *cannot* enter the core area without the **foreach** being in the way. The alternative being cloning -- via copy n' paste -- to another place. ...Which wont work very well... I've tried placing the area in a function, but without many of global values, it does not seem like a viable option. So I was wondering if there was anyway to switch between the **foreach** and the **Equals to**. If not, I understand.. I appreciate any help, thanks! ...Hopefully I'm just missing something.
php
between
switching
null
null
07/08/2012 01:00:49
not a real question
PHP - Difficulty switching between code === I'm in a bit of a predicament with a much larger code than this, but this is roughly how it is... <?php $other = 'white'; $array = array(red, blue, red, red, red); foreach($array[1] as $match) //OR $match = $other; { //Core Area if($match = 'red') { echo 'RED!'; } if($match = 'blue') { echo 'BLUE!'; } if($match = 'white') { echo 'white!'; } ?> } As it is now, **$other** *cannot* enter the core area without the **foreach** being in the way. The alternative being cloning -- via copy n' paste -- to another place. ...Which wont work very well... I've tried placing the area in a function, but without many of global values, it does not seem like a viable option. So I was wondering if there was anyway to switch between the **foreach** and the **Equals to**. If not, I understand.. I appreciate any help, thanks! ...Hopefully I'm just missing something.
1
11,300,051
07/02/2012 19:36:13
111,910
05/25/2009 02:33:50
1,146
23
Can MySQL reasonably perform queries on billions of rows?
I am planning on storing scans from a mass spectrometer in a MySQL database and would like to know whether storing and analyzing this amount of data is remotely feasible. I know performance varies wildly depending on the environment, but I'm looking for the rough order of magnitude: will queries take 5 days or 5 milliseconds? # Input format Each input file contains a single run of the spectrometer; each run is comprised of a set of scans, and each scan has an ordered array of datapoints. There is a bit of metadata, but the majority of the file is comprised of arrays 32- or 64-bit ints or floats. # Host system <pre> |----------------+-------------------------------| | OS | Windows 2008 64-bit | | MySQL version | 5.5.24 (x86_64) | | CPU | 2x Xeon E5420 (8 cores total) | | RAM | 8GB | | SSD filesystem | 500 GiB | | HDD RAID | 12 TiB | |----------------+-------------------------------| </pre> There are some other services running on the server using negligible processor time. # File statistics <pre> |------------------+--------------| | number of files | ~16,000 | | total size | 1.3 TiB | | min size | 0 bytes | | max size | 12 GiB | | mean | 800 MiB | | median | 500 MiB | | total datapoints | ~200 billion | |------------------+--------------| </pre> The total number of datapoints is a _very_ rough estimate. # Proposed schema I'm planning on doing things "right" (i.e. normalizing the data like crazy) and so would have a `runs` table, a `spectra` table with a foreign key to `runs`, and a `datapoints` table with a foreign key to `spectra`. # The 200 Billion datapoint question I am going to be analyzing across multiple spectra and possibly even multiple runs, resulting in queries which could touch millions of rows. Assuming I index everything properly (which is a topic for another question) and am not trying to shuffle hundreds of MiB across the network, is it remotely plausible for MySQL to handle this?
mysql
sql
performance
null
null
07/03/2012 18:14:59
off topic
Can MySQL reasonably perform queries on billions of rows? === I am planning on storing scans from a mass spectrometer in a MySQL database and would like to know whether storing and analyzing this amount of data is remotely feasible. I know performance varies wildly depending on the environment, but I'm looking for the rough order of magnitude: will queries take 5 days or 5 milliseconds? # Input format Each input file contains a single run of the spectrometer; each run is comprised of a set of scans, and each scan has an ordered array of datapoints. There is a bit of metadata, but the majority of the file is comprised of arrays 32- or 64-bit ints or floats. # Host system <pre> |----------------+-------------------------------| | OS | Windows 2008 64-bit | | MySQL version | 5.5.24 (x86_64) | | CPU | 2x Xeon E5420 (8 cores total) | | RAM | 8GB | | SSD filesystem | 500 GiB | | HDD RAID | 12 TiB | |----------------+-------------------------------| </pre> There are some other services running on the server using negligible processor time. # File statistics <pre> |------------------+--------------| | number of files | ~16,000 | | total size | 1.3 TiB | | min size | 0 bytes | | max size | 12 GiB | | mean | 800 MiB | | median | 500 MiB | | total datapoints | ~200 billion | |------------------+--------------| </pre> The total number of datapoints is a _very_ rough estimate. # Proposed schema I'm planning on doing things "right" (i.e. normalizing the data like crazy) and so would have a `runs` table, a `spectra` table with a foreign key to `runs`, and a `datapoints` table with a foreign key to `spectra`. # The 200 Billion datapoint question I am going to be analyzing across multiple spectra and possibly even multiple runs, resulting in queries which could touch millions of rows. Assuming I index everything properly (which is a topic for another question) and am not trying to shuffle hundreds of MiB across the network, is it remotely plausible for MySQL to handle this?
2
4,747,386
01/20/2011 12:57:18
437,938
07/15/2010 16:18:26
11
0
OleDB Provider for Oracle not found in in Windows Server 2008 with IIS 7
I'm deploying a small ASP.NET (framework 3.5) application in a Windows Server Web 2008 32 bits, IIS 7. The applications needs connection to an Oracle DB in another Server, using the tradicional DataAdapter, Oracle Connection, etc. I´ve installed correctly the Oracle Client in the server (the server is another server´s client) and I´ve checked that this server has access to the server where the database is. Even though my app isn´t able to connect to DataBase. The message says that Oracle components haven´t been found. It doesn´t find the OleDB Provider for Oracle or some dll. ¿Something I shluod know about permissions of the ASP.NEt users or something like this? Some idea?? Thanks in advance. Gus.
asp.net
oracle
iis7
windows-server-2008
null
null
open
OleDB Provider for Oracle not found in in Windows Server 2008 with IIS 7 === I'm deploying a small ASP.NET (framework 3.5) application in a Windows Server Web 2008 32 bits, IIS 7. The applications needs connection to an Oracle DB in another Server, using the tradicional DataAdapter, Oracle Connection, etc. I´ve installed correctly the Oracle Client in the server (the server is another server´s client) and I´ve checked that this server has access to the server where the database is. Even though my app isn´t able to connect to DataBase. The message says that Oracle components haven´t been found. It doesn´t find the OleDB Provider for Oracle or some dll. ¿Something I shluod know about permissions of the ASP.NEt users or something like this? Some idea?? Thanks in advance. Gus.
0
11,093,975
06/19/2012 03:24:35
1,192,728
02/06/2012 16:22:52
828
39
Lex : All ways meet error at Rules Section
I started to use Lex for my homework. In my Lex file, I always meet errors when go to first line of Rules Section. I have tested on sample code in books. Here is the errors that Flex throw : > Error: Parse error at line 2. Description: Badly formed macro > definition. And here is my code. int num_lines = 0, num_chars = 0; %% \n ++num_lines; ++num_chars; // error here . ++num_chars; %% main() { yylex(); printf( "# of lines = %d, # of chars = %d\n", num_lines, num_chars ); } Thanks :)
lex
null
null
null
null
null
open
Lex : All ways meet error at Rules Section === I started to use Lex for my homework. In my Lex file, I always meet errors when go to first line of Rules Section. I have tested on sample code in books. Here is the errors that Flex throw : > Error: Parse error at line 2. Description: Badly formed macro > definition. And here is my code. int num_lines = 0, num_chars = 0; %% \n ++num_lines; ++num_chars; // error here . ++num_chars; %% main() { yylex(); printf( "# of lines = %d, # of chars = %d\n", num_lines, num_chars ); } Thanks :)
0
2,203,640
02/04/2010 22:14:21
163,768
08/26/2009 19:47:08
126
29
Cannot install into c:\Program files on Widndows 7
I have an installer written in Java using Izpack. It works OK on Windows XP, however on Windows 7 it cannot write to c:\Program Files. Strangely enough, as a user running this installer I can create folders under c:\program files, but not from the installer itself. What am I missing ?
windows
permissions
null
null
null
null
open
Cannot install into c:\Program files on Widndows 7 === I have an installer written in Java using Izpack. It works OK on Windows XP, however on Windows 7 it cannot write to c:\Program Files. Strangely enough, as a user running this installer I can create folders under c:\program files, but not from the installer itself. What am I missing ?
0
5,613,849
04/10/2011 18:31:36
650,679
03/08/2011 23:53:44
1
0
How to distinguish between labels?
I built a hexagonal table, each hexagonal I put on a label ... Now I noticed that there is overlap between the hexagons because the shape of the label is a square ..because of that i have a problem when I clicking the cursor at the edges of the hexagonal the hexagonal do not know what I mean. How can I sit a bit even though the labels on the second one also notice on some labels I clicked in a simple words how can I do when I come inside the hexagonal image the mouse will know that this is the label
java
algorithm
null
null
null
04/11/2011 07:26:55
not a real question
How to distinguish between labels? === I built a hexagonal table, each hexagonal I put on a label ... Now I noticed that there is overlap between the hexagons because the shape of the label is a square ..because of that i have a problem when I clicking the cursor at the edges of the hexagonal the hexagonal do not know what I mean. How can I sit a bit even though the labels on the second one also notice on some labels I clicked in a simple words how can I do when I come inside the hexagonal image the mouse will know that this is the label
1
625,668
03/09/2009 10:15:48
55,377
01/15/2009 10:20:16
173
16
Custom writing OleDbCommand commands.
I have (another) question about writing OleDbCommand's. I have a complex select command (includes several left joins) and OleDbCommandBuilder is unable to generate update commands for me. I can't seem to grasp the magic behind writing update commands. I know the structure of the SQL update statement, however I am a bit puzzled about how this works with OleDbDataAdapter. I know that when I call adapter.Update() it will update only the necessary rows of DataTable, however I don't know how to write a Update command so it will be able to know what field in *what table* needs updating. I would really appreciate if someone could explain the process to me and point me in the right direction.
c#
sql
oledbcommand
oledb
null
null
open
Custom writing OleDbCommand commands. === I have (another) question about writing OleDbCommand's. I have a complex select command (includes several left joins) and OleDbCommandBuilder is unable to generate update commands for me. I can't seem to grasp the magic behind writing update commands. I know the structure of the SQL update statement, however I am a bit puzzled about how this works with OleDbDataAdapter. I know that when I call adapter.Update() it will update only the necessary rows of DataTable, however I don't know how to write a Update command so it will be able to know what field in *what table* needs updating. I would really appreciate if someone could explain the process to me and point me in the right direction.
0
7,883,371
10/25/2011 00:16:26
988,274
10/10/2011 19:21:41
20
0
What platform to choose for an eshop?
I want to ask 2 questions/topics: **1.** I have to deliver an eshop for a clothing boutique. I want to ask if someone has worked on similar projects(eCommerce) what platform would you use? I checked some solutions like shoppica for open-cart and some other templates for VirtueMart in Joomla. Any ideas? **2.** The structure of the site will be something like that: www.company.com (in wordpress) and shop.company.com Is it a problem if the site is in wordpress and the eshop in Joomla??? Or it doesnt matter at all?
e-commerce
null
null
null
null
10/25/2011 23:11:17
not constructive
What platform to choose for an eshop? === I want to ask 2 questions/topics: **1.** I have to deliver an eshop for a clothing boutique. I want to ask if someone has worked on similar projects(eCommerce) what platform would you use? I checked some solutions like shoppica for open-cart and some other templates for VirtueMart in Joomla. Any ideas? **2.** The structure of the site will be something like that: www.company.com (in wordpress) and shop.company.com Is it a problem if the site is in wordpress and the eshop in Joomla??? Or it doesnt matter at all?
4
11,567,860
07/19/2012 19:22:46
1,174,762
01/28/2012 03:54:00
170
2
Clicking page elements and using them as form data
I am making a site that has a photos page. On the photos page I would like to have albums and also single photos. I would also like users to have the ability to create a new album, by just clicking my "+create album" button, and then simply clicking images that they would like to have stored in that album. I am unsure of what I need to know how to do. I know how to create a form, which is basically what I need, and use php to store the data in my database to create the album, but what I don't know how to do is have values entered into my form by users from just simply clicking the images they want in the album. Here is an illustration, with steps. ![Album Creation Process][1] [1]: http://i.stack.imgur.com/xfp6e.png
php
javascript
jquery
mysql
html
07/20/2012 02:04:45
not a real question
Clicking page elements and using them as form data === I am making a site that has a photos page. On the photos page I would like to have albums and also single photos. I would also like users to have the ability to create a new album, by just clicking my "+create album" button, and then simply clicking images that they would like to have stored in that album. I am unsure of what I need to know how to do. I know how to create a form, which is basically what I need, and use php to store the data in my database to create the album, but what I don't know how to do is have values entered into my form by users from just simply clicking the images they want in the album. Here is an illustration, with steps. ![Album Creation Process][1] [1]: http://i.stack.imgur.com/xfp6e.png
1
7,868,093
10/23/2011 18:12:45
312,920
01/16/2010 17:32:42
45
0
how 160by2.com works ? What technology ? VOIP ? GSM modem hosting?
160by2.com, way2sms.com .. these (india)websites allows user to signup a mobile number after verifying the mobile number, and allows user to send sms to other mobile number with their number as the caller id. This service is free of cost. They have given most space in the website for advertising (to generate income). But How it works ? What technology ? How they can afford the service in free of cost ? Is it possible in VOIP (to send sms with user's own mobile number as caller id) or any other technology ? however they should pay for every sms.. Am i right ?
sms
voip
sms-gateway
null
null
10/24/2011 02:14:49
off topic
how 160by2.com works ? What technology ? VOIP ? GSM modem hosting? === 160by2.com, way2sms.com .. these (india)websites allows user to signup a mobile number after verifying the mobile number, and allows user to send sms to other mobile number with their number as the caller id. This service is free of cost. They have given most space in the website for advertising (to generate income). But How it works ? What technology ? How they can afford the service in free of cost ? Is it possible in VOIP (to send sms with user's own mobile number as caller id) or any other technology ? however they should pay for every sms.. Am i right ?
2
2,971,561
06/04/2010 04:42:03
260,665
01/28/2010 05:14:09
242
26
Design Patterns and Prinicples
I have recently experienced and understood the importance of "Design Patterns and Principles" implemented in our project. I was just wondering if you all would share the importance of Design patterns and principles, of how using them in your source code the project was enhanced, so that we can learn out of your vast programming experiences. Also, do post some pointers and links for skill enhancement related to Design patterns and Principles. Thanks and Regards, Raj
design
design-patterns
oop
null
null
06/05/2010 06:16:55
not a real question
Design Patterns and Prinicples === I have recently experienced and understood the importance of "Design Patterns and Principles" implemented in our project. I was just wondering if you all would share the importance of Design patterns and principles, of how using them in your source code the project was enhanced, so that we can learn out of your vast programming experiences. Also, do post some pointers and links for skill enhancement related to Design patterns and Principles. Thanks and Regards, Raj
1
5,192,255
03/04/2011 10:02:32
644,503
03/04/2011 10:02:32
1
0
How to calculate distance of a running person in Objective C
I would like to make an application on xCode for iPad to check the speed of person running on treadmill. I am really getting no idea, how to do it? Can anyone give me some idea,sample codes etc to do it? Should we have to use accelerometer/speedometer for this? If yes then how can we use accelerometer/speedometer? I am very new to iPhone development. Any idea would be appreciated greatly in this regards. Looking forward for your positive and quick responses.
objective-c
null
null
null
null
03/25/2012 16:25:11
not a real question
How to calculate distance of a running person in Objective C === I would like to make an application on xCode for iPad to check the speed of person running on treadmill. I am really getting no idea, how to do it? Can anyone give me some idea,sample codes etc to do it? Should we have to use accelerometer/speedometer for this? If yes then how can we use accelerometer/speedometer? I am very new to iPhone development. Any idea would be appreciated greatly in this regards. Looking forward for your positive and quick responses.
1
10,409,382
05/02/2012 07:22:27
1,051,411
11/17/2011 09:21:26
3
0
Are there any open source projects such as Adobe Proto?
I am planning to build a client interface creating simple templates that is quite similar to how wireframes are done. For example, I like how adobe proto, http://www.adobe.com/products/proto.html, allows people to just drag in different pre built functions which can then be easily exported. I searched source forge for such projects, but can't find. Thanks in advance for helping.
php
jquery
html5
adobe
wireframe
05/03/2012 13:09:37
not constructive
Are there any open source projects such as Adobe Proto? === I am planning to build a client interface creating simple templates that is quite similar to how wireframes are done. For example, I like how adobe proto, http://www.adobe.com/products/proto.html, allows people to just drag in different pre built functions which can then be easily exported. I searched source forge for such projects, but can't find. Thanks in advance for helping.
4
7,316,080
09/06/2011 07:04:08
906,078
08/22/2011 14:35:14
16
0
Do ssl certificates apply to the server or the hostname?
Im new to hosting sites with ssl certificates and i wanted to know, if the server is running an iis server with a site and i now install apache on the same server, does the certificate apply to both hosts and if not, if i use the same dns/site address will it then apply?
apache
iis
ssl
null
null
09/06/2011 15:12:46
off topic
Do ssl certificates apply to the server or the hostname? === Im new to hosting sites with ssl certificates and i wanted to know, if the server is running an iis server with a site and i now install apache on the same server, does the certificate apply to both hosts and if not, if i use the same dns/site address will it then apply?
2
9,381,269
02/21/2012 16:31:12
1,083,895
12/06/2011 16:18:28
5
0
Nullpointerexception when togglebutton is clicked
I am trying to get a ToggleButton working but am having a few problems. 1. Its seems to revert back to the default value when it is clicked and I navigate to another screen. 2. I tried transferring its isChecked() value to another activity using SharedPreferences and it now crashes. <ToggleButton android:id="@+id/togBTN" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/homeBtn" android:layout_centerHorizontal="true" android:layout_marginTop="106dp" android:text="Voice Alerts" android:textOff="OFF" android:textOn="ON" /> The above code is in my xml file. The code below is the onClickListener code for it. case R.id.togBTN: SharedPreferences.Editor editor = preferences.edit(); editor.putBoolean("tgpref", tg.isChecked()); // value to store editor.commit(); break; } And this code is where I try to retrieve the value SharedPreferences preferences = getPreferences(MODE_PRIVATE); boolean tgpref = preferences.getBoolean("tgpref", true); //default is true if (tgpref = true) //if (tgpref) may be enough, not sure { speakValue = true; } else { speakValue = false; } This is what I am getting in the log cat. 02-21 14:49:09.587: W/dalvikvm(483): threadid=1: thread exiting with uncaught exception (group=0x40015560) 02-21 14:49:09.597: E/AndroidRuntime(483): FATAL EXCEPTION: main 02-21 14:49:09.597: E/AndroidRuntime(483): java.lang.NullPointerException 02-21 14:49:09.597: E/AndroidRuntime(483): at ohalleran.stephanie.Traffic.SettingsActivity.onClick(SettingsActivity.java:45) 02-21 14:49:09.597: E/AndroidRuntime(483): at android.view.View.performClick(View.java:2485) 02-21 14:49:09.597: E/AndroidRuntime(483): at android.widget.CompoundButton.performClick(CompoundButton.java:99) 02-21 14:49:09.597: E/AndroidRuntime(483): at android.view.View$PerformClick.run(View.java:9080) 02-21 14:49:09.597: E/AndroidRuntime(483): at android.os.Handler.handleCallback(Handler.java:587) 02-21 14:49:09.597: E/AndroidRuntime(483): at android.os.Handler.dispatchMessage(Handler.java:92) 02-21 14:49:09.597: E/AndroidRuntime(483): at android.os.Looper.loop(Looper.java:130) 02-21 14:49:09.597: E/AndroidRuntime(483): at android.app.ActivityThread.main(ActivityThread.java:3683) 02-21 14:49:09.597: E/AndroidRuntime(483): at java.lang.reflect.Method.invokeNative(Native Method) 02-21 14:49:09.597: E/AndroidRuntime(483): at java.lang.reflect.Method.invoke(Method.java:507) 02-21 14:49:09.597: E/AndroidRuntime(483): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 02-21 14:49:09.597: E/AndroidRuntime(483): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 02-21 14:49:09.597: E/AndroidRuntime(483): at dalvik.system.NativeStart.main(Native Method) Would really appreciate some help with this.
android
sharedpreferences
togglebutton
null
null
null
open
Nullpointerexception when togglebutton is clicked === I am trying to get a ToggleButton working but am having a few problems. 1. Its seems to revert back to the default value when it is clicked and I navigate to another screen. 2. I tried transferring its isChecked() value to another activity using SharedPreferences and it now crashes. <ToggleButton android:id="@+id/togBTN" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/homeBtn" android:layout_centerHorizontal="true" android:layout_marginTop="106dp" android:text="Voice Alerts" android:textOff="OFF" android:textOn="ON" /> The above code is in my xml file. The code below is the onClickListener code for it. case R.id.togBTN: SharedPreferences.Editor editor = preferences.edit(); editor.putBoolean("tgpref", tg.isChecked()); // value to store editor.commit(); break; } And this code is where I try to retrieve the value SharedPreferences preferences = getPreferences(MODE_PRIVATE); boolean tgpref = preferences.getBoolean("tgpref", true); //default is true if (tgpref = true) //if (tgpref) may be enough, not sure { speakValue = true; } else { speakValue = false; } This is what I am getting in the log cat. 02-21 14:49:09.587: W/dalvikvm(483): threadid=1: thread exiting with uncaught exception (group=0x40015560) 02-21 14:49:09.597: E/AndroidRuntime(483): FATAL EXCEPTION: main 02-21 14:49:09.597: E/AndroidRuntime(483): java.lang.NullPointerException 02-21 14:49:09.597: E/AndroidRuntime(483): at ohalleran.stephanie.Traffic.SettingsActivity.onClick(SettingsActivity.java:45) 02-21 14:49:09.597: E/AndroidRuntime(483): at android.view.View.performClick(View.java:2485) 02-21 14:49:09.597: E/AndroidRuntime(483): at android.widget.CompoundButton.performClick(CompoundButton.java:99) 02-21 14:49:09.597: E/AndroidRuntime(483): at android.view.View$PerformClick.run(View.java:9080) 02-21 14:49:09.597: E/AndroidRuntime(483): at android.os.Handler.handleCallback(Handler.java:587) 02-21 14:49:09.597: E/AndroidRuntime(483): at android.os.Handler.dispatchMessage(Handler.java:92) 02-21 14:49:09.597: E/AndroidRuntime(483): at android.os.Looper.loop(Looper.java:130) 02-21 14:49:09.597: E/AndroidRuntime(483): at android.app.ActivityThread.main(ActivityThread.java:3683) 02-21 14:49:09.597: E/AndroidRuntime(483): at java.lang.reflect.Method.invokeNative(Native Method) 02-21 14:49:09.597: E/AndroidRuntime(483): at java.lang.reflect.Method.invoke(Method.java:507) 02-21 14:49:09.597: E/AndroidRuntime(483): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 02-21 14:49:09.597: E/AndroidRuntime(483): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 02-21 14:49:09.597: E/AndroidRuntime(483): at dalvik.system.NativeStart.main(Native Method) Would really appreciate some help with this.
0
9,448,330
02/25/2012 21:41:27
1,233,075
02/25/2012 21:36:44
1
0
I cant get the user information from the facebook REQUEST when they log in
I am trying to implement a simple Facebook log in button, so that users can log into my site in the same fashion that I did when I found this site. But when they click the log in button I have, the window pops up and asks for permission from the user. However I do not know how to collect the email address and user data to add it to my DB so that I can create them an account and etc.
database
facebook
data
login
request
02/26/2012 03:58:51
not a real question
I cant get the user information from the facebook REQUEST when they log in === I am trying to implement a simple Facebook log in button, so that users can log into my site in the same fashion that I did when I found this site. But when they click the log in button I have, the window pops up and asks for permission from the user. However I do not know how to collect the email address and user data to add it to my DB so that I can create them an account and etc.
1
8,471,315
12/12/2011 07:51:57
1,022,866
10/31/2011 23:34:25
8
0
Change download link depending on browser
ok so why wont this work i have my java script <head> <script type="text/javascript"> if (navigator.userAgent.match(/like Mac OS X/i)) { document.getElementById('down').href="http://www.google.com"; } </script> </head> and in the body i have <div style="text-align: center;"><a href="http://www.twitter.com" id="down"><img src="img/download.gif"/></a></div> but it simply just dosnt work :/
javascript
html
null
null
null
12/12/2011 15:01:10
not a real question
Change download link depending on browser === ok so why wont this work i have my java script <head> <script type="text/javascript"> if (navigator.userAgent.match(/like Mac OS X/i)) { document.getElementById('down').href="http://www.google.com"; } </script> </head> and in the body i have <div style="text-align: center;"><a href="http://www.twitter.com" id="down"><img src="img/download.gif"/></a></div> but it simply just dosnt work :/
1
11,569,748
07/19/2012 21:39:51
65,214
02/11/2009 18:17:33
697
32
Service Broker: Queue Monitor is dropped after poison message
I have searched everywhere and there isn't an answer online. There is one similar question but it's not exactly the same on stack overflow without an answer. When I setup event notification on a queue, it creates a queue monitor and if receiving a message from that queue causes a poison message the queue monitor disappears. It's not in "RECEIVE" or "INACTIVE" it's just drops. And after enabling the queue with `ALTER QUEUE somequeue WITH STATUS = ON;` the queue monitor does not re-appear and and I need to drop and recreate event notification in order to have event notification working again. So the question is, is that by design or not? And after I re-enable the queue after poison message is it a common practice to recreate event notifications. Thanks!
sql-server
sql-server-2008
service-broker
null
null
07/20/2012 01:50:51
off topic
Service Broker: Queue Monitor is dropped after poison message === I have searched everywhere and there isn't an answer online. There is one similar question but it's not exactly the same on stack overflow without an answer. When I setup event notification on a queue, it creates a queue monitor and if receiving a message from that queue causes a poison message the queue monitor disappears. It's not in "RECEIVE" or "INACTIVE" it's just drops. And after enabling the queue with `ALTER QUEUE somequeue WITH STATUS = ON;` the queue monitor does not re-appear and and I need to drop and recreate event notification in order to have event notification working again. So the question is, is that by design or not? And after I re-enable the queue after poison message is it a common practice to recreate event notifications. Thanks!
2
2,298,372
02/19/2010 17:35:03
122,536
06/13/2009 18:36:27
711
5
My multilingual website with only basic php (without zend_translate, gettext, etc...) will I have problems in the future?
I tried `gettext`, but my free hosting doesn't allow it. I thought about `Zend_translate`, but I didn't want to use elements from frameworks since my page is mostly static. So, I ended up with this tutorial: http://www.bitrepository.com/php-how-to-add-multi-language-support-to-a-website.html Where the author only use basic php (not sure), and it seems to work, but I'm not quite sure if it a good (or common) practice or if it can cause me problems in the future (adding and deleting bunch of code). Here it is: **common.php**: <?php session_start(); header('Cache-control: private'); // IE 6 FIX if(isSet($_GET['lang'])) { $lang = $_GET['lang']; // register the session and set the cookie $_SESSION['lang'] = $lang; setcookie("lang", $lang, time() + (3600 * 24 * 30)); } else if(isSet($_SESSION['lang'])) { $lang = $_SESSION['lang']; } else if(isSet($_COOKIE['lang'])) { $lang = $_COOKIE['lang']; } else { $lang = 'en'; } switch ($lang) { case 'en': $lang_file = 'lang.en.php'; break; case 'de': $lang_file = 'lang.es.php'; break; default: $lang_file = 'lang.en.php'; } include_once 'languages/'.$lang_file; ?> **languages/lang.en.php:** <?php /* ----------------- Language: English ----------------- */ define('Hello World'); ?> **languages/lang.es.php:** <?php /* ----------------- Language: Espanol ----------------- */ define('Hola Mundo'); ?> **index.php:** include_once 'common.php'; <p><?php echo LANG_TEST; ?></p> So, if I want to change it to Spanish I just add: `?lang=es` in the `URL` (after `index.php`)
php
multilanguage
null
null
null
null
open
My multilingual website with only basic php (without zend_translate, gettext, etc...) will I have problems in the future? === I tried `gettext`, but my free hosting doesn't allow it. I thought about `Zend_translate`, but I didn't want to use elements from frameworks since my page is mostly static. So, I ended up with this tutorial: http://www.bitrepository.com/php-how-to-add-multi-language-support-to-a-website.html Where the author only use basic php (not sure), and it seems to work, but I'm not quite sure if it a good (or common) practice or if it can cause me problems in the future (adding and deleting bunch of code). Here it is: **common.php**: <?php session_start(); header('Cache-control: private'); // IE 6 FIX if(isSet($_GET['lang'])) { $lang = $_GET['lang']; // register the session and set the cookie $_SESSION['lang'] = $lang; setcookie("lang", $lang, time() + (3600 * 24 * 30)); } else if(isSet($_SESSION['lang'])) { $lang = $_SESSION['lang']; } else if(isSet($_COOKIE['lang'])) { $lang = $_COOKIE['lang']; } else { $lang = 'en'; } switch ($lang) { case 'en': $lang_file = 'lang.en.php'; break; case 'de': $lang_file = 'lang.es.php'; break; default: $lang_file = 'lang.en.php'; } include_once 'languages/'.$lang_file; ?> **languages/lang.en.php:** <?php /* ----------------- Language: English ----------------- */ define('Hello World'); ?> **languages/lang.es.php:** <?php /* ----------------- Language: Espanol ----------------- */ define('Hola Mundo'); ?> **index.php:** include_once 'common.php'; <p><?php echo LANG_TEST; ?></p> So, if I want to change it to Spanish I just add: `?lang=es` in the `URL` (after `index.php`)
0
760,503
04/17/2009 13:51:03
4,639
09/04/2008 23:07:22
2,402
12
How to pass a method name in order to instantiate a delegate?
In the following example, I want to define a System.Action which executes a specific method that I define at runtime, but **how do I pass the method name (or the method itself)** so that the Action method can define the delegate to point to that particular method? I'm currently getting the following error: *'methodName' is a 'variable' but is used like a 'method'* using System; using System.Collections.Generic; namespace TestDelegate { class Program { private delegate void WriteHandler(string message); static void Main(string[] args) { List<string> words = new List<string>() { "one", "two", "three", "four", "five" }; Action<string> theFunction = WriteMessage("WriteBasic"); foreach (string word in words) { theFunction(word); } Console.ReadLine(); } public static void WriteBasic(string message) { Console.WriteLine(message); } public static void WriteAdvanced(string message) { Console.WriteLine("*** {0} ***", message); } public static Action<string> WriteMessage(string methodName) { //gets error: 'methodName' is a 'variable' but is used like a 'method' WriteHandler writeIt = new WriteHandler(methodName); return new Action<string>(writeIt); } } }
c#
delegates
null
null
null
null
open
How to pass a method name in order to instantiate a delegate? === In the following example, I want to define a System.Action which executes a specific method that I define at runtime, but **how do I pass the method name (or the method itself)** so that the Action method can define the delegate to point to that particular method? I'm currently getting the following error: *'methodName' is a 'variable' but is used like a 'method'* using System; using System.Collections.Generic; namespace TestDelegate { class Program { private delegate void WriteHandler(string message); static void Main(string[] args) { List<string> words = new List<string>() { "one", "two", "three", "four", "five" }; Action<string> theFunction = WriteMessage("WriteBasic"); foreach (string word in words) { theFunction(word); } Console.ReadLine(); } public static void WriteBasic(string message) { Console.WriteLine(message); } public static void WriteAdvanced(string message) { Console.WriteLine("*** {0} ***", message); } public static Action<string> WriteMessage(string methodName) { //gets error: 'methodName' is a 'variable' but is used like a 'method' WriteHandler writeIt = new WriteHandler(methodName); return new Action<string>(writeIt); } } }
0
9,222,305
02/10/2012 03:28:38
877,703
08/04/2011 01:37:53
346
15
CSS - More rules versus more selectors?
This is a long-lasting issue I've had with myself for a while. Basically I've come up with two models of arranging CSS. These are on the extreme ends of a spectrum, of course. 1. Styling each selector, with all the applicable rules in that selector. 2. Combining selectors for each rule. As always, an illustration is worthwhile. Examples of Models = First Model - h1 { font-variant: small-caps; font-weight: bold; font-size: 2.000em; text-align: center; color: #cc0000; } h2 { font-weight: bold; font-size: 1.500em; color: #880000; } h3 { font-variant: small-caps; font-weight: bold; font-size: 1.167em; } h4 { font-style: italic; font-weight: bold; font-size: 1.000em; } h5 { font-style: italic; font-size: 0.833em; color: #880000; text-indent: 0.5in; } h6 { font-style: italic; font-variant: small-caps; font-size: 0.833em; text-indent: 0.5in; } Second Model - h1, h2, h3, h4 {font-weight: bold;} h4, h5, h6 {font-style: italic;} h5, h6 {text-indent: 0.5in;} h1, h3, h6 {font-variant: small-caps;} h2, h5 {color: #880000;} h1 { font-size: 2.000em; text-align: center; color: #cc0000; } h2 {font-size: 1.500em;} h3 {font-size: 1.167em;} h4 {font-size: 1.000em;} h5 {font-size: 0.833em;} h6 {font-size: 0.833em;} Comparison of Models = These two files are essentially exactly the same. The only difference is the arrangement of the code. Advantages to the First Model - - If you want to change the look of any given selector, you know exactly where to find the rules: they're under that selector! In addition, all the rules are in the same place so there's no need to traverse lines and lines (or files and files) of CSS code. - Better readability. When someone reads your code, they'll have a better idea of what an `h1` looks like because all the rules are right there. - Selectors are independent. Changing a rule of one selector doesn't affect any other selectors. (Though, this could be seen as a disadvantage; see bullet #1 for the second model.) Advantages to the Second Model - - Promotes page uniformity and site uniformity. If you want to change an aspect of your theme (e.g., `font-weight` of the first 4 headings), you only have to change it once, rather than in multiple places. - It's **DRY** (don't repeat yourself). Leaves less room for mistakes, bugs, and surprises. - Harbors a smaller file size. Fewer characters implies fewer bytes. Finally, My Question = First off, can anyone think of any more advantages to either model? Please comment. Now, **in terms of best practice, which model is preferred?** I'm looking for answers that take into account multiple dimensions such as load speed, readability, forward-compatibility, etc. Claim: I worked very hard defining the heading theme above. Please don't steal it. :)
css
null
null
null
null
02/10/2012 06:13:33
not constructive
CSS - More rules versus more selectors? === This is a long-lasting issue I've had with myself for a while. Basically I've come up with two models of arranging CSS. These are on the extreme ends of a spectrum, of course. 1. Styling each selector, with all the applicable rules in that selector. 2. Combining selectors for each rule. As always, an illustration is worthwhile. Examples of Models = First Model - h1 { font-variant: small-caps; font-weight: bold; font-size: 2.000em; text-align: center; color: #cc0000; } h2 { font-weight: bold; font-size: 1.500em; color: #880000; } h3 { font-variant: small-caps; font-weight: bold; font-size: 1.167em; } h4 { font-style: italic; font-weight: bold; font-size: 1.000em; } h5 { font-style: italic; font-size: 0.833em; color: #880000; text-indent: 0.5in; } h6 { font-style: italic; font-variant: small-caps; font-size: 0.833em; text-indent: 0.5in; } Second Model - h1, h2, h3, h4 {font-weight: bold;} h4, h5, h6 {font-style: italic;} h5, h6 {text-indent: 0.5in;} h1, h3, h6 {font-variant: small-caps;} h2, h5 {color: #880000;} h1 { font-size: 2.000em; text-align: center; color: #cc0000; } h2 {font-size: 1.500em;} h3 {font-size: 1.167em;} h4 {font-size: 1.000em;} h5 {font-size: 0.833em;} h6 {font-size: 0.833em;} Comparison of Models = These two files are essentially exactly the same. The only difference is the arrangement of the code. Advantages to the First Model - - If you want to change the look of any given selector, you know exactly where to find the rules: they're under that selector! In addition, all the rules are in the same place so there's no need to traverse lines and lines (or files and files) of CSS code. - Better readability. When someone reads your code, they'll have a better idea of what an `h1` looks like because all the rules are right there. - Selectors are independent. Changing a rule of one selector doesn't affect any other selectors. (Though, this could be seen as a disadvantage; see bullet #1 for the second model.) Advantages to the Second Model - - Promotes page uniformity and site uniformity. If you want to change an aspect of your theme (e.g., `font-weight` of the first 4 headings), you only have to change it once, rather than in multiple places. - It's **DRY** (don't repeat yourself). Leaves less room for mistakes, bugs, and surprises. - Harbors a smaller file size. Fewer characters implies fewer bytes. Finally, My Question = First off, can anyone think of any more advantages to either model? Please comment. Now, **in terms of best practice, which model is preferred?** I'm looking for answers that take into account multiple dimensions such as load speed, readability, forward-compatibility, etc. Claim: I worked very hard defining the heading theme above. Please don't steal it. :)
4
11,359,915
07/06/2012 09:51:54
1,186,314
02/02/2012 22:42:12
19
0
How to respond to exceptions in a thread in python
I have some code running in a thread that I need to respond to any exceptions within the calling thread. How would I find out if there are any exceptions and just reboot the child thread?
python
multithreading
exception-handling
null
null
null
open
How to respond to exceptions in a thread in python === I have some code running in a thread that I need to respond to any exceptions within the calling thread. How would I find out if there are any exceptions and just reboot the child thread?
0
1,900,428
12/14/2009 11:40:47
127,465
06/23/2009 09:35:33
836
50
Is there a Scala command-line debugger?
Is there a Scala command-line debugger (a la jdb)?
scala
null
null
null
null
null
open
Is there a Scala command-line debugger? === Is there a Scala command-line debugger (a la jdb)?
0
5,443,198
03/26/2011 15:11:11
678,127
03/26/2011 15:06:54
1
0
php and mysql books
which is the best and easy to understand the php and mysql BOOKS****
php
mysql
null
null
null
03/26/2011 15:40:00
not constructive
php and mysql books === which is the best and easy to understand the php and mysql BOOKS****
4
5,696,297
04/17/2011 20:41:32
263,215
02/01/2010 03:39:37
627
3
which licence fits my needs ?
Which licence would fit the next requirements the most ? - Everyone is welcome to make updates and use the source code - But nobody should sell it or sell an application that is using it, unless he consult us as the owners (make a deal with owners)
open-source
licensing
null
null
null
04/18/2011 07:14:00
off topic
which licence fits my needs ? === Which licence would fit the next requirements the most ? - Everyone is welcome to make updates and use the source code - But nobody should sell it or sell an application that is using it, unless he consult us as the owners (make a deal with owners)
2
8,521,481
12/15/2011 14:18:15
1,100,031
12/15/2011 14:11:45
1
0
Need assistance debugging my python code, it's a wreck
I'm using Python 2.7x and am having trouble debugging it. I'm not really sure what I can do. Any help is appreciated. Thanks. import re import sys # Grab parameters from the command line (filename, threshold) = sys.argv[1:3] # Validate arguments if (re.match("\D", threshold)): print "The threshold must be a number." sys.exit(1) # Read file and tally word frequencies fh = open(filename) file = fh.read() words = [] for line in file.split('\n'): found = 0 for word in words: if word[0] == line.lower(): found = 1 word[1] += 1 # initialize a new word with a frequency of 1 if found == 0: words.append([line, 1]) # Print words and their frequencies, sorted alphabetically by word. Only print a word if its frequency is greater than or equal to the threshold. for word in sorted(words): if word[0] < threshold: continue print "%4d %s" % (word[1], word[0])
python
debugging
null
null
null
12/15/2011 14:45:04
not a real question
Need assistance debugging my python code, it's a wreck === I'm using Python 2.7x and am having trouble debugging it. I'm not really sure what I can do. Any help is appreciated. Thanks. import re import sys # Grab parameters from the command line (filename, threshold) = sys.argv[1:3] # Validate arguments if (re.match("\D", threshold)): print "The threshold must be a number." sys.exit(1) # Read file and tally word frequencies fh = open(filename) file = fh.read() words = [] for line in file.split('\n'): found = 0 for word in words: if word[0] == line.lower(): found = 1 word[1] += 1 # initialize a new word with a frequency of 1 if found == 0: words.append([line, 1]) # Print words and their frequencies, sorted alphabetically by word. Only print a word if its frequency is greater than or equal to the threshold. for word in sorted(words): if word[0] < threshold: continue print "%4d %s" % (word[1], word[0])
1
11,238,192
06/28/2012 04:45:41
1,487,483
06/28/2012 04:44:01
1
0
Jquery display a part image Hover
Please i'm looking for a method or a plugin tha can allow me to showa part of an image that can allow me to display a part of an image when a mouse is Hover it Like here http://www.artfloor.com/ebn.ebn?pid=438&oeuvre=14390&artiste=91 Thanks
javascript
jquery
html5
jquery-plugins
jquery-selectors
06/28/2012 06:59:54
not a real question
Jquery display a part image Hover === Please i'm looking for a method or a plugin tha can allow me to showa part of an image that can allow me to display a part of an image when a mouse is Hover it Like here http://www.artfloor.com/ebn.ebn?pid=438&oeuvre=14390&artiste=91 Thanks
1
1,330,485
08/25/2009 19:39:48
48,963
12/24/2008 20:37:22
257
32
Looking for ASP.NET(MVC, AJAX) Image Manager
Anybody help, I need Image Manager with multi-upload, crop, resize.... And final cost less $150. Maybe somebody using this perfect solution - I want too.
asp.net
asp.net-mvc
asp.net-ajax
image
c#
null
open
Looking for ASP.NET(MVC, AJAX) Image Manager === Anybody help, I need Image Manager with multi-upload, crop, resize.... And final cost less $150. Maybe somebody using this perfect solution - I want too.
0
224,303
10/22/2008 02:41:07
25,368
10/06/2008 01:10:51
41
0
Java EAR File Deployment : Could not find physical destination : null
Anyone know what does this mean exactly? And how to resolve it? ]: Exception in creating message-driven bean container: [com.sun.enterprise.connectors.ConnectorRuntimeException: Could not find physical destination : null]|#] [#|2008-10-22T01:03:08.460+0800|SEVERE|sun-appserver-pe8.2|javax.enterprise.system.container.ejb.mdb|_ThreadID=13;|com.sun.enterprise.connectors.ConnectorRuntimeException com.sun.enterprise.connectors.ConnectorRuntimeException: Could not find physical destination : null
java
null
null
null
null
03/31/2012 19:10:22
not a real question
Java EAR File Deployment : Could not find physical destination : null === Anyone know what does this mean exactly? And how to resolve it? ]: Exception in creating message-driven bean container: [com.sun.enterprise.connectors.ConnectorRuntimeException: Could not find physical destination : null]|#] [#|2008-10-22T01:03:08.460+0800|SEVERE|sun-appserver-pe8.2|javax.enterprise.system.container.ejb.mdb|_ThreadID=13;|com.sun.enterprise.connectors.ConnectorRuntimeException com.sun.enterprise.connectors.ConnectorRuntimeException: Could not find physical destination : null
1
11,549,774
07/18/2012 20:29:53
1,461,172
06/16/2012 22:16:39
1
1
4d to 2d projection matrix
I am trying to create a 4D world in Java using LWJGL. I am trying to make a 4d to 2d projection matrix. Can anyone give me a 4x4 matrix that projects a 4d point to 2d? I need zNear to be .3 and zFar to be 100, and fovy to be 70. (gluPerspective for 4d). It would also help to have a rotation matrix. I need the matrix to be perspective.
java
opengl
lwjgl
perspective
projection-matrix
07/22/2012 20:15:28
not a real question
4d to 2d projection matrix === I am trying to create a 4D world in Java using LWJGL. I am trying to make a 4d to 2d projection matrix. Can anyone give me a 4x4 matrix that projects a 4d point to 2d? I need zNear to be .3 and zFar to be 100, and fovy to be 70. (gluPerspective for 4d). It would also help to have a rotation matrix. I need the matrix to be perspective.
1
3,207,545
07/08/2010 20:10:29
297,850
03/20/2010 03:20:49
48
0
An onsite implementation question from a startup.
The system maintains a table with 150 pages, and each page contains 1.5 million records hashed with users’ birth date. Each record includes information of username, nickname, birth date, hometown and title. We are required to write a C++ program that transforms this table into another one, which has 100 pages and is hashed with username. What’s the best algorithm in terms of both space efficiency and time efficiency?
c++
algorithm
interview-questions
null
null
07/08/2010 22:34:14
not a real question
An onsite implementation question from a startup. === The system maintains a table with 150 pages, and each page contains 1.5 million records hashed with users’ birth date. Each record includes information of username, nickname, birth date, hometown and title. We are required to write a C++ program that transforms this table into another one, which has 100 pages and is hashed with username. What’s the best algorithm in terms of both space efficiency and time efficiency?
1
3,094,520
06/22/2010 15:16:36
289,770
03/09/2010 15:29:51
6
0
How to retreive correct path of either system32 or SysWOW64?
I have a 32-bit process that can run either in 32-bit or 64-bit Windows. So, naturally, if the process tried to access the file `c:\windows\system32\file.ext`, it would be redirected to `c:\windows\SysWOW64\file.ext`. So far so good - I don't want to disable the redirection. My problem is that my process doesn't actually **access** the file - instead it just takes its path and **writes it into a text file**, and I want that text file to read `SysWOW64` on a 64-bit system, and `system32` on a 32-bit system. How can I do that?
windows
32bit-64bit
win64
null
null
null
open
How to retreive correct path of either system32 or SysWOW64? === I have a 32-bit process that can run either in 32-bit or 64-bit Windows. So, naturally, if the process tried to access the file `c:\windows\system32\file.ext`, it would be redirected to `c:\windows\SysWOW64\file.ext`. So far so good - I don't want to disable the redirection. My problem is that my process doesn't actually **access** the file - instead it just takes its path and **writes it into a text file**, and I want that text file to read `SysWOW64` on a 64-bit system, and `system32` on a 32-bit system. How can I do that?
0
4,015,705
10/25/2010 14:46:12
398,358
07/21/2010 18:55:57
58
0
Changing the directory of Delphi OpenDialog
A little background of the program: The program uses a tabbed interface to work on multiple files at the same time. I'm trying to change the directory of the OpenDialog so every time I call open a file will show the directory of the file I am working on currently, but even when I set `InitialDir` to the file's path it always displays the last opened file directory, not the one I am setting it to. I tried the following: if Length(CurrentFileName) > 0 then begin OpenFileDialog.InitialDir :=''; SetCurrentDirectory(PChar(CurrentFileName)); OpenFileDialog.InitialDir := ExtractFileDir(CurrentFileName); end; if OpenFileDialog.Execute then ... Where `CurrentFileName` is the full path with the filename of the current tab's opened file. But no luck. Is there any way to achieve this? So for example: `tab1` has `c:\mydir\file.txt` opened `tab2` has `d:\someotherdir\somefile.txt` opened If I move to `tab1` and call the open function I the `OpenDialog` should show me the contents of `c:\mydir\` I am using Delphi 7. Any help is appreciated.
delphi
null
null
null
null
null
open
Changing the directory of Delphi OpenDialog === A little background of the program: The program uses a tabbed interface to work on multiple files at the same time. I'm trying to change the directory of the OpenDialog so every time I call open a file will show the directory of the file I am working on currently, but even when I set `InitialDir` to the file's path it always displays the last opened file directory, not the one I am setting it to. I tried the following: if Length(CurrentFileName) > 0 then begin OpenFileDialog.InitialDir :=''; SetCurrentDirectory(PChar(CurrentFileName)); OpenFileDialog.InitialDir := ExtractFileDir(CurrentFileName); end; if OpenFileDialog.Execute then ... Where `CurrentFileName` is the full path with the filename of the current tab's opened file. But no luck. Is there any way to achieve this? So for example: `tab1` has `c:\mydir\file.txt` opened `tab2` has `d:\someotherdir\somefile.txt` opened If I move to `tab1` and call the open function I the `OpenDialog` should show me the contents of `c:\mydir\` I am using Delphi 7. Any help is appreciated.
0
2,341,209
02/26/2010 11:29:37
225,269
12/05/2009 04:59:24
416
0
cannot access phpmyadmin
I get this error everytime I try to access phpmyadmin. http://i49.tinypic.com/ot1478.jpg I cant access it because I've put a password on the root user. How do I get to have a login form in phpmyadmin so that I could at least try to authenticate that I'm the root user. Because in its current state, it wouldnt even bother to authenticate who is the user by at least having a login form. How do I get to have a login form in phpmyadmin. I'm just a beginner and I don't have time to read on documentations that can take days to read. Like this one: http://www.phpmyadmin.net/documentation/Documentation.html#config Please help. Im stuck in this problem I couldnt get any solutions from google or in any other place.
phpmyadmin
null
null
null
null
02/27/2010 20:20:52
off topic
cannot access phpmyadmin === I get this error everytime I try to access phpmyadmin. http://i49.tinypic.com/ot1478.jpg I cant access it because I've put a password on the root user. How do I get to have a login form in phpmyadmin so that I could at least try to authenticate that I'm the root user. Because in its current state, it wouldnt even bother to authenticate who is the user by at least having a login form. How do I get to have a login form in phpmyadmin. I'm just a beginner and I don't have time to read on documentations that can take days to read. Like this one: http://www.phpmyadmin.net/documentation/Documentation.html#config Please help. Im stuck in this problem I couldnt get any solutions from google or in any other place.
2
9,150,635
02/05/2012 16:00:43
1,260,447
01/16/2012 03:08:19
5
6
Find a part of the user agent string
I was wondering if you could use just a part of the user agent string, for example the firmware, on the web. However, Flash will not work. This is a follow-up question to the one [here](http://stackoverflow.com/questions/9137439/find-the-firmware-in-javascript#comment11485566_9137439).
ajax
user-agent
null
null
null
null
open
Find a part of the user agent string === I was wondering if you could use just a part of the user agent string, for example the firmware, on the web. However, Flash will not work. This is a follow-up question to the one [here](http://stackoverflow.com/questions/9137439/find-the-firmware-in-javascript#comment11485566_9137439).
0
10,891,401
06/05/2012 04:03:38
28,802
10/17/2008 02:38:51
1,664
12
is there any nice online forum framework?
Why are all online forums so old-styled? Why don't we see nice uses of JS, AJAX, and web technologies to make them more usable? Does anyone know a forum plugin (any language or framework) which has some of the following? - Automatically append new messages to a thread if someone just posted a new message - Pop a notification if someone privately messaged you - Load new messages as we scroll down the page as Google Image Search does, or Twitter. - etc. I think the idea is clear Thanks!
javascript
frameworks
web
usability
forum
06/05/2012 04:12:50
not a real question
is there any nice online forum framework? === Why are all online forums so old-styled? Why don't we see nice uses of JS, AJAX, and web technologies to make them more usable? Does anyone know a forum plugin (any language or framework) which has some of the following? - Automatically append new messages to a thread if someone just posted a new message - Pop a notification if someone privately messaged you - Load new messages as we scroll down the page as Google Image Search does, or Twitter. - etc. I think the idea is clear Thanks!
1
2,448,652
03/15/2010 16:18:37
215,571
11/20/2009 16:06:52
1,124
32
Python - platform-independent 5.1 Sound Library
Is there any dolby/5.1/7.1 audio processing Python library? It would be best if it is platform independent. Would be nice if it looks like: import lib f = lib.open("8channels_audiofile") lib.play(from=f.channel3, to="left rear");
python
null
null
null
null
null
open
Python - platform-independent 5.1 Sound Library === Is there any dolby/5.1/7.1 audio processing Python library? It would be best if it is platform independent. Would be nice if it looks like: import lib f = lib.open("8channels_audiofile") lib.play(from=f.channel3, to="left rear");
0
2,582,864
04/06/2010 05:37:37
18,548
09/19/2008 05:21:51
410
53
Hudson trigget builds remotely gives a forbidden 403 error
I have a shell script on the same machine that hudson is deployed on and upon executing it, it calls wget on a hudson build trigger URL. Since its the same machine, I access it as http://localhost:8080/hudson/job/jobname/build?token=sometoken Typically, this is supposed to trigger a build on the project. But I get a 403 forbidden when I do this. Anybody has any idea why? I have tried this using a browser and it triggers the build, but via the command line it doesn't seem to work. Any ideas?
hudson
continuous-integration
unix
wget
null
null
open
Hudson trigget builds remotely gives a forbidden 403 error === I have a shell script on the same machine that hudson is deployed on and upon executing it, it calls wget on a hudson build trigger URL. Since its the same machine, I access it as http://localhost:8080/hudson/job/jobname/build?token=sometoken Typically, this is supposed to trigger a build on the project. But I get a 403 forbidden when I do this. Anybody has any idea why? I have tried this using a browser and it triggers the build, but via the command line it doesn't seem to work. Any ideas?
0
11,594,447
07/21/2012 17:39:29
1,531,457
07/17/2012 10:28:31
1
0
Parse error: syntax error, unexpected '>' in PHP
Hello I have error like Parse error: syntax error, unexpected '>' in C:\inetpub\vhosts\andpi.com\httpdocs\upload.php on line 28 this is line 28 print("<error>".$errs[$errno]."</error>"); and this is whole function which incude that line function sendError($errno) { getDB()->close(); $errs = array('Unknown Error', 'No File Provided', 'No Extension Provided', 'Error uploading file', 'DB Error'); print("<error>".$errs[$errno]."</error>"); print("\n</updf>"); exit(0); }
php
syntax-error
parse-error
null
null
07/21/2012 17:46:49
too localized
Parse error: syntax error, unexpected '>' in PHP === Hello I have error like Parse error: syntax error, unexpected '>' in C:\inetpub\vhosts\andpi.com\httpdocs\upload.php on line 28 this is line 28 print("<error>".$errs[$errno]."</error>"); and this is whole function which incude that line function sendError($errno) { getDB()->close(); $errs = array('Unknown Error', 'No File Provided', 'No Extension Provided', 'Error uploading file', 'DB Error'); print("<error>".$errs[$errno]."</error>"); print("\n</updf>"); exit(0); }
3
7,357,665
09/09/2011 05:55:35
936,146
09/09/2011 04:59:29
1
0
Error with publishing
I had created one Facebook application and used it in our website. First 2 months it was working fine, users were able to publish. After 2 months application is throwing below error while publishing. Error: The post's action links must be valid URLs. please let me know the reason for this error.
facebook-c#-sdk
publish
null
null
null
09/09/2011 18:26:04
not a real question
Error with publishing === I had created one Facebook application and used it in our website. First 2 months it was working fine, users were able to publish. After 2 months application is throwing below error while publishing. Error: The post's action links must be valid URLs. please let me know the reason for this error.
1
9,836,520
03/23/2012 09:12:08
1,287,881
03/23/2012 09:06:44
1
0
how sync song into iphone use itunes com interface
my code is HRESULT hRes; CComQIPtr<IiTunes> iITunes; hRes = ::CoCreateInstance(CLSID_iTunesApp, NULL, CLSCTX_LOCAL_SERVER, IID_IiTunes, (PVOID *)&iITunes); CComQIPtr<IITLibraryPlaylist> iLibPlaylist; hRes = iITunes->get_LibraryPlaylist(&iLibPlaylist); CComQIPtr<IITOperationStatus> iStatus; CComBSTR path("F:\\Kugou\\vitas - 秋天的叶子.mp3"); hRes = iLibPlaylist->AddFile(path, &iStatus); but how to sync to iphone
com
itunes
null
null
null
null
open
how sync song into iphone use itunes com interface === my code is HRESULT hRes; CComQIPtr<IiTunes> iITunes; hRes = ::CoCreateInstance(CLSID_iTunesApp, NULL, CLSCTX_LOCAL_SERVER, IID_IiTunes, (PVOID *)&iITunes); CComQIPtr<IITLibraryPlaylist> iLibPlaylist; hRes = iITunes->get_LibraryPlaylist(&iLibPlaylist); CComQIPtr<IITOperationStatus> iStatus; CComBSTR path("F:\\Kugou\\vitas - 秋天的叶子.mp3"); hRes = iLibPlaylist->AddFile(path, &iStatus); but how to sync to iphone
0
17,988
08/20/2008 13:49:24
307
08/04/2008 14:26:05
571
36
How to Learn Python
For a beginner's perspective, can you answer the following: - Best Tool(s) for Python development (e.g. NotePad, Vim) - Best Book to get Started - Best Website for Python beginner - Best Problem Domain to do a sample project (what is Python-based solutions best suited for?)
python
howto
null
null
null
06/28/2011 12:23:21
not constructive
How to Learn Python === For a beginner's perspective, can you answer the following: - Best Tool(s) for Python development (e.g. NotePad, Vim) - Best Book to get Started - Best Website for Python beginner - Best Problem Domain to do a sample project (what is Python-based solutions best suited for?)
4
3,896,628
10/09/2010 08:44:32
453,748
09/21/2010 09:54:41
8
0
change the constraint name in fluentNhibernate auto mapping alteration
i'm using oracle with FluentNHibernate automapping with alterations & NHibernate the problem is how to specify the constraint name by overriding the mapping model?? the generated sql like this: alter table FirstTable add constraint FK_VerLongIdentifierLongerThan30Characther foreign key (FirstTableID) references SecondTable; i need to change the "FK_VerLongIdentifierLongerThan30Characther" to smaller identifier by overriding the mapping model like this: model.Override<SomeClass>(m => { m.HasOne<SomeOtherClass>(c => c.SomeProperty).?????????; //or m.???????? } )
oracle
nhibernate
fluent-nhibernate
automapping
null
null
open
change the constraint name in fluentNhibernate auto mapping alteration === i'm using oracle with FluentNHibernate automapping with alterations & NHibernate the problem is how to specify the constraint name by overriding the mapping model?? the generated sql like this: alter table FirstTable add constraint FK_VerLongIdentifierLongerThan30Characther foreign key (FirstTableID) references SecondTable; i need to change the "FK_VerLongIdentifierLongerThan30Characther" to smaller identifier by overriding the mapping model like this: model.Override<SomeClass>(m => { m.HasOne<SomeOtherClass>(c => c.SomeProperty).?????????; //or m.???????? } )
0
9,396,186
02/22/2012 13:55:08
1,098,374
12/14/2011 17:28:00
6
0
word processor in c# or c++
I learned C Sharp for one purpose, to write a word processor that includes my needs. For example that you could play with the spaces between words, and the spaces between the lines, raise one word higher from the row, and many other similar things. When I start working on it in c# - winForms I see the possibilities are very limited, Indeed there are ways to do almost everything With effort, but my question is if I on the right way, maybe c# is not the language to it, maybe I should work with c++. What do you think?
c#
c++
null
null
null
02/22/2012 21:31:00
not constructive
word processor in c# or c++ === I learned C Sharp for one purpose, to write a word processor that includes my needs. For example that you could play with the spaces between words, and the spaces between the lines, raise one word higher from the row, and many other similar things. When I start working on it in c# - winForms I see the possibilities are very limited, Indeed there are ways to do almost everything With effort, but my question is if I on the right way, maybe c# is not the language to it, maybe I should work with c++. What do you think?
4
7,291,484
09/03/2011 06:11:29
388,388
07/10/2010 10:12:11
3,093
192
Is it possible to show headers while scrolling the gridview
I am using Gridview in my application. Grid view is binded with the data from the database with some header text. Now what i would like to have is when i scroll the grid view i would like to show the headers while moving the gridview how can i do this
c#
asp.net
gridview
.net-2.0
null
null
open
Is it possible to show headers while scrolling the gridview === I am using Gridview in my application. Grid view is binded with the data from the database with some header text. Now what i would like to have is when i scroll the grid view i would like to show the headers while moving the gridview how can i do this
0
11,603,551
07/22/2012 20:00:48
394,736
07/17/2010 16:22:43
2,378
66
Duplicate Symbol Error: SBJsonParser.o?
I currently have ShareKit in my project that is compiled as a static library. It is properly implemented. I also have implemented Amazon's AWS SDK by just adding their framework into my project. The issue is, is that there are conflicts within the SBJSON category. It seems that the files colliding are: SBJSON.h, SBJSONParser.h, SBJSONWriter.h, and JSON.h. I have looked at other SO questions and they say to do some things with the compiled sources but none of these files are in the compiled sources from either library. Anyway, does anyone have any ideas what I should do? My app does not compile unless I fix this issue. Thanks!
ios
duplicates
symbol
sbjson
null
null
open
Duplicate Symbol Error: SBJsonParser.o? === I currently have ShareKit in my project that is compiled as a static library. It is properly implemented. I also have implemented Amazon's AWS SDK by just adding their framework into my project. The issue is, is that there are conflicts within the SBJSON category. It seems that the files colliding are: SBJSON.h, SBJSONParser.h, SBJSONWriter.h, and JSON.h. I have looked at other SO questions and they say to do some things with the compiled sources but none of these files are in the compiled sources from either library. Anyway, does anyone have any ideas what I should do? My app does not compile unless I fix this issue. Thanks!
0
7,103,713
08/18/2011 07:16:30
297,108
03/19/2010 05:39:52
48
1
URL Rewrite in PHP like in Smarty Template
I am banging my head from a couple of days to use the URL rewriting for a core php website. Previously the website was developed using smarty, but due to some limitations, I am redoing it in core PHP. The problem is that smarty is using some templates code to create the Pretty URL's which I am not able to do in core PHP. Like in this example. http://amitgharat.blogspot.com/ Is any body came across this kind of problem and save me, or any idea or suggestion please. I will be really thank full. Regards,
php
mysql
null
null
null
08/18/2011 10:58:43
not a real question
URL Rewrite in PHP like in Smarty Template === I am banging my head from a couple of days to use the URL rewriting for a core php website. Previously the website was developed using smarty, but due to some limitations, I am redoing it in core PHP. The problem is that smarty is using some templates code to create the Pretty URL's which I am not able to do in core PHP. Like in this example. http://amitgharat.blogspot.com/ Is any body came across this kind of problem and save me, or any idea or suggestion please. I will be really thank full. Regards,
1
10,819,164
05/30/2012 15:13:46
1,357,506
04/26/2012 00:42:00
122
0
what is the difference between fileoutputstream and dataoutputstream?
here,i knew that java.lang.dataoutputstream package is extension of java.lang.fileoutputstream .but i can not understand this two line :fileoutputstream fos = new fileoutputstream(args[0]); dataoutputstream dos = new dataoutputstream(dos);.here also dos.writebyte() directly write into file name which one is passed.in this method there is not reference of the fos but it write. i can not get it .what is actually done here: fileoutputstream fos = new fileoutputstream(args[0]); dataoutputstream dos = new dataoutputstream(dos); dos.writebyte('j'); can any one explain it?
java
null
null
null
null
05/31/2012 14:31:01
not a real question
what is the difference between fileoutputstream and dataoutputstream? === here,i knew that java.lang.dataoutputstream package is extension of java.lang.fileoutputstream .but i can not understand this two line :fileoutputstream fos = new fileoutputstream(args[0]); dataoutputstream dos = new dataoutputstream(dos);.here also dos.writebyte() directly write into file name which one is passed.in this method there is not reference of the fos but it write. i can not get it .what is actually done here: fileoutputstream fos = new fileoutputstream(args[0]); dataoutputstream dos = new dataoutputstream(dos); dos.writebyte('j'); can any one explain it?
1
4,994,788
02/14/2011 16:50:26
131,887
07/01/2009 18:41:34
2,100
67
Enable WCF message logging programmatically (from loaded .dll)
I've read the disappointing answer [here][1] regarding enabling logging of WCF messages from code, but thought that maybe since then there may be other suggestions for how to do this. I'm working under the constraints of developing a .NET 3.5 library that gets loaded (via COM) into a larger win32 framework. As such, I do not have control of the contents of any app.config file. Is there any way (Reflection to access internal classes? Some other nastiness?) to accomplish this? [1]: http://stackoverflow.com/questions/3600053/how-to-enable-wcf-message-logging-from-code-instead-of-the-application-configurat
c#
.net
wcf
null
null
null
open
Enable WCF message logging programmatically (from loaded .dll) === I've read the disappointing answer [here][1] regarding enabling logging of WCF messages from code, but thought that maybe since then there may be other suggestions for how to do this. I'm working under the constraints of developing a .NET 3.5 library that gets loaded (via COM) into a larger win32 framework. As such, I do not have control of the contents of any app.config file. Is there any way (Reflection to access internal classes? Some other nastiness?) to accomplish this? [1]: http://stackoverflow.com/questions/3600053/how-to-enable-wcf-message-logging-from-code-instead-of-the-application-configurat
0
11,235,974
06/27/2012 23:03:02
708,831
04/14/2011 21:52:07
387
17
Zend - Will they convert to Google's Core API before Google's Data Export API is deprecated?
Our company currently uses a system built around the Zend framework. It is accessing information from Google Analytics through the Zend Framework. In this article (http://analytics.blogspot.com/2012/06/ga-advocate-justin-cutroni-answers-your.html) I see that the Data Export API will be deprecated on July 10th. Does anyone know if Zend has already or will be converting over to the newer Core API? Just need to know if our system is going to melt down on July 10th... THanks!
zend-framework
google-analytics-api
null
null
null
06/28/2012 15:28:50
off topic
Zend - Will they convert to Google's Core API before Google's Data Export API is deprecated? === Our company currently uses a system built around the Zend framework. It is accessing information from Google Analytics through the Zend Framework. In this article (http://analytics.blogspot.com/2012/06/ga-advocate-justin-cutroni-answers-your.html) I see that the Data Export API will be deprecated on July 10th. Does anyone know if Zend has already or will be converting over to the newer Core API? Just need to know if our system is going to melt down on July 10th... THanks!
2
3,502,300
08/17/2010 12:21:01
422,833
08/17/2010 12:21:01
1
0
People withot Entry
I try to get all people without an registration from a specific event. Models: Person, Event and Registration In the mysql table it would add an entry to the registrations table with the person.id and event.id (plus comment and status of registration (1 for registration, 2 for deregistration). Now, I'm trying to get all people which did no action, all registrations an all deregistrations (in this order). I tried to get all I think it's only a conceivable problem... So, what do you think, whats the best way to do it?
ruby-on-rails
null
null
null
null
null
open
People withot Entry === I try to get all people without an registration from a specific event. Models: Person, Event and Registration In the mysql table it would add an entry to the registrations table with the person.id and event.id (plus comment and status of registration (1 for registration, 2 for deregistration). Now, I'm trying to get all people which did no action, all registrations an all deregistrations (in this order). I tried to get all I think it's only a conceivable problem... So, what do you think, whats the best way to do it?
0
7,576,554
09/27/2011 22:51:38
929,596
09/05/2011 21:30:01
76
0
Why does calling 'delete' in a specific way on a dynamic array not work?
I'm wondering why this code doesn't work: void KeyValueList::Release() { //(m_ppKeyValueList is a dynamic array of pointers to objects on the heap) if (m_ppKeyValueList) { for (int i = 0; i < m_iCapacity; ++i) { if (m_ppKeyValueList[i]) { delete m_ppKeyValueList[i]; } } /*delete[] m_ppKeyValueList;*/ for (int i = 0; i < m_iCapacity; ++i) { delete (m_ppKeyValueList + i); } } } So why can't we iterate the dynamic array and delete it in this way? If you think my question isn't clear, please comment and I'll edit.
c++
memory-management
delete
dynamic-arrays
null
null
open
Why does calling 'delete' in a specific way on a dynamic array not work? === I'm wondering why this code doesn't work: void KeyValueList::Release() { //(m_ppKeyValueList is a dynamic array of pointers to objects on the heap) if (m_ppKeyValueList) { for (int i = 0; i < m_iCapacity; ++i) { if (m_ppKeyValueList[i]) { delete m_ppKeyValueList[i]; } } /*delete[] m_ppKeyValueList;*/ for (int i = 0; i < m_iCapacity; ++i) { delete (m_ppKeyValueList + i); } } } So why can't we iterate the dynamic array and delete it in this way? If you think my question isn't clear, please comment and I'll edit.
0
10,893,488
06/05/2012 07:45:13
683,553
03/30/2011 08:24:48
2,023
15
Passing value on img src $_GET issue
I am passing values from the img src like this: PageA: <img src="watermark.php?fname=<?php echo $image; ?>" /> then I ge the value on pageB: $fname = $_GET['fname']; $watermark_img = $passed_fname; ... For some reason no image is showing ... I'm I missing something here?
php
php5
null
null
null
null
open
Passing value on img src $_GET issue === I am passing values from the img src like this: PageA: <img src="watermark.php?fname=<?php echo $image; ?>" /> then I ge the value on pageB: $fname = $_GET['fname']; $watermark_img = $passed_fname; ... For some reason no image is showing ... I'm I missing something here?
0
3,808,854
09/28/2010 00:23:30
418,029
08/12/2010 05:40:04
90
4
Security in iPhone apps
How do we maintain the data security in iPhone apps. For instance, a custom app for a bank needs more security in terms of: 1. Data in transmission 2. Data in rest (Data inside iPhone) What are the potential steps one can take to ensure the integrity and security of data? What support iPhone SDK provides to achieve this? How do we encrypt/decrypt the payloads? Save the data in encrypted format locally and how do we protect this from potential threat of decryption by unauthentic user?
iphone
null
null
null
null
null
open
Security in iPhone apps === How do we maintain the data security in iPhone apps. For instance, a custom app for a bank needs more security in terms of: 1. Data in transmission 2. Data in rest (Data inside iPhone) What are the potential steps one can take to ensure the integrity and security of data? What support iPhone SDK provides to achieve this? How do we encrypt/decrypt the payloads? Save the data in encrypted format locally and how do we protect this from potential threat of decryption by unauthentic user?
0
9,152,915
02/05/2012 20:53:04
951,441
09/18/2011 16:56:30
93
2
Norton Deleting My Files
After compiling a c++ executable, as soon as I try to run it, the program won't run, and then the Norton Antivirus would delete the executable a few moments later. When I view the details, it'll say "A program was behaving suspiciously on your computer. It was removed." Then in the details, it'll say that it was "infected", but I know that it isn't. How do I make it so that Norton doesn't delete the file so that I can actually run the file? I'm using a Windows Vista.
norton
null
null
null
null
02/05/2012 21:06:21
off topic
Norton Deleting My Files === After compiling a c++ executable, as soon as I try to run it, the program won't run, and then the Norton Antivirus would delete the executable a few moments later. When I view the details, it'll say "A program was behaving suspiciously on your computer. It was removed." Then in the details, it'll say that it was "infected", but I know that it isn't. How do I make it so that Norton doesn't delete the file so that I can actually run the file? I'm using a Windows Vista.
2
8,288,361
11/27/2011 19:29:35
7,028
09/15/2008 13:02:20
9,667
272
Video identification database service
I am building a DVD conversion tool. Is there any cloud based system that would help me identify the DVD I have in the reader and give accurate info (title, year, etc.)? Gracenote offers this service (called "VideoId"), however it's only available for corporate customers, and my application would be an open source tool, targeted for home use. Is there any other service, similarly to what FreeDB does for CDs?
video
resources
saas
free-software
null
null
open
Video identification database service === I am building a DVD conversion tool. Is there any cloud based system that would help me identify the DVD I have in the reader and give accurate info (title, year, etc.)? Gracenote offers this service (called "VideoId"), however it's only available for corporate customers, and my application would be an open source tool, targeted for home use. Is there any other service, similarly to what FreeDB does for CDs?
0