PostId
int64
13
11.8M
PostCreationDate
stringlengths
19
19
OwnerUserId
int64
3
1.57M
OwnerCreationDate
stringlengths
10
19
ReputationAtPostCreation
int64
-33
210k
OwnerUndeletedAnswerCountAtPostTime
int64
0
5.77k
Title
stringlengths
10
250
BodyMarkdown
stringlengths
12
30k
Tag1
stringlengths
1
25
Tag2
stringlengths
1
25
Tag3
stringlengths
1
25
Tag4
stringlengths
1
25
Tag5
stringlengths
1
25
PostClosedDate
stringlengths
19
19
OpenStatus
stringclasses
5 values
unified_texts
stringlengths
47
30.1k
OpenStatus_id
int64
0
4
8,435,438
12/08/2011 18:00:47
238,831
12/26/2009 12:57:36
36
0
PHP location() function portability
I have the classical Symphony flash message implementation: $_SESSION['flash'] = "This is a flash message"; header('location: index.php'); It works fine on two different servers but has a strange behavior on a third one, a hosted server, LAMP stack, of which configuration I'm not aware about in detail. On the third server the script execution brings up first a warning - that the headers have already been sent ... (but I didn't output anything, on the other servers it works) - then if I trigger again the redirecting event, a hyperlink, it brings me into the index.php file with the message rendered. I know how to make it "portable", by using JavaScript to redirect, but I wonder what is the cause of this behavior. I suspect a server configuration for a PHP or Apache module. Thanks for your hand!
php
function
header
location
null
12/09/2011 10:35:05
too localized
PHP location() function portability === I have the classical Symphony flash message implementation: $_SESSION['flash'] = "This is a flash message"; header('location: index.php'); It works fine on two different servers but has a strange behavior on a third one, a hosted server, LAMP stack, of which configuration I'm not aware about in detail. On the third server the script execution brings up first a warning - that the headers have already been sent ... (but I didn't output anything, on the other servers it works) - then if I trigger again the redirecting event, a hyperlink, it brings me into the index.php file with the message rendered. I know how to make it "portable", by using JavaScript to redirect, but I wonder what is the cause of this behavior. I suspect a server configuration for a PHP or Apache module. Thanks for your hand!
3
2,244,314
02/11/2010 12:21:34
20,261
09/22/2008 07:12:50
3,521
174
Can not load related tables when executing query from Doctrine_Record
I'm struggling with a very strange problem, and I cannot seem to fix it. **Short version** When I execute a query from within a Doctrine_Record, it just doesn't seem to work when I try to get a related table. I get an Exception: > error: Uncaught PHP Error: Trying to get property of non-object in file > D:/Tools/Development/xampp1.7/htdocs/x-interactive/xibits/application/views/issues/changeList.php > on line 23 On that particular line, I try to get to the child table of the current table **Long version** I'm using Kohana + Doctrine. I have three tables where I want to get the results from. I have two situations: 1. Show all childs of a particular table 2. Show some childs of a particular table For the first situation, I have put a method in a model which executes a (doctrine) query and returns the result. This just works fine. For the second situation, it looked convenient to add a method to the parent doctrine record, to fetch everything, but then filtered. But when I execute that query, I get or an unknown class exception, or a trying to get a reference to a non-object error (depending on what I exactly execute/return). Trying to get to the source of the problem, I even just return the result of the first method that should work, but even there I get the same error. Is it a problem to execute the query from within a Doctrine_Record? Doctrine_Record: class Issue_History extends BaseIssue_History { public function getUserSafeItems() { $model = new Issue_History_Model(); return $model->fromIssueId(0); } } Issue_History_Model: public function fromIssueId($issue_id) { $q = Doctrine_Query::create() ->from("Issue_History IH, IH.Issue_History_Items IHI, IHI.Change_Types") ->where("IH.issue_id = ?", 3) ->orderBy("IH.date"); return $q->execute(); } The view where this code is used: <?foreach($model->issue_history as $history): //$issue_history is the result of Issue_History_Model->fromIssueId($id)?> <div class="changeItem"> <h4>Bijgewerkt door <?=$history->User->name?> <?=datehelper::getRelativeTime($history->date)?></h4> <ul> <? if($model->showNonUserChanges || $history->hasUserSafeItems()): //In the case of the error, the first condition is false, but the last is true?> $history_items = $model->showNonUserChanges ? $history->Issue_History_Items : $history->getUserSafeItems()->Issue_History_Items?> <?foreach($history_items as $history_item):?> <li><?=sprintf($history_item->Change_Types->text, $history_item->old_value, $history_item->new_value)//Exception happens here?></li> <?endforeach?> <?endif;?> </ul> </div> <?endforeach;?>
php
doctrine
null
null
null
null
open
Can not load related tables when executing query from Doctrine_Record === I'm struggling with a very strange problem, and I cannot seem to fix it. **Short version** When I execute a query from within a Doctrine_Record, it just doesn't seem to work when I try to get a related table. I get an Exception: > error: Uncaught PHP Error: Trying to get property of non-object in file > D:/Tools/Development/xampp1.7/htdocs/x-interactive/xibits/application/views/issues/changeList.php > on line 23 On that particular line, I try to get to the child table of the current table **Long version** I'm using Kohana + Doctrine. I have three tables where I want to get the results from. I have two situations: 1. Show all childs of a particular table 2. Show some childs of a particular table For the first situation, I have put a method in a model which executes a (doctrine) query and returns the result. This just works fine. For the second situation, it looked convenient to add a method to the parent doctrine record, to fetch everything, but then filtered. But when I execute that query, I get or an unknown class exception, or a trying to get a reference to a non-object error (depending on what I exactly execute/return). Trying to get to the source of the problem, I even just return the result of the first method that should work, but even there I get the same error. Is it a problem to execute the query from within a Doctrine_Record? Doctrine_Record: class Issue_History extends BaseIssue_History { public function getUserSafeItems() { $model = new Issue_History_Model(); return $model->fromIssueId(0); } } Issue_History_Model: public function fromIssueId($issue_id) { $q = Doctrine_Query::create() ->from("Issue_History IH, IH.Issue_History_Items IHI, IHI.Change_Types") ->where("IH.issue_id = ?", 3) ->orderBy("IH.date"); return $q->execute(); } The view where this code is used: <?foreach($model->issue_history as $history): //$issue_history is the result of Issue_History_Model->fromIssueId($id)?> <div class="changeItem"> <h4>Bijgewerkt door <?=$history->User->name?> <?=datehelper::getRelativeTime($history->date)?></h4> <ul> <? if($model->showNonUserChanges || $history->hasUserSafeItems()): //In the case of the error, the first condition is false, but the last is true?> $history_items = $model->showNonUserChanges ? $history->Issue_History_Items : $history->getUserSafeItems()->Issue_History_Items?> <?foreach($history_items as $history_item):?> <li><?=sprintf($history_item->Change_Types->text, $history_item->old_value, $history_item->new_value)//Exception happens here?></li> <?endforeach?> <?endif;?> </ul> </div> <?endforeach;?>
0
3,217,529
07/10/2010 02:01:40
355,044
06/01/2010 03:46:59
87
0
java - print() does not output char array if the array has int value?
I am bit confused about how Java handle conversion. I have char array consist of 0 (not '0') char[] bar = {0, 'a', 'b'}; System.out.println(String.valueOf(bar)); When this happens println method does not output anything. But when I treat zero as character: char[] bar = {'0', 'a', 'b'}; System.out.println(String.valueOf(bar)); Then it output "0ab" as expected. My understanding was if you declare array of primitive type with empty value like: char[] foo = new char[10]; those empty cells have default value of 0 in Java, so I thought it was ok to have 0 in the char array but seems like not. Could anyone explain why print method is not even outputting 'a' and 'b' ?
java
null
null
null
null
null
open
java - print() does not output char array if the array has int value? === I am bit confused about how Java handle conversion. I have char array consist of 0 (not '0') char[] bar = {0, 'a', 'b'}; System.out.println(String.valueOf(bar)); When this happens println method does not output anything. But when I treat zero as character: char[] bar = {'0', 'a', 'b'}; System.out.println(String.valueOf(bar)); Then it output "0ab" as expected. My understanding was if you declare array of primitive type with empty value like: char[] foo = new char[10]; those empty cells have default value of 0 in Java, so I thought it was ok to have 0 in the char array but seems like not. Could anyone explain why print method is not even outputting 'a' and 'b' ?
0
4,008,550
10/24/2010 14:02:32
485,627
10/24/2010 14:02:32
1
0
question on stack applications by an engg. student
Plzzzzzzzzzz tell me any hardware application of stack. as printer is hardware application of queue.
stack
null
null
null
null
10/24/2010 19:57:14
not a real question
question on stack applications by an engg. student === Plzzzzzzzzzz tell me any hardware application of stack. as printer is hardware application of queue.
1
6,520,403
06/29/2011 12:09:48
803,233
06/17/2011 12:45:47
21
0
How to set Alarm in Android?
Following is my code can Any body please tell me why it is not working .I have learned it from the http://androidgenuine.com/?tag=alarmreceiver-excellent-tutorial But it is not working any help will be appreciable My code is mport java.util.Calendar; import android.app.Activity; import android.app.AlarmManager; import android.app.ListActivity; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.ListView; import android.widget.AdapterView.OnItemClickListener; import android.widget.Toast; public class Notify extends Activity { Button btn; /** Called when the activity is first created. */ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.nit); Calendar cal=Calendar.getInstance(); cal.set(Calendar.MONTH,6); cal.set(Calendar.YEAR,2011); cal.set(Calendar.DAY_OF_MONTH,29); cal.set(Calendar.HOUR_OF_DAY,17); cal.set(Calendar.MINUTE,30); // String[] dude=new String[] {"nitin","avi","aman","rahul","pattrick","minkle","manmohan","nitin","nitin"}; //setListAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_expandable_list_item_1,dude)); // getListView().setTextFilterEnabled(true); //String[] dude1=new String[] {"nitin","avi","aman","rahul","pattrick","minkle","manmohan"}; Intent intent = new Intent(this, Mote.class); PendingIntent pendingIntent = PendingIntent.getBroadcast(this.getApplicationContext(), 1253, intent, PendingIntent.FLAG_UPDATE_CURRENT| Intent.FILL_IN_DATA); AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE); alarmManager.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(),pendingIntent ); Toast.makeText(this, "Alarm worked.", Toast.LENGTH_LONG).show(); } } and my Receiver class is import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.widget.Toast; public class Mote extends BroadcastReceiver{ public void onReceive(Context context, Intent intent) { // TODO Auto-generated method stub Toast.makeText(context, "Alarm worked.", Toast.LENGTH_LONG).show(); int icon = R.drawable.icon; CharSequence tickerText = "Hello you have to take medicine I am Nitin Sharma"; long when = System.currentTimeMillis(); //Notification notification = new Notification(icon, tickerText,when ); CharSequence contentTitle = "My notification"; CharSequence contentText = "Hello World!"; //notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent); final int NOTIF_ID = 1234; NotificationManager notofManager = (NotificationManager)context. getSystemService(Context.NOTIFICATION_SERVICE); // Notification note = new Notification(R.drawable.face,"NEW ACTIVITY", System.currentTimeMillis()); Intent notificationIntent = new Intent(context, Alset.class); PendingIntent contentIntent = PendingIntent.getActivity(context,0, notificationIntent, 0); Notification notification = new Notification(icon, tickerText,when ); //Notification notification1 = new Notification(R.drawable.icon, "Wake up alarm", System.currentTimeMillis()); notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent); notification.flags = Notification.FLAG_INSISTENT; notification.defaults |= Notification.DEFAULT_SOUND; //notification.setLatestEventInfo(context, "My Activity", "This will runs on button click", contentIntent); notofManager.notify(NOTIF_ID,notification); //PendingIntent contentIntent = PendingIntent.getActivity(context, 0, new Intent(context, MainActivity.class), 0); //notification.setLatestEventInfo(context, "Context Title", "Context text", contentIntent); // notification.flags = Notification.FLAG_INSISTENT; } }
android
alarmmanager
null
null
null
null
open
How to set Alarm in Android? === Following is my code can Any body please tell me why it is not working .I have learned it from the http://androidgenuine.com/?tag=alarmreceiver-excellent-tutorial But it is not working any help will be appreciable My code is mport java.util.Calendar; import android.app.Activity; import android.app.AlarmManager; import android.app.ListActivity; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.ListView; import android.widget.AdapterView.OnItemClickListener; import android.widget.Toast; public class Notify extends Activity { Button btn; /** Called when the activity is first created. */ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.nit); Calendar cal=Calendar.getInstance(); cal.set(Calendar.MONTH,6); cal.set(Calendar.YEAR,2011); cal.set(Calendar.DAY_OF_MONTH,29); cal.set(Calendar.HOUR_OF_DAY,17); cal.set(Calendar.MINUTE,30); // String[] dude=new String[] {"nitin","avi","aman","rahul","pattrick","minkle","manmohan","nitin","nitin"}; //setListAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_expandable_list_item_1,dude)); // getListView().setTextFilterEnabled(true); //String[] dude1=new String[] {"nitin","avi","aman","rahul","pattrick","minkle","manmohan"}; Intent intent = new Intent(this, Mote.class); PendingIntent pendingIntent = PendingIntent.getBroadcast(this.getApplicationContext(), 1253, intent, PendingIntent.FLAG_UPDATE_CURRENT| Intent.FILL_IN_DATA); AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE); alarmManager.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(),pendingIntent ); Toast.makeText(this, "Alarm worked.", Toast.LENGTH_LONG).show(); } } and my Receiver class is import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.widget.Toast; public class Mote extends BroadcastReceiver{ public void onReceive(Context context, Intent intent) { // TODO Auto-generated method stub Toast.makeText(context, "Alarm worked.", Toast.LENGTH_LONG).show(); int icon = R.drawable.icon; CharSequence tickerText = "Hello you have to take medicine I am Nitin Sharma"; long when = System.currentTimeMillis(); //Notification notification = new Notification(icon, tickerText,when ); CharSequence contentTitle = "My notification"; CharSequence contentText = "Hello World!"; //notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent); final int NOTIF_ID = 1234; NotificationManager notofManager = (NotificationManager)context. getSystemService(Context.NOTIFICATION_SERVICE); // Notification note = new Notification(R.drawable.face,"NEW ACTIVITY", System.currentTimeMillis()); Intent notificationIntent = new Intent(context, Alset.class); PendingIntent contentIntent = PendingIntent.getActivity(context,0, notificationIntent, 0); Notification notification = new Notification(icon, tickerText,when ); //Notification notification1 = new Notification(R.drawable.icon, "Wake up alarm", System.currentTimeMillis()); notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent); notification.flags = Notification.FLAG_INSISTENT; notification.defaults |= Notification.DEFAULT_SOUND; //notification.setLatestEventInfo(context, "My Activity", "This will runs on button click", contentIntent); notofManager.notify(NOTIF_ID,notification); //PendingIntent contentIntent = PendingIntent.getActivity(context, 0, new Intent(context, MainActivity.class), 0); //notification.setLatestEventInfo(context, "Context Title", "Context text", contentIntent); // notification.flags = Notification.FLAG_INSISTENT; } }
0
2,954,922
06/02/2010 04:00:04
319,470
04/18/2010 00:28:14
26
7
Binding DataTable To GridView, But No Rows In GridViewRowCollection Despite GridView Population?
Problem: I've coded a GridView in the markup in a page. I have coded a DataTable in the code-behind that takes data from a collection of custom objects. I then bind that DataTable to the GridView. (Specific problem mentioned a couple code-snippets below.) GridView Markup: <asp:GridView ID="gvCart" runat="server" CssClass="pList" AutoGenerateColumns="false" DataKeyNames="ProductID"> <Columns> <asp:BoundField DataField="ProductID" HeaderText="ProductID" /> <asp:BoundField DataField="Name" HeaderText="ProductName" /> <asp:ImageField DataImageUrlField="Thumbnail" HeaderText="Thumbnail"></asp:ImageField> <asp:BoundField DataField="Unit Price" HeaderText="Unit Price" /> <asp:TemplateField HeaderText="Quantity"> <ItemTemplate> <asp:TextBox ID="Quantity" runat="server" Text="<%# Bind('Quantity') %>" Width="25px"></asp:TextBox> </ItemTemplate> </asp:TemplateField> <asp:BoundField DataField="Total Price" HeaderText="Total Price" /> </Columns> </asp:GridView> DataTable Code-Behind: private void View(List<OrderItem> cart) { DataSet ds = new DataSet(); DataTable dt = ds.Tables.Add("Cart"); if (cart != null) { dt.Columns.Add("ProductID"); dt.Columns.Add("Name"); dt.Columns.Add("Thumbnail"); dt.Columns.Add("Unit Price"); dt.Columns.Add("Quantity"); dt.Columns.Add("Total Price"); foreach (OrderItem item in cart) { DataRow dr = dt.NewRow(); dr["ProductID"] = item.productId.ToString(); dr["Name"] = item.productName; dr["Thumbnail"] = ResolveUrl(item.productThumbnail); dr["Unit Price"] = "$" + item.productPrice.ToString(); dr["Quantity"] = item.productQuantity.ToString(); dr["Total Price"] = "$" + (item.productPrice * item.productQuantity).ToString(); dt.Rows.Add(dr); } gvCart.DataSource = dt; gvCart.DataBind(); gvCart.Width = 500; for (int counter = 0; counter < gvCart.Rows.Count; counter++) { gvCart.Rows[counter].Cells.Add(Common.createCell("<a href='cart.aspx?action=update&prodId=" + gvCart.Rows[counter].Cells[0].Text + "'>Update</a><br /><a href='cart.aspx?action='action=remove&prodId=" + gvCart.Rows[counter].Cells[0].Text + "/>Remove</a>")); } } } Error occurs below in the foreach - the GridViewRowCollection is empty! private void Update(string prodId) { List<OrderItem> cart = (List<OrderItem>)Session["cart"]; int uQty = 0; foreach (GridViewRow gvr in gvCart.Rows) { if (gvr.RowType == DataControlRowType.DataRow) { if (gvr.Cells[0].Text == prodId) { uQty = int.Parse(((TextBox)gvr.Cells[4].FindControl("Quantity")).Text); } } } Goal: I'm basically trying to find a way to update the data in my GridView (and more importantly my cart Session object) without having to do everything else I've seen online such as utilizing OnRowUpdate, etc. Could someone please tell me why gvCart.Rows is empty and/or how I could accomplish my goal without utilizing OnRowUpdate, etc.? When I execute this code, the GridView gets populated but for some reason I can't access any of its rows in the code-behind.
c#
asp.net
gridview
datatable
null
null
open
Binding DataTable To GridView, But No Rows In GridViewRowCollection Despite GridView Population? === Problem: I've coded a GridView in the markup in a page. I have coded a DataTable in the code-behind that takes data from a collection of custom objects. I then bind that DataTable to the GridView. (Specific problem mentioned a couple code-snippets below.) GridView Markup: <asp:GridView ID="gvCart" runat="server" CssClass="pList" AutoGenerateColumns="false" DataKeyNames="ProductID"> <Columns> <asp:BoundField DataField="ProductID" HeaderText="ProductID" /> <asp:BoundField DataField="Name" HeaderText="ProductName" /> <asp:ImageField DataImageUrlField="Thumbnail" HeaderText="Thumbnail"></asp:ImageField> <asp:BoundField DataField="Unit Price" HeaderText="Unit Price" /> <asp:TemplateField HeaderText="Quantity"> <ItemTemplate> <asp:TextBox ID="Quantity" runat="server" Text="<%# Bind('Quantity') %>" Width="25px"></asp:TextBox> </ItemTemplate> </asp:TemplateField> <asp:BoundField DataField="Total Price" HeaderText="Total Price" /> </Columns> </asp:GridView> DataTable Code-Behind: private void View(List<OrderItem> cart) { DataSet ds = new DataSet(); DataTable dt = ds.Tables.Add("Cart"); if (cart != null) { dt.Columns.Add("ProductID"); dt.Columns.Add("Name"); dt.Columns.Add("Thumbnail"); dt.Columns.Add("Unit Price"); dt.Columns.Add("Quantity"); dt.Columns.Add("Total Price"); foreach (OrderItem item in cart) { DataRow dr = dt.NewRow(); dr["ProductID"] = item.productId.ToString(); dr["Name"] = item.productName; dr["Thumbnail"] = ResolveUrl(item.productThumbnail); dr["Unit Price"] = "$" + item.productPrice.ToString(); dr["Quantity"] = item.productQuantity.ToString(); dr["Total Price"] = "$" + (item.productPrice * item.productQuantity).ToString(); dt.Rows.Add(dr); } gvCart.DataSource = dt; gvCart.DataBind(); gvCart.Width = 500; for (int counter = 0; counter < gvCart.Rows.Count; counter++) { gvCart.Rows[counter].Cells.Add(Common.createCell("<a href='cart.aspx?action=update&prodId=" + gvCart.Rows[counter].Cells[0].Text + "'>Update</a><br /><a href='cart.aspx?action='action=remove&prodId=" + gvCart.Rows[counter].Cells[0].Text + "/>Remove</a>")); } } } Error occurs below in the foreach - the GridViewRowCollection is empty! private void Update(string prodId) { List<OrderItem> cart = (List<OrderItem>)Session["cart"]; int uQty = 0; foreach (GridViewRow gvr in gvCart.Rows) { if (gvr.RowType == DataControlRowType.DataRow) { if (gvr.Cells[0].Text == prodId) { uQty = int.Parse(((TextBox)gvr.Cells[4].FindControl("Quantity")).Text); } } } Goal: I'm basically trying to find a way to update the data in my GridView (and more importantly my cart Session object) without having to do everything else I've seen online such as utilizing OnRowUpdate, etc. Could someone please tell me why gvCart.Rows is empty and/or how I could accomplish my goal without utilizing OnRowUpdate, etc.? When I execute this code, the GridView gets populated but for some reason I can't access any of its rows in the code-behind.
0
9,889,980
03/27/2012 12:57:38
961,429
09/23/2011 14:55:19
1
0
How to get li's id's of a ul that is under li ? my code goes like below
<li style="list-type:none;">1 <ul> <li style="list-type:none;">1</li> </ul> </li> <li style="list-type:none;">2 <ul> <li style="list-type:none;">1</li> <li style="list-type:none;">2</li> </ul> </li> <script type="text/javascript"> var targetListId = this.currentItem[0].parentNode.id; var targetlistlength = document.getElementById(targetListId).getElementsByTagName("li").length; </script> i want index of li that is having ul . but the thing is when any li is moving it is getting the top most li only . i want the nth li id
javascript
null
null
null
null
04/18/2012 05:56:22
not a real question
How to get li's id's of a ul that is under li ? my code goes like below === <li style="list-type:none;">1 <ul> <li style="list-type:none;">1</li> </ul> </li> <li style="list-type:none;">2 <ul> <li style="list-type:none;">1</li> <li style="list-type:none;">2</li> </ul> </li> <script type="text/javascript"> var targetListId = this.currentItem[0].parentNode.id; var targetlistlength = document.getElementById(targetListId).getElementsByTagName("li").length; </script> i want index of li that is having ul . but the thing is when any li is moving it is getting the top most li only . i want the nth li id
1
3,937,699
10/14/2010 21:22:16
138,776
07/15/2009 15:02:09
194
8
Dynamically choosing template for django inclusion tag
**Currently** I have an inclusion tag that is coded something like this: @register.inclusion_tag('forms/my_insert.html', takes_context=True) def my_insert(context): # set up some other variables for the context return context In my template, I include it by putting in `{% my_insert %}` **New Feature Request** We now want to test a new layout -- it's just a change to the template, no change to the context variables. I'm accomplishing this by calling the first @register.inclusion_tag('forms/my_new_insert.html', takes_context=True) def my_new_insert(context): return my_insert(context) To use the new template, I have to use: {% ifequal some_var 0 %} {% my_insert %} {% endifequal %} {% ifnotequal some_var 0 %} {% my_new_insert %} {% endifnotequal %} **The Question** Is there a way to choose the template in the function which sets up the template tag context? I *imagine* it might be something like: @register.inclusion_tag('forms/my_insert.html', takes_context=True) def my_insert(context): # set up some other variables for the context if context['some_var'] == 0: context['template'] = 'forms/my_insert.html' else: context['template'] = 'forms/my_new_insert.html' return context
django
django-templates
django-template-tags
null
null
null
open
Dynamically choosing template for django inclusion tag === **Currently** I have an inclusion tag that is coded something like this: @register.inclusion_tag('forms/my_insert.html', takes_context=True) def my_insert(context): # set up some other variables for the context return context In my template, I include it by putting in `{% my_insert %}` **New Feature Request** We now want to test a new layout -- it's just a change to the template, no change to the context variables. I'm accomplishing this by calling the first @register.inclusion_tag('forms/my_new_insert.html', takes_context=True) def my_new_insert(context): return my_insert(context) To use the new template, I have to use: {% ifequal some_var 0 %} {% my_insert %} {% endifequal %} {% ifnotequal some_var 0 %} {% my_new_insert %} {% endifnotequal %} **The Question** Is there a way to choose the template in the function which sets up the template tag context? I *imagine* it might be something like: @register.inclusion_tag('forms/my_insert.html', takes_context=True) def my_insert(context): # set up some other variables for the context if context['some_var'] == 0: context['template'] = 'forms/my_insert.html' else: context['template'] = 'forms/my_new_insert.html' return context
0
9,963,524
04/01/2012 10:00:44
1,306,134
04/01/2012 09:57:16
1
0
What is a subtraction function that is similar to sum() for subtracting items in list?
I am trying to create a calculator, but I am having trouble writing a function that will subtract numbers from a list. For example: class Calculator(object): def __inti__ (self,args): self.args = args def subtract_numbers(self,*args): return ***here is where I need the subtraction function to be**** For addition, I can simply use return sum(args) to calculate the total but I am unsure of what I can do for subtractions
python
function
sum
subtraction
null
null
open
What is a subtraction function that is similar to sum() for subtracting items in list? === I am trying to create a calculator, but I am having trouble writing a function that will subtract numbers from a list. For example: class Calculator(object): def __inti__ (self,args): self.args = args def subtract_numbers(self,*args): return ***here is where I need the subtraction function to be**** For addition, I can simply use return sum(args) to calculate the total but I am unsure of what I can do for subtractions
0
10,988,071
06/11/2012 21:55:09
1,357,195
04/25/2012 20:41:11
14
0
rails - how to check if user has been a member for a month
i was wondering how i could check if a user has been a member for over 1 month? i notice that rails created a created_at column. how can i check if the user has been a month old member? thanks i looked at doing things like 1.month.ago but wouldn't that keep changing from the current date? maybe my logic is kinda wrong in that. could i do something like... user.created_at - 1.month.ago > 0 could i not do this subtraction comparison? or does that not make sense? thanks
ruby-on-rails
datetime
null
null
null
null
open
rails - how to check if user has been a member for a month === i was wondering how i could check if a user has been a member for over 1 month? i notice that rails created a created_at column. how can i check if the user has been a month old member? thanks i looked at doing things like 1.month.ago but wouldn't that keep changing from the current date? maybe my logic is kinda wrong in that. could i do something like... user.created_at - 1.month.ago > 0 could i not do this subtraction comparison? or does that not make sense? thanks
0
7,131,752
08/20/2011 12:29:09
876,581
08/03/2011 12:22:37
74
0
Quantum complexity class VS Non quantum complexity class
I want to know what is the relation between BQP complexity class and P and NP Complexity class ? please help me . thanks.
algorithm
complexity
time-complexity
quantum
quantum-computing
08/22/2011 12:27:02
off topic
Quantum complexity class VS Non quantum complexity class === I want to know what is the relation between BQP complexity class and P and NP Complexity class ? please help me . thanks.
2
7,743,929
10/12/2011 17:17:19
991,852
10/12/2011 16:32:26
1
0
getting wrong values in cuda c programm
[tag:cuda c] i m trying to simulate matrix multiplication in cuda C..everything is correct except answer.. this is my program.. #include <stdio.h> #include <cuda.h> #include <time.h> #include <conio.h> #define N 4 #define TILE_WIDTH 2 __global__ void MatMul(int*A, int* B, int* C) { int sum; int idx = threadIdx.x; int idy = threadIdx.y; int bx = blockIdx.x; int by = blockIdx.y; int k ,uidx , uidy , i; uidx = bx*TILE_WIDTH + idx; uidy = by*TILE_WIDTH + idy; sum = 0; // Allocating memory in shared memory __shared__ int temp1[TILE_WIDTH][TILE_WIDTH]; __shared__ int temp2[TILE_WIDTH][TILE_WIDTH]; //copying the data to shared memory for( i =0;i<N/TILE_WIDTH; i++) { temp1[idy][idx] = A[uidy * N + ((i*TILE_WIDTH)+uidx)%N]; temp2[idy][idx] = B[(i*TILE_WIDTH+uidy * N)%N + uidx]; __syncthreads(); // multiplying matrices in shared memory for(k=0 ; k < TILE_WIDTH;k++) { sum = sum + temp1[idy][k]*temp2[k][idx]; } } // synchronizing the threads __syncthreads(); C[uidy*N + uidx] = sum; } int main( void ) { int a[N][N], b[N][N], c[N][N]; //host copies of a,b,c int *dev_a, *dev_b, *dev_c; //device copies of a,b,c // allocate the memory on the GPU cudaMalloc( (void**)&dev_a, N * N * sizeof(int) ); cudaMalloc( (void**)&dev_b, N * N * sizeof(int) ); cudaMalloc( (void**)&dev_c, N * N * sizeof(int) ); // fill the matrices 'a' and 'b' on the CPU for (int i=0; i<N; i++) { for (int j=0; j < N; j++) { a[i][j] = j+3; b[i][j] = i+6; } } //copy above a,b values to device cudaMemcpy( dev_a, a, N * N * sizeof(int), cudaMemcpyHostToDevice ); cudaMemcpy( dev_b, b, N * N * sizeof(int), cudaMemcpyHostToDevice ); // Prepare timer cudaEvent_t start, stop; float time; cudaEventCreate(&start); cudaEventCreate(&stop); //start record cudaEventRecord(start, 0); // Kernel invocation with N threads dim3 dimGrid(2,2,1); dim3 dimBlock(TILE_WIDTH,TILE_WIDTH,1); MatMul<<<dimGrid , dimBlock>>> (dev_a, dev_b, dev_c); //stop record cudaEventRecord(stop, 0); cudaEventSynchronize(stop); //this is operation time cudaEventElapsedTime(&time, start, stop); //clean up cudaEventDestroy(start); cudaEventDestroy(stop); //copy result to host cudaMemcpy(c, dev_c, N * N * sizeof(int), cudaMemcpyDeviceToHost ); //output.. for (int i=0; i < N; i++){ for (int j=0; j < N; j++) printf( "%d ", a[i][j]); printf (" "); for (int j=0; j < N; j++) printf( "%d ", b[i][j]); printf (" = "); for (int j=0; j < N; j++) printf( "%d ", c[i][j]); printf ("\n"); } //free the allocated memory in device cudaFree( dev_a ); cudaFree( dev_b ); cudaFree( dev_c ); printf("\n multiplication done!!!\n"); printf("\n"); printf(" time elapsed in ms=%f\n",time); getch(); return 0; } & this is my o/p 3 4 5 6 6 6 6 6 108 108 115 115 3 4 5 6 7 7 7 7 108 108 115 115 3 4 5 6 8 8 8 8 108 108 115 115 3 4 5 6 9 9 9 9 108 108 115 115 it is showing wrong values.. plz tell me any error in my prgm..i m vry new in cuda c
cuda
null
null
null
null
10/14/2011 02:15:23
not a real question
getting wrong values in cuda c programm === [tag:cuda c] i m trying to simulate matrix multiplication in cuda C..everything is correct except answer.. this is my program.. #include <stdio.h> #include <cuda.h> #include <time.h> #include <conio.h> #define N 4 #define TILE_WIDTH 2 __global__ void MatMul(int*A, int* B, int* C) { int sum; int idx = threadIdx.x; int idy = threadIdx.y; int bx = blockIdx.x; int by = blockIdx.y; int k ,uidx , uidy , i; uidx = bx*TILE_WIDTH + idx; uidy = by*TILE_WIDTH + idy; sum = 0; // Allocating memory in shared memory __shared__ int temp1[TILE_WIDTH][TILE_WIDTH]; __shared__ int temp2[TILE_WIDTH][TILE_WIDTH]; //copying the data to shared memory for( i =0;i<N/TILE_WIDTH; i++) { temp1[idy][idx] = A[uidy * N + ((i*TILE_WIDTH)+uidx)%N]; temp2[idy][idx] = B[(i*TILE_WIDTH+uidy * N)%N + uidx]; __syncthreads(); // multiplying matrices in shared memory for(k=0 ; k < TILE_WIDTH;k++) { sum = sum + temp1[idy][k]*temp2[k][idx]; } } // synchronizing the threads __syncthreads(); C[uidy*N + uidx] = sum; } int main( void ) { int a[N][N], b[N][N], c[N][N]; //host copies of a,b,c int *dev_a, *dev_b, *dev_c; //device copies of a,b,c // allocate the memory on the GPU cudaMalloc( (void**)&dev_a, N * N * sizeof(int) ); cudaMalloc( (void**)&dev_b, N * N * sizeof(int) ); cudaMalloc( (void**)&dev_c, N * N * sizeof(int) ); // fill the matrices 'a' and 'b' on the CPU for (int i=0; i<N; i++) { for (int j=0; j < N; j++) { a[i][j] = j+3; b[i][j] = i+6; } } //copy above a,b values to device cudaMemcpy( dev_a, a, N * N * sizeof(int), cudaMemcpyHostToDevice ); cudaMemcpy( dev_b, b, N * N * sizeof(int), cudaMemcpyHostToDevice ); // Prepare timer cudaEvent_t start, stop; float time; cudaEventCreate(&start); cudaEventCreate(&stop); //start record cudaEventRecord(start, 0); // Kernel invocation with N threads dim3 dimGrid(2,2,1); dim3 dimBlock(TILE_WIDTH,TILE_WIDTH,1); MatMul<<<dimGrid , dimBlock>>> (dev_a, dev_b, dev_c); //stop record cudaEventRecord(stop, 0); cudaEventSynchronize(stop); //this is operation time cudaEventElapsedTime(&time, start, stop); //clean up cudaEventDestroy(start); cudaEventDestroy(stop); //copy result to host cudaMemcpy(c, dev_c, N * N * sizeof(int), cudaMemcpyDeviceToHost ); //output.. for (int i=0; i < N; i++){ for (int j=0; j < N; j++) printf( "%d ", a[i][j]); printf (" "); for (int j=0; j < N; j++) printf( "%d ", b[i][j]); printf (" = "); for (int j=0; j < N; j++) printf( "%d ", c[i][j]); printf ("\n"); } //free the allocated memory in device cudaFree( dev_a ); cudaFree( dev_b ); cudaFree( dev_c ); printf("\n multiplication done!!!\n"); printf("\n"); printf(" time elapsed in ms=%f\n",time); getch(); return 0; } & this is my o/p 3 4 5 6 6 6 6 6 108 108 115 115 3 4 5 6 7 7 7 7 108 108 115 115 3 4 5 6 8 8 8 8 108 108 115 115 3 4 5 6 9 9 9 9 108 108 115 115 it is showing wrong values.. plz tell me any error in my prgm..i m vry new in cuda c
1
7,977,381
11/02/2011 08:17:25
994,298
10/13/2011 20:25:04
6
0
how can i add facebook login to my site?
can any one give me a best example site URL to using how to use facebook connect or facebook signup into my site or facebook login with asp.net site?
facebook-connect
null
null
null
null
06/03/2012 15:19:14
not a real question
how can i add facebook login to my site? === can any one give me a best example site URL to using how to use facebook connect or facebook signup into my site or facebook login with asp.net site?
1
3,155,769
07/01/2010 07:22:18
380,833
07/01/2010 07:22:18
1
0
It is the samsung mobile "Corby Beat GT-M3710" using Bada OS?
What's Operating System is using the Samsung Mobile "corby beat gt-m3710"? in some places says it's using an app for Bada OS and it will the first phone using it, but there's nothing clear.
mobile
null
null
null
null
07/01/2010 07:43:58
off topic
It is the samsung mobile "Corby Beat GT-M3710" using Bada OS? === What's Operating System is using the Samsung Mobile "corby beat gt-m3710"? in some places says it's using an app for Bada OS and it will the first phone using it, but there's nothing clear.
2
5,541,308
04/04/2011 16:17:46
691,431
04/04/2011 16:17:46
1
0
Hiding JavaScript Code
I want to hide my JavaScript-Code. I know, JavaScript is send to the Client, and the client has to interpret the code, but what I am looking for is a way, to hide the file, where the code is written. I don't really know, how to do that. A trainee at our company said, he knews a web site, where they can do so, so that i analysed the code of the web-site. Guess what, i couldn't figure out, how they can do so. I'm a little embarressed, because the site is not a good web site, but I need the technology, they use. The site is www.bitload.com: http://www.bitload.com/f/10721194/02a2f743?c=free If you wget the file you won't see a part of the JavaScript code (the part, where the url is written). If you look the source code, you will find the following block: > <script type="text/javascript"> var plugin = 'divx'; var mp = new MediaPlugin(); var url = 'http://bl028.bitload.com/file-10721194/hVAGXO4RcKJLGrRMcjNE/amb_eheistxvid_s01e22.avi'; var divxopts = {width: 760, height: 427, src: url, autoplay: true, wmode: 'opaque'}; document.observe('dom:loaded', function () { showPlayer(); return; }); function showPlayer() { $('theplayer').style.display = 'block'; if (plugin == 'divx') { $('theplayer').innerHTML = mp.divxNode(divxopts) + $('theplayer').innerHTML; } // $('pad').style.display = 'none'; } </script> If you wget the file this block is missing, but the rest of our source code is identically. I have to do so, too, but I don't have a clue, how. Please give me a hint, how do they hide this peace of code? I am sorry, that this is a link to a download site, I searched everywhere in order to find a better example from a page which provides legal downloads, I want to use this knowledge for legal purposes. After I couldn't found another example I searched for a legal Video on Bitload, but couldn't find anyone, too. Please forgive me the bad example, but I need to know more about the technology!
javascript
html
source-code
hide
null
04/04/2011 23:53:03
not a real question
Hiding JavaScript Code === I want to hide my JavaScript-Code. I know, JavaScript is send to the Client, and the client has to interpret the code, but what I am looking for is a way, to hide the file, where the code is written. I don't really know, how to do that. A trainee at our company said, he knews a web site, where they can do so, so that i analysed the code of the web-site. Guess what, i couldn't figure out, how they can do so. I'm a little embarressed, because the site is not a good web site, but I need the technology, they use. The site is www.bitload.com: http://www.bitload.com/f/10721194/02a2f743?c=free If you wget the file you won't see a part of the JavaScript code (the part, where the url is written). If you look the source code, you will find the following block: > <script type="text/javascript"> var plugin = 'divx'; var mp = new MediaPlugin(); var url = 'http://bl028.bitload.com/file-10721194/hVAGXO4RcKJLGrRMcjNE/amb_eheistxvid_s01e22.avi'; var divxopts = {width: 760, height: 427, src: url, autoplay: true, wmode: 'opaque'}; document.observe('dom:loaded', function () { showPlayer(); return; }); function showPlayer() { $('theplayer').style.display = 'block'; if (plugin == 'divx') { $('theplayer').innerHTML = mp.divxNode(divxopts) + $('theplayer').innerHTML; } // $('pad').style.display = 'none'; } </script> If you wget the file this block is missing, but the rest of our source code is identically. I have to do so, too, but I don't have a clue, how. Please give me a hint, how do they hide this peace of code? I am sorry, that this is a link to a download site, I searched everywhere in order to find a better example from a page which provides legal downloads, I want to use this knowledge for legal purposes. After I couldn't found another example I searched for a legal Video on Bitload, but couldn't find anyone, too. Please forgive me the bad example, but I need to know more about the technology!
1
2,045,257
01/11/2010 21:58:34
208
08/03/2008 13:52:08
918
13
Are Single Quotes Valid in a Doctype?
As stated in [this question][1], single quotes in html has either become more popular or we have begun to notice them more often. Regardless, I have a related question. The `HTML 4.01 Strict` doctype as shown at [w3schools][2] (below) uses double quotes. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> As stated in the [accepted answer][3], single quotes are perfectly valid. However, the quoted values in the doctype aren't necessarily attributes so are single quotes permitted? In other words, is the following a valid doctype? Furthermore, if this is valid HTML, is it accepted by modern browsers? <!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01//EN' 'http://www.w3.org/TR/html4/strict.dtd'> Also, does the same hold true for XML doctypes? <?xml version='1.0' encoding='utf-8'?> [1]: http://stackoverflow.com/questions/242766/when-did-single-quotes-in-html-become-so-popular [2]: http://www.w3schools.com/tags/tag_doctype.asp [3]: http://stackoverflow.com/questions/242766/when-did-single-quotes-in-html-become-so-popular/242775#242775
html
xhtml
doctype
quotes
null
null
open
Are Single Quotes Valid in a Doctype? === As stated in [this question][1], single quotes in html has either become more popular or we have begun to notice them more often. Regardless, I have a related question. The `HTML 4.01 Strict` doctype as shown at [w3schools][2] (below) uses double quotes. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> As stated in the [accepted answer][3], single quotes are perfectly valid. However, the quoted values in the doctype aren't necessarily attributes so are single quotes permitted? In other words, is the following a valid doctype? Furthermore, if this is valid HTML, is it accepted by modern browsers? <!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01//EN' 'http://www.w3.org/TR/html4/strict.dtd'> Also, does the same hold true for XML doctypes? <?xml version='1.0' encoding='utf-8'?> [1]: http://stackoverflow.com/questions/242766/when-did-single-quotes-in-html-become-so-popular [2]: http://www.w3schools.com/tags/tag_doctype.asp [3]: http://stackoverflow.com/questions/242766/when-did-single-quotes-in-html-become-so-popular/242775#242775
0
7,426,554
09/15/2011 06:11:33
898,459
08/17/2011 10:41:56
76
19
Play mp4 Video using <Embed> tag on Android Webview
I want to play mp4 video using <embed> tag on Webview. I have few constraints for not to use HTML5 <video> tag. I have looked code to play YouTube video on webview. But YouTube uses .flv format. I have .mp4 video to play. Thanks in advance.
android
null
null
null
null
null
open
Play mp4 Video using <Embed> tag on Android Webview === I want to play mp4 video using <embed> tag on Webview. I have few constraints for not to use HTML5 <video> tag. I have looked code to play YouTube video on webview. But YouTube uses .flv format. I have .mp4 video to play. Thanks in advance.
0
1,479,081
09/25/2009 19:15:00
127,257
06/22/2009 23:54:43
859
15
WCF - There was no endpoint listening at net.tcp://..../Querier.svc that could accept the message
WCF - There was no endpoint listening at net.tcp://myserver:9000/SearchQueryService/Querier.svc that could accept the message. I have the net.tcp protocol enabled on the IIS application Windows firewall is off The net.tcp binding is set to port 9000 for the entire IIS application. My web.config is very standard: <system.serviceModel> <diagnostics> <messageLogging logMalformedMessages="true" logMessagesAtServiceLevel="false" logMessagesAtTransportLevel="true" /> </diagnostics> <services> <service behaviorConfiguration="SearchQueryServiceBehavior" name="Search.Querier.WCF.Querier"> <endpoint address="mex" binding="mexHttpBinding" name="mexHttpEndpoint" contract="IMetadataExchange" /> <endpoint binding="netTcpBinding" bindingConfiguration="" name="netTcpEndpoint" contract="Search.Querier.WCF.IQuerier" /> </service> </services> <behaviors> <serviceBehaviors> <behavior name="SearchQueryServiceBehavior"> <serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="false"/> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel> And this very setup works on one server but not the other... What could be the problem? Both servers, the working and non-working one are running IIS7. The only difference is the working box is Vista64 Sp2 and non working one is W2k864.
wcf
wcf-client
wcf-security
null
null
null
open
WCF - There was no endpoint listening at net.tcp://..../Querier.svc that could accept the message === WCF - There was no endpoint listening at net.tcp://myserver:9000/SearchQueryService/Querier.svc that could accept the message. I have the net.tcp protocol enabled on the IIS application Windows firewall is off The net.tcp binding is set to port 9000 for the entire IIS application. My web.config is very standard: <system.serviceModel> <diagnostics> <messageLogging logMalformedMessages="true" logMessagesAtServiceLevel="false" logMessagesAtTransportLevel="true" /> </diagnostics> <services> <service behaviorConfiguration="SearchQueryServiceBehavior" name="Search.Querier.WCF.Querier"> <endpoint address="mex" binding="mexHttpBinding" name="mexHttpEndpoint" contract="IMetadataExchange" /> <endpoint binding="netTcpBinding" bindingConfiguration="" name="netTcpEndpoint" contract="Search.Querier.WCF.IQuerier" /> </service> </services> <behaviors> <serviceBehaviors> <behavior name="SearchQueryServiceBehavior"> <serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="false"/> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel> And this very setup works on one server but not the other... What could be the problem? Both servers, the working and non-working one are running IIS7. The only difference is the working box is Vista64 Sp2 and non working one is W2k864.
0
3,654,228
09/06/2010 20:50:28
168,206
09/03/2009 23:00:36
21
1
cocos2d and MPMoviePlayerController crash
I try to show an intro and replaceScene when the intro has finished. But, when the movie finish, app is crashing on [[CCDirector sharedDirector] replaceScene:[CCFadeTransition transitionWithDuration:0.5f scene:[MenuScene scene]]];. code is; - (void) moviePlayBackDidFinish { [self.moviePlayer stop]; [[CCDirector sharedDirector] replaceScene:[CCFadeTransition transitionWithDuration:0.5f scene:[MenuScene scene]]]; } -(id) init { // always call "super" init // Apple recommends to re-assign "self" with the "super" return value if( (self=[super init] )) { //pencere boyutu elde ediliyor NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"intro" ofType:@"mp4"]]; self.moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url]; // Register to receive a notification when the movie has finished playing. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayBackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:self.moviePlayer]; if ([self.moviePlayer respondsToSelector:@selector(setFullscreen:animated:)]) { // Use the new 3.2 style API self.moviePlayer.controlStyle = MPMovieControlStyleNone; self.moviePlayer.shouldAutoplay = YES; // This does blows up in cocos2d, so we'll resize manually // [moviePlayer setFullscreen:YES animated:YES]; [self.moviePlayer.view setTransform:CGAffineTransformMakeRotation((float)M_PI_2)]; CGSize winSize = [[CCDirector sharedDirector] winSize]; self.moviePlayer.view.frame = CGRectMake(0, 0, winSize.height, winSize.width);// width and height are swapped after rotation [[[CCDirector sharedDirector] openGLView] addSubview:self.moviePlayer.view]; } else { // Use the old 2.0 style API self.moviePlayer.movieControlMode = MPMovieControlModeHidden; [self.moviePlayer play]; } } return self; }
cocos2d
null
null
null
null
null
open
cocos2d and MPMoviePlayerController crash === I try to show an intro and replaceScene when the intro has finished. But, when the movie finish, app is crashing on [[CCDirector sharedDirector] replaceScene:[CCFadeTransition transitionWithDuration:0.5f scene:[MenuScene scene]]];. code is; - (void) moviePlayBackDidFinish { [self.moviePlayer stop]; [[CCDirector sharedDirector] replaceScene:[CCFadeTransition transitionWithDuration:0.5f scene:[MenuScene scene]]]; } -(id) init { // always call "super" init // Apple recommends to re-assign "self" with the "super" return value if( (self=[super init] )) { //pencere boyutu elde ediliyor NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"intro" ofType:@"mp4"]]; self.moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url]; // Register to receive a notification when the movie has finished playing. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayBackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:self.moviePlayer]; if ([self.moviePlayer respondsToSelector:@selector(setFullscreen:animated:)]) { // Use the new 3.2 style API self.moviePlayer.controlStyle = MPMovieControlStyleNone; self.moviePlayer.shouldAutoplay = YES; // This does blows up in cocos2d, so we'll resize manually // [moviePlayer setFullscreen:YES animated:YES]; [self.moviePlayer.view setTransform:CGAffineTransformMakeRotation((float)M_PI_2)]; CGSize winSize = [[CCDirector sharedDirector] winSize]; self.moviePlayer.view.frame = CGRectMake(0, 0, winSize.height, winSize.width);// width and height are swapped after rotation [[[CCDirector sharedDirector] openGLView] addSubview:self.moviePlayer.view]; } else { // Use the old 2.0 style API self.moviePlayer.movieControlMode = MPMovieControlModeHidden; [self.moviePlayer play]; } } return self; }
0
1,780,363
11/22/2009 23:10:42
48,082
12/21/2008 03:44:34
10,013
613
How can I insert a newline in a localized value for a String in a .wxl file?
I'm using a .wxl file to customize the text in the various dialogs in WixUI_FeatureTree. How can I insert a newline? This doesn't work: <WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization"> <String Id="WelcomeDlgTitle">{\WixUI_Font_Bigger}Welcome to the Setup Wizard for\r\n[ProductName]</String> </WixLocalization> If I try that, I get "\r\n" in the text in the dialog.
wix
null
null
null
null
null
open
How can I insert a newline in a localized value for a String in a .wxl file? === I'm using a .wxl file to customize the text in the various dialogs in WixUI_FeatureTree. How can I insert a newline? This doesn't work: <WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization"> <String Id="WelcomeDlgTitle">{\WixUI_Font_Bigger}Welcome to the Setup Wizard for\r\n[ProductName]</String> </WixLocalization> If I try that, I get "\r\n" in the text in the dialog.
0
11,513,863
07/16/2012 23:05:01
1,530,254
07/16/2012 23:01:35
1
0
How can I loop through rows in Excel and transpose them until a hyperlink is reached?
I saw a similar question (http://stackoverflow.com/questions/10536611/excel-loop-through-list-transpose-and-create-a-matrix-based-on-cell-content) that asks for something similar to what I need, except using a KEY. I don't have any specific textual key, but I need to break it up based on text with a hyperlink. Help is much appreciated, thanks!
excel
excel-vba
null
null
null
07/19/2012 04:37:39
not a real question
How can I loop through rows in Excel and transpose them until a hyperlink is reached? === I saw a similar question (http://stackoverflow.com/questions/10536611/excel-loop-through-list-transpose-and-create-a-matrix-based-on-cell-content) that asks for something similar to what I need, except using a KEY. I don't have any specific textual key, but I need to break it up based on text with a hyperlink. Help is much appreciated, thanks!
1
11,584,001
07/20/2012 17:10:36
1,541,378
07/20/2012 16:58:39
1
0
copy spreadsheet rows and columns on a webpage
we have a requirements where we want to copy the contents of a spreadsheet and paste it on a webpage. it's like select contents of columns A1 and B1 to Row number 3 (6 cells) and paste it on the webpage. this should result in a spreadsheet view of the data in the webpage to the user. after that we want to read the cell contents of the copied spreadsheet cells. we want to achieve this only via JavaScript or maybe HTML5 or jquery (preferably JavaScript)
javascript
html
html5
null
null
07/21/2012 20:01:24
not a real question
copy spreadsheet rows and columns on a webpage === we have a requirements where we want to copy the contents of a spreadsheet and paste it on a webpage. it's like select contents of columns A1 and B1 to Row number 3 (6 cells) and paste it on the webpage. this should result in a spreadsheet view of the data in the webpage to the user. after that we want to read the cell contents of the copied spreadsheet cells. we want to achieve this only via JavaScript or maybe HTML5 or jquery (preferably JavaScript)
1
6,194,856
05/31/2011 23:55:43
778,499
05/31/2011 23:12:25
1
0
@RequestParam is null when accessed in @ModelAttribute method
I am using am working on a project where users can choose to either start with a new form submission, or continue with a form submission that they had started previously. I'm using a the @ModelAttribute notation to generate new object for new form submissions. This much works great. Now I'm trying to get the information form the database to pre-fill inforomation in the object based on a given id and I've run into a snag. I'm trying to use @RequestParam to get the id that is passed in using a form submission but the id is comming back null. I can see that the id is being sent as part of the request string but it isn't making it to the @ModelAttribute method. Here is what I have so far. Form that is submitted to send regId so that form can be pre-populated <form id="preregistration" action="/Homepage/Pre-Registration" method="post"> <input type="text" name="view" id="view" value="preprocess"/> <select name="regId" id="regId"> <option value="0">Select</option> <option value="1234">1234</option> <option value="4567">4567</option> </select> <input type="submit" name="submit" id="submit" value="Submit"/> </form> Model Attribute method @ModelAttribute("event") public Event createDefaultEvent(@RequestParam(required = false) Integer regId){ log.debug("regId: {}", regId); if (regId == null){ log.debug("make new event object"); return new Event(); } else { log.debug("retrieve event with id: {}", regId); return eventDao.get(regId); } } Request Mapping Method @RequestMapping(params = "view=preprocess") public String getPreProcessInformation(@ModelAttribute("event") Event event) throws Exception{ return "redirect:/preregistration.do?"+Page.EVENT.getView(); } Can anyone help me figure out why my regId is null in the @ModelAttruibute method when I submit my form? Thanks in advance!
modelattribute
null
null
null
null
null
open
@RequestParam is null when accessed in @ModelAttribute method === I am using am working on a project where users can choose to either start with a new form submission, or continue with a form submission that they had started previously. I'm using a the @ModelAttribute notation to generate new object for new form submissions. This much works great. Now I'm trying to get the information form the database to pre-fill inforomation in the object based on a given id and I've run into a snag. I'm trying to use @RequestParam to get the id that is passed in using a form submission but the id is comming back null. I can see that the id is being sent as part of the request string but it isn't making it to the @ModelAttribute method. Here is what I have so far. Form that is submitted to send regId so that form can be pre-populated <form id="preregistration" action="/Homepage/Pre-Registration" method="post"> <input type="text" name="view" id="view" value="preprocess"/> <select name="regId" id="regId"> <option value="0">Select</option> <option value="1234">1234</option> <option value="4567">4567</option> </select> <input type="submit" name="submit" id="submit" value="Submit"/> </form> Model Attribute method @ModelAttribute("event") public Event createDefaultEvent(@RequestParam(required = false) Integer regId){ log.debug("regId: {}", regId); if (regId == null){ log.debug("make new event object"); return new Event(); } else { log.debug("retrieve event with id: {}", regId); return eventDao.get(regId); } } Request Mapping Method @RequestMapping(params = "view=preprocess") public String getPreProcessInformation(@ModelAttribute("event") Event event) throws Exception{ return "redirect:/preregistration.do?"+Page.EVENT.getView(); } Can anyone help me figure out why my regId is null in the @ModelAttruibute method when I submit my form? Thanks in advance!
0
8,527,361
12/15/2011 22:13:36
1,100,869
12/15/2011 22:07:49
1
0
Chase Payment tech SDK throwing exception
My company uses Chase payment tech Orbital gateway to collect the credit card payments. We use .NET SDK provided by payment tech. The webservice which calls the .NET SDK intermittantly throws an errors Error in payment processingServer was unable to process request. ---> Internal Error at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) Until now we are not able to trace down the problem to resolve it. What could be the cause of the problem. Any prior expereince or advises appreciated.
c#
.net
request
payment
null
12/15/2011 23:43:55
not a real question
Chase Payment tech SDK throwing exception === My company uses Chase payment tech Orbital gateway to collect the credit card payments. We use .NET SDK provided by payment tech. The webservice which calls the .NET SDK intermittantly throws an errors Error in payment processingServer was unable to process request. ---> Internal Error at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) Until now we are not able to trace down the problem to resolve it. What could be the cause of the problem. Any prior expereince or advises appreciated.
1
11,687,054
07/27/2012 11:41:43
267,491
02/06/2010 00:15:02
1,330
48
Split access.log file by dates using command line tools
I have a Apache access.log file, which is around 35GB in size.. Grepping through it is not an option any more, without waiting a great deal. I wanted to split it in many small files, by using date as splitting criteria. Date is in format "[15/Oct/2011:12:02:02 +0000]". Any idea how could I do it using only bash scripting, standard text manipulation programs (grep, awk, sed, and likes), piping and redirection? Input file name is access.log. I'd like output files to have format such as access.apache.15_Oct_2011.log (that would do the trick, although not nice when sorting..)
bash
text
logfiles
null
null
null
open
Split access.log file by dates using command line tools === I have a Apache access.log file, which is around 35GB in size.. Grepping through it is not an option any more, without waiting a great deal. I wanted to split it in many small files, by using date as splitting criteria. Date is in format "[15/Oct/2011:12:02:02 +0000]". Any idea how could I do it using only bash scripting, standard text manipulation programs (grep, awk, sed, and likes), piping and redirection? Input file name is access.log. I'd like output files to have format such as access.apache.15_Oct_2011.log (that would do the trick, although not nice when sorting..)
0
5,208,924
03/06/2011 05:34:59
231,844
12/15/2009 05:40:33
209
6
C# Debug and Release .exe behaving differently because of Long?
After reading these questions: http://stackoverflow.com/questions/4787082/code-is-behaving-differently-in-release-vs-debug-mode http://stackoverflow.com/questions/2461319/c-inconsistent-math-operation-result-on-32-bit-and-64-bit http://stackoverflow.com/questions/566958/double-precision-problems-on-net http://stackoverflow.com/questions/2342396/why-does-this-floating-point-calculation-give-different-results-on-different-mach/2343351#2343351 I suspect that the reason my method for determining FPS which works while in Debug mode and no longer works in Release mode is because I'm using Long to hold time values. Here's the relevant code: public void ActualFPS() { if (Stopwatch.GetTimestamp() >= lastTicks + Stopwatch.Frequency) { actualFPS = runsThisSecond; lastTicks = Stopwatch.GetTimestamp(); runsThisSecond = 0; } } runsThisSecond is incremented by one every time the method I'm tracing is called. Granted this isn't an overly accurate way to determine FPS, but it works for what I need it to. lastTicks is a variable of type Long, and I believe that Stopwatch.GetTimestamp() is returned as a Long as well(?). Is this my problem? If so: any suggestions as to how to work around this?
c#
.net
compiler
null
null
03/07/2011 15:30:55
too localized
C# Debug and Release .exe behaving differently because of Long? === After reading these questions: http://stackoverflow.com/questions/4787082/code-is-behaving-differently-in-release-vs-debug-mode http://stackoverflow.com/questions/2461319/c-inconsistent-math-operation-result-on-32-bit-and-64-bit http://stackoverflow.com/questions/566958/double-precision-problems-on-net http://stackoverflow.com/questions/2342396/why-does-this-floating-point-calculation-give-different-results-on-different-mach/2343351#2343351 I suspect that the reason my method for determining FPS which works while in Debug mode and no longer works in Release mode is because I'm using Long to hold time values. Here's the relevant code: public void ActualFPS() { if (Stopwatch.GetTimestamp() >= lastTicks + Stopwatch.Frequency) { actualFPS = runsThisSecond; lastTicks = Stopwatch.GetTimestamp(); runsThisSecond = 0; } } runsThisSecond is incremented by one every time the method I'm tracing is called. Granted this isn't an overly accurate way to determine FPS, but it works for what I need it to. lastTicks is a variable of type Long, and I believe that Stopwatch.GetTimestamp() is returned as a Long as well(?). Is this my problem? If so: any suggestions as to how to work around this?
3
2,528,776
03/27/2010 09:42:23
139,412
07/16/2009 11:49:45
89
1
Windows/C++: Is it possible to find the line of code where exception was thrown having "Exception Offset"
One of our users having an Exception on our product startup. She has sent us the following error message from Windows: Problem Event Name: APPCRASH Application Name: program.exe Application Version: 1.0.0.1 Application Timestamp: 4ba62004 Fault Module Name: agcutils.dll Fault Module Version: 1.0.0.1 Fault Module Timestamp: 48dbd973 Exception Code: c0000005 Exception Offset: 000038d7 OS Version: 6.0.6002.2.2.0.768.2 Locale ID: 1033 Additional Information 1: 381d Additional Information 2: fdf78cd6110fd6ff90e9fff3d6ab377d Additional Information 3: b2df Additional Information 4: a3da65b92a4f9b2faa205d199b0aa9ef Is it possible to locate the exact place in the source code where the exception has occured having this information? What is the common technique for C++ programmers on Windows to locate the place of an error that has occured on user computer? Our project is compiled with Release configuration, PDB file is generated. I hope my question is not too naive.
windows
c++
exception
null
null
null
open
Windows/C++: Is it possible to find the line of code where exception was thrown having "Exception Offset" === One of our users having an Exception on our product startup. She has sent us the following error message from Windows: Problem Event Name: APPCRASH Application Name: program.exe Application Version: 1.0.0.1 Application Timestamp: 4ba62004 Fault Module Name: agcutils.dll Fault Module Version: 1.0.0.1 Fault Module Timestamp: 48dbd973 Exception Code: c0000005 Exception Offset: 000038d7 OS Version: 6.0.6002.2.2.0.768.2 Locale ID: 1033 Additional Information 1: 381d Additional Information 2: fdf78cd6110fd6ff90e9fff3d6ab377d Additional Information 3: b2df Additional Information 4: a3da65b92a4f9b2faa205d199b0aa9ef Is it possible to locate the exact place in the source code where the exception has occured having this information? What is the common technique for C++ programmers on Windows to locate the place of an error that has occured on user computer? Our project is compiled with Release configuration, PDB file is generated. I hope my question is not too naive.
0
3,710,763
09/14/2010 16:14:40
447,551
09/14/2010 16:14:40
1
0
XSLT variable not working---Urgent Please
I have below xsl code but it is not working, could anybody please guide me. <xsl:variable name="indent"> <xsl:if test="@type='Text'"> <xsl:if test="@required='yes'"> <xsl:variable name="indent" select="'return ValidateText(this)'" /> </xsl:if> <asp:TextBox id="{@id}" onkeypress="{$indent}" runat="server" /> </xsl:if> </xsl:variable> I need to assign return ValidateText(this) onkepress even if inside xml the required is yes. Thank You
xml
vb.net
xslt
null
null
null
open
XSLT variable not working---Urgent Please === I have below xsl code but it is not working, could anybody please guide me. <xsl:variable name="indent"> <xsl:if test="@type='Text'"> <xsl:if test="@required='yes'"> <xsl:variable name="indent" select="'return ValidateText(this)'" /> </xsl:if> <asp:TextBox id="{@id}" onkeypress="{$indent}" runat="server" /> </xsl:if> </xsl:variable> I need to assign return ValidateText(this) onkepress even if inside xml the required is yes. Thank You
0
9,556,678
03/04/2012 16:35:36
1,173,452
01/27/2012 12:26:46
80
4
iText Polish character
I need help with iText I look at some Google result and some here but don't find anything that work for me. I need to use polish character in my pdf but i got nothing for no. Here is a code that I think is important if need something else write in comment: private static Font bigFont = new Font(Font.FontFamily.HELVETICA, 18, Font.BOLD); another Paragraph par = new Paragraph(Łabadzak, bigFont); Can any1 tell me what to do to make that Ł visible in pdf and other polish character **UPDATE** I fund this but dunno how to use it for my project [Polish character in itext PDF][1] [1]: http://itext-general.2136553.n4.nabble.com/Polish-National-Characters-are-not-getting-displayed-in-the-PDF-created-by-iTExt-td2163833.html
java
swing
special-characters
itext
null
null
open
iText Polish character === I need help with iText I look at some Google result and some here but don't find anything that work for me. I need to use polish character in my pdf but i got nothing for no. Here is a code that I think is important if need something else write in comment: private static Font bigFont = new Font(Font.FontFamily.HELVETICA, 18, Font.BOLD); another Paragraph par = new Paragraph(Łabadzak, bigFont); Can any1 tell me what to do to make that Ł visible in pdf and other polish character **UPDATE** I fund this but dunno how to use it for my project [Polish character in itext PDF][1] [1]: http://itext-general.2136553.n4.nabble.com/Polish-National-Characters-are-not-getting-displayed-in-the-PDF-created-by-iTExt-td2163833.html
0
4,730,006
01/18/2011 22:55:13
559,142
12/31/2010 09:33:03
34
2
regular expression string search java
I know this can be done in many ways but im curious as to what the regex would be to pick out all strings not containing a particular substring, say GDA from strings like GADSA, GDSARTCC, , THGDAERY.
java
regex
null
null
null
null
open
regular expression string search java === I know this can be done in many ways but im curious as to what the regex would be to pick out all strings not containing a particular substring, say GDA from strings like GADSA, GDSARTCC, , THGDAERY.
0
629,377
03/10/2009 09:04:06
17,329
09/18/2008 06:50:26
6
0
Regex word boundary for multi-byte strings
I am using posix c regex library(regcomp/regexec) on my search application. My application supports different languages including those that uses multi-byte characters. I'm encountering a problem when using word boundary metacharacter (\b). For single-byte strings, it works just fine, e.g: "\\bpaper\\b" matches "paper" However, if the regex and query strings are multi-byte, it doesn't seem to work correctly, e.g: "\\b紙張\\b" doesn't match "紙張" Am I missing something? Any help would be highly appreciated. Thanks.
regex
null
null
null
null
null
open
Regex word boundary for multi-byte strings === I am using posix c regex library(regcomp/regexec) on my search application. My application supports different languages including those that uses multi-byte characters. I'm encountering a problem when using word boundary metacharacter (\b). For single-byte strings, it works just fine, e.g: "\\bpaper\\b" matches "paper" However, if the regex and query strings are multi-byte, it doesn't seem to work correctly, e.g: "\\b紙張\\b" doesn't match "紙張" Am I missing something? Any help would be highly appreciated. Thanks.
0
10,711,051
05/22/2012 22:27:30
315,168
04/13/2010 06:18:48
6,641
290
Trailing whitespace elimination script for multiple files
Are there any tools / UNIX single liners which would remove trailing whitespaces for multiple files **in-place**. E.g. one that could be used in the conjunction with *find*.
shell
find
newline
whitespace
removing-whitespace
null
open
Trailing whitespace elimination script for multiple files === Are there any tools / UNIX single liners which would remove trailing whitespaces for multiple files **in-place**. E.g. one that could be used in the conjunction with *find*.
0
10,837,439
05/31/2012 16:18:10
1,384,991
05/09/2012 15:15:52
50
1
Observer vs. Registering callbacks
What are the pros and cons of using Observer versus just registering callbacks like: worker.setOnJobIsDone(func);
java
android
design-patterns
null
null
06/02/2012 03:29:04
not constructive
Observer vs. Registering callbacks === What are the pros and cons of using Observer versus just registering callbacks like: worker.setOnJobIsDone(func);
4
10,519,738
05/09/2012 15:59:44
784,668
06/05/2011 11:11:21
1,523
33
Source line length limit
What's the maximum length of a source line *all* compilers are *required to* accept? Did it change in C++11? If so, what was the old value? I'm asking this question because I'm doing some heavy preprocessor voodoo (unfortunately, templates won't cut it), and doing so has a tendency to make the lines big very quickly. I want to stay on the safe side, so I won't have to worry about the possibility of compiler X on platform Y rejecting my code because of too long lines.
c++
c++11
standards
null
null
null
open
Source line length limit === What's the maximum length of a source line *all* compilers are *required to* accept? Did it change in C++11? If so, what was the old value? I'm asking this question because I'm doing some heavy preprocessor voodoo (unfortunately, templates won't cut it), and doing so has a tendency to make the lines big very quickly. I want to stay on the safe side, so I won't have to worry about the possibility of compiler X on platform Y rejecting my code because of too long lines.
0
6,651,467
07/11/2011 14:16:07
703,595
04/12/2011 07:52:33
243
35
iOS fails to upload a local wav file to my server.
I'm making an app with which the user can record sound and send it to my server. The first part works perfectly. I can record and play the sound. The problem is however that when i try to upload the wav file that is the result of this recording to my server it will not accept any thing that is longer than 2 minutes and a couple of seconds (about 2 MB) smaller files are sent and handled correctly. Any bigger than that results in sending the request but not attaching the file, or attaching the file but the server can't read it. The first would seem more likely to me. My Objective-c code is as follows: **OBJECTIVE-C CODE** NSString *theUrl = @"http://www.myserver.nl"; ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:theUrl]]; [request setFile:[soundFileURL path] forKey:@"mainfile"]; //The file gets added [request startSynchronous]; //Request is being sent. Any thoughts or solutions would be greatly appreciated!
php
objective-c
file-transfer
asiformdatarequest
null
null
open
iOS fails to upload a local wav file to my server. === I'm making an app with which the user can record sound and send it to my server. The first part works perfectly. I can record and play the sound. The problem is however that when i try to upload the wav file that is the result of this recording to my server it will not accept any thing that is longer than 2 minutes and a couple of seconds (about 2 MB) smaller files are sent and handled correctly. Any bigger than that results in sending the request but not attaching the file, or attaching the file but the server can't read it. The first would seem more likely to me. My Objective-c code is as follows: **OBJECTIVE-C CODE** NSString *theUrl = @"http://www.myserver.nl"; ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:theUrl]]; [request setFile:[soundFileURL path] forKey:@"mainfile"]; //The file gets added [request startSynchronous]; //Request is being sent. Any thoughts or solutions would be greatly appreciated!
0
11,253,156
06/28/2012 21:26:57
1,458,808
06/15/2012 13:31:40
1
0
OS X app patching and codesign issues
On Snow Leopard, after making a single byte modification to the binary of an app (downloaded from app stored) the application fails to launch; crashing with exception "Code Signature Invalid". I created a self-signed certificate "My Certificate" (I don't have a dev license) and called <code>sudo codesign -f -s "My Certificate" The\ App.app/</code> Which seemed to complete happily, but the app still fails to open (this time without crashing, instead, it just quietly leaves "Unsigned app" in the console). calling <code>codesign -vv The\ App.app/</code> returns <code>valid on disk, satisfies its Designated Requirement</code> So as far as I can tell the app is correctly signed but I'm at the fringes of my knowledge. Many Thanks!
osx-snow-leopard
code-signing
binaryfiles
patching
null
07/01/2012 14:30:51
too localized
OS X app patching and codesign issues === On Snow Leopard, after making a single byte modification to the binary of an app (downloaded from app stored) the application fails to launch; crashing with exception "Code Signature Invalid". I created a self-signed certificate "My Certificate" (I don't have a dev license) and called <code>sudo codesign -f -s "My Certificate" The\ App.app/</code> Which seemed to complete happily, but the app still fails to open (this time without crashing, instead, it just quietly leaves "Unsigned app" in the console). calling <code>codesign -vv The\ App.app/</code> returns <code>valid on disk, satisfies its Designated Requirement</code> So as far as I can tell the app is correctly signed but I'm at the fringes of my knowledge. Many Thanks!
3
9,218,415
02/09/2012 20:39:56
559,396
12/31/2010 17:46:19
11
0
Programatically mount SkyDrive Share given username and password
Is there a way to programaticallymount SkyDrive Share given the users credential?
skydrive
null
null
null
null
null
open
Programatically mount SkyDrive Share given username and password === Is there a way to programaticallymount SkyDrive Share given the users credential?
0
11,172,122
06/23/2012 18:54:27
1,477,162
06/23/2012 17:55:54
1
0
java converting "paramitized" .xml screen file to an ingestable .xml format
Heading ##Converting "parasitized" .xml screen file to an ingestible .xml format Am getting back in the driver’s seat on java and xml; the environment is JDK 1.6 and need to do the following: 1. Read in .xml screen dumps in the format something like: #<?xml version="1.0" encoding="UTF-8"?> #<d: param = “root _tags” type = “string” value ="test Value"> # <d: param = “child1 tag” type = “string” value = “data 2” > # </d: param > # <d: param = “child2 tag” type = “string” value = “data 2” > # </d: param > #</d: param> 2. Convert the param(s) to actual tabs in interCap format: #<?xml version="1.0" encoding="UTF-8"?> #<rootTag type “string” value ="test Value"> # <child1Tag type = “string” value = “data 2” > </child1Tag > # <child2Tag type = “string” value = “data 2” > </child1Tag> #</rootTag > 3. Write to file the new tags and types to a file for a data dictionary: rootTag string child1Tag string child2Tag string 4. Remove the types and write out a new .xml so I can bring them into my database in this format: #<?xml version="1.0" encoding="UTF-8"?> #< rootTag>test Value # <child1Tag data 1 > </child1Tag> # <child2Tag data 2 > </child2Tag> #</rootTag > #I am rusty on java and very rusty on xml parsing (2004) and am under the gun; Thanks Everyone, CPR
java
xml
dom
null
null
null
open
java converting "paramitized" .xml screen file to an ingestable .xml format === Heading ##Converting "parasitized" .xml screen file to an ingestible .xml format Am getting back in the driver’s seat on java and xml; the environment is JDK 1.6 and need to do the following: 1. Read in .xml screen dumps in the format something like: #<?xml version="1.0" encoding="UTF-8"?> #<d: param = “root _tags” type = “string” value ="test Value"> # <d: param = “child1 tag” type = “string” value = “data 2” > # </d: param > # <d: param = “child2 tag” type = “string” value = “data 2” > # </d: param > #</d: param> 2. Convert the param(s) to actual tabs in interCap format: #<?xml version="1.0" encoding="UTF-8"?> #<rootTag type “string” value ="test Value"> # <child1Tag type = “string” value = “data 2” > </child1Tag > # <child2Tag type = “string” value = “data 2” > </child1Tag> #</rootTag > 3. Write to file the new tags and types to a file for a data dictionary: rootTag string child1Tag string child2Tag string 4. Remove the types and write out a new .xml so I can bring them into my database in this format: #<?xml version="1.0" encoding="UTF-8"?> #< rootTag>test Value # <child1Tag data 1 > </child1Tag> # <child2Tag data 2 > </child2Tag> #</rootTag > #I am rusty on java and very rusty on xml parsing (2004) and am under the gun; Thanks Everyone, CPR
0
8,629,638
12/25/2011 12:40:44
1,030,287
11/04/2011 19:03:01
130
1
Matlab - how do I know whether a variable name is free to use
In matlab say you do: E = cell(3,1); How do I know whether E isn't used already and the call above doesn't override it? Do I have to run the program and break at that point? Is there a method that the interpreter can do this for me (in C++ the compiler will tell you if you try to use an existing name).
matlab
null
null
null
null
null
open
Matlab - how do I know whether a variable name is free to use === In matlab say you do: E = cell(3,1); How do I know whether E isn't used already and the call above doesn't override it? Do I have to run the program and break at that point? Is there a method that the interpreter can do this for me (in C++ the compiler will tell you if you try to use an existing name).
0
5,896,122
05/05/2011 10:21:04
619,635
02/16/2011 12:33:52
6
0
Find out user and domain details of logged in user on Mac
I have a user who is logged in on Mac using domain credentials. How will i find out the currently logged in user name, user's domain, active directory details, ldap server?
osx
login
active-directory
domain
null
05/06/2011 20:16:26
off topic
Find out user and domain details of logged in user on Mac === I have a user who is logged in on Mac using domain credentials. How will i find out the currently logged in user name, user's domain, active directory details, ldap server?
2
2,561,712
04/01/2010 15:51:44
256,793
01/22/2010 14:24:27
433
38
Will Distributed Version Control Systems survive?
I am personally a SVN lover, but am starting to fall prey to the buzz that is surrounding DVCS. SVN is free, and time tested, is DVCS the new SVN? I am also looking for which DVCS server will win out GIT or Mercurial?
version-control
svn
dvcs
null
null
04/03/2010 06:04:59
not constructive
Will Distributed Version Control Systems survive? === I am personally a SVN lover, but am starting to fall prey to the buzz that is surrounding DVCS. SVN is free, and time tested, is DVCS the new SVN? I am also looking for which DVCS server will win out GIT or Mercurial?
4
4,205,832
11/17/2010 15:15:37
488,500
10/27/2010 08:00:52
1
0
multi JSONarray Problem
i got this JSONArray but i cant figure out how to put it in a listview. i figured out the ArrayAdapter but is doesnt give me the right result [{"id":"1","name":"Joris","sex":"1","birthyear":"1987"},{"id":"2","name":"bjorn","sex":"1","birthyear":"1987"},{"id":"3","name":"Mel","sex":"0","birthyear":"1992"},{"id":"4","name":"Peter","sex":"1","birthyear":"1955"},{"id":"5","name":"Geer","sex":"1","birthyear":"1979"}] this is my result on the phone in a list after using ArrayAdapter. <br> Can somebody help me?<br> {"id":"1","name":"Joris","sex":"1","birthyear":"1987"}<br> {"id":"2","name":"bjorn","sex":"1","birthyear":"1987"}<br> {"id":"3","name":"Mel","sex":"0","birthyear":"1992"}<br> {"id":"4","name":"Peter","sex":"1","birthyear":"1955"}<br> {"id":"5","name":"Geer","sex":"1","birthyear":"1979"} [1]: http://i.stack.imgur.com/xnYtO.jpg
java
android
json
null
null
null
open
multi JSONarray Problem === i got this JSONArray but i cant figure out how to put it in a listview. i figured out the ArrayAdapter but is doesnt give me the right result [{"id":"1","name":"Joris","sex":"1","birthyear":"1987"},{"id":"2","name":"bjorn","sex":"1","birthyear":"1987"},{"id":"3","name":"Mel","sex":"0","birthyear":"1992"},{"id":"4","name":"Peter","sex":"1","birthyear":"1955"},{"id":"5","name":"Geer","sex":"1","birthyear":"1979"}] this is my result on the phone in a list after using ArrayAdapter. <br> Can somebody help me?<br> {"id":"1","name":"Joris","sex":"1","birthyear":"1987"}<br> {"id":"2","name":"bjorn","sex":"1","birthyear":"1987"}<br> {"id":"3","name":"Mel","sex":"0","birthyear":"1992"}<br> {"id":"4","name":"Peter","sex":"1","birthyear":"1955"}<br> {"id":"5","name":"Geer","sex":"1","birthyear":"1979"} [1]: http://i.stack.imgur.com/xnYtO.jpg
0
10,785,700
05/28/2012 13:46:11
377,192
06/27/2010 00:09:21
77
5
symfony2: KnpPaginatorBundle missbehaviour
I have a weird problem for list action: An exception has been thrown during the rendering of a template ("Notice: Array to string conversion ....22961.php line 26 ) in KnpPaginatorBundle:Pagination:sortable_link.html.twig at line 20. And this worked before. Template is as it was before: <th>{{ pager.sortable('Id', 'o.id')|raw }}</th> and {{ pager.render()|raw }} But if I remove sortable section, the page works perfectly fine. Doesn anyone have any ideas how to solve this?
symfony-2.0
null
null
null
null
null
open
symfony2: KnpPaginatorBundle missbehaviour === I have a weird problem for list action: An exception has been thrown during the rendering of a template ("Notice: Array to string conversion ....22961.php line 26 ) in KnpPaginatorBundle:Pagination:sortable_link.html.twig at line 20. And this worked before. Template is as it was before: <th>{{ pager.sortable('Id', 'o.id')|raw }}</th> and {{ pager.render()|raw }} But if I remove sortable section, the page works perfectly fine. Doesn anyone have any ideas how to solve this?
0
3,080,774
06/20/2010 20:06:51
371,681
06/20/2010 20:06:51
1
0
get all the ips that are viewing my web page
What's the best way of getting all ip's that are curently viewing my web page and show them like a list (on another page) and update when a client is leaving or entering on my page ? And this using html ,php, javascrip , mysql , and stuff like this.
php
javascript
mysql
html
website
06/21/2010 08:09:26
not a real question
get all the ips that are viewing my web page === What's the best way of getting all ip's that are curently viewing my web page and show them like a list (on another page) and update when a client is leaving or entering on my page ? And this using html ,php, javascrip , mysql , and stuff like this.
1
6,659,218
07/12/2011 03:32:32
667,142
03/19/2011 08:47:27
8
0
How to make PanelDragDropTarget act only as a target and not as a source?
I created a new solution. I added a link to System.Windows.Controls.Toolkit to my Silverlight project and wrote this code: XAML: <UserControl x:Class="SilverlightApplication4.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400"> <Grid x:Name="LayoutRoot" Background="White"> <Grid> <toolkit:PanelDragDropTarget Margin="0,0,150,150" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" AllowedSourceEffects="Copy"> <Grid Name="grid1" Background="Blue"> <Rectangle Height="40" HorizontalAlignment="Left" Margin="5,5,0,0" Name="rectangle1" Stroke="Black" StrokeThickness="1" VerticalAlignment="Top" Width="80" Fill="Red" /> </Grid> </toolkit:PanelDragDropTarget> <toolkit:PanelDragDropTarget VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" Margin="150,150,0,0" AllowDrop="True" Drop="PanelDragDropTarget_Drop" AllowedSourceEffects="None"> <Grid Name="grid2" Background="Green" /> </toolkit:PanelDragDropTarget> </Grid> </Grid> </UserControl> C#: using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Shapes; namespace SilverlightApplication4 { public partial class MainPage : UserControl { public MainPage() { InitializeComponent(); } private void PanelDragDropTarget_Drop(object sender, Microsoft.Windows.DragEventArgs e) { Rectangle myRectangle = new Rectangle() { Margin = new Thickness(5,5,0,0), Height = 40, Width = 80, HorizontalAlignment = System.Windows.HorizontalAlignment.Left, VerticalAlignment = System.Windows.VerticalAlignment.Top, StrokeThickness = 1, Stroke = new SolidColorBrush(Colors.Black), Fill = new SolidColorBrush(Colors.Red)}; grid2.Children.Add(myRectangle); } } } Now when I drag and drop the small red rectangle from grid1 onto grid2 everything works fine. But when I touch the new added rectangle in grid2 it shows visible signs that it can be dragged. My question is how to make a second PanelDragDropTarget (with grid2 inside) to act only as a target for drag and drop and not as a source? I mean how to block the possibility for a user to drag the new created rectangle in grid2?
silverlight
drag-and-drop
panel
null
null
null
open
How to make PanelDragDropTarget act only as a target and not as a source? === I created a new solution. I added a link to System.Windows.Controls.Toolkit to my Silverlight project and wrote this code: XAML: <UserControl x:Class="SilverlightApplication4.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400"> <Grid x:Name="LayoutRoot" Background="White"> <Grid> <toolkit:PanelDragDropTarget Margin="0,0,150,150" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" AllowedSourceEffects="Copy"> <Grid Name="grid1" Background="Blue"> <Rectangle Height="40" HorizontalAlignment="Left" Margin="5,5,0,0" Name="rectangle1" Stroke="Black" StrokeThickness="1" VerticalAlignment="Top" Width="80" Fill="Red" /> </Grid> </toolkit:PanelDragDropTarget> <toolkit:PanelDragDropTarget VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" Margin="150,150,0,0" AllowDrop="True" Drop="PanelDragDropTarget_Drop" AllowedSourceEffects="None"> <Grid Name="grid2" Background="Green" /> </toolkit:PanelDragDropTarget> </Grid> </Grid> </UserControl> C#: using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Shapes; namespace SilverlightApplication4 { public partial class MainPage : UserControl { public MainPage() { InitializeComponent(); } private void PanelDragDropTarget_Drop(object sender, Microsoft.Windows.DragEventArgs e) { Rectangle myRectangle = new Rectangle() { Margin = new Thickness(5,5,0,0), Height = 40, Width = 80, HorizontalAlignment = System.Windows.HorizontalAlignment.Left, VerticalAlignment = System.Windows.VerticalAlignment.Top, StrokeThickness = 1, Stroke = new SolidColorBrush(Colors.Black), Fill = new SolidColorBrush(Colors.Red)}; grid2.Children.Add(myRectangle); } } } Now when I drag and drop the small red rectangle from grid1 onto grid2 everything works fine. But when I touch the new added rectangle in grid2 it shows visible signs that it can be dragged. My question is how to make a second PanelDragDropTarget (with grid2 inside) to act only as a target for drag and drop and not as a source? I mean how to block the possibility for a user to drag the new created rectangle in grid2?
0
5,160,598
03/01/2011 21:29:35
36,026
11/09/2008 23:37:30
719
29
Python vs .NET vs Rails (Middleware)
I'm starting one new project, and I need to choose the best technology to maintain one Middleware Layer. This layer will offer REST and SOAP Webservices to several devices (mobile and web) I need Speed! I need easy setup and scalability Regards,<br> Pedro
.net
python
ruby-on-rails
scalability
middleware
03/01/2011 21:53:53
not a real question
Python vs .NET vs Rails (Middleware) === I'm starting one new project, and I need to choose the best technology to maintain one Middleware Layer. This layer will offer REST and SOAP Webservices to several devices (mobile and web) I need Speed! I need easy setup and scalability Regards,<br> Pedro
1
2,396,770
03/07/2010 15:30:35
139,459
07/16/2009 12:52:49
11,524
1,104
JQuery Image Gallery
I have made a image gallery with jquery found here: http://sarfraznawaz2005.kodingen.com/demos/jquery/image_gallery/ I just wanted to know how to i add functionality to prev and next arrow images to show next and previous images with jquery. Thanks
jquery
javascript
html
css
null
05/20/2012 22:44:31
too localized
JQuery Image Gallery === I have made a image gallery with jquery found here: http://sarfraznawaz2005.kodingen.com/demos/jquery/image_gallery/ I just wanted to know how to i add functionality to prev and next arrow images to show next and previous images with jquery. Thanks
3
10,650,076
05/18/2012 09:30:30
1,395,284
05/15/2012 05:30:48
240
17
JSon responce order change after JSONObject jsonObject = new JSONObject(json_source);
my String json_source= { "search": [ { "IDCaseNumber": "C03215", "Category": "", "SSN": "", "FirstName": "WARREN", "LastName": "CAMARDA", "MiddleName": "W", "Generation": "MALE", "DOB": "", "BirthState": "", "AKA1": "WAREN CAMARDA", "AKA2": "", "DOBAKA": "", "Address1": "", "Address2": "", "City": "", "State": "", "Zip": "", "Age": "", "Hair": "BLACK", "Eye": "BROWN", "Height": "5'07''", "Weight": "170 lbs.", "Race": "WHITE", "ScarsMarks": "", "Sex": "MALE", "SkinTone": "", "MilitaryService": "", "ChargesFiledDate": "", "OffenseDate": "", "OffenseCode": "", "NCICCode": "", "OffenseDesc1": "", "OffenseDesc2": "", "Counts": "", "Plea": "", "ConvictionDate": "", "ConvictionPlace": "", "SentenceYYYMMDDD": "", "ProbationYYYMMDDD": "", "Court": "", "Source": "", "Disposition": "", "DispositionDate": "", "CourtCosts": "", "ArrestingAgency": "", "caseType": "", "Fines": "", "sourceState": "FL", "sourceName": "FLDOC", "PhotoName": "", "@id": "598313255" } ] } but JSONObject jsonObject = new JSONObject(json_source); Log.e("",""+jsonObject); { "search": [ { "caseType": "", "PhotoName": "", "ArrestingAgency": "", "Eye": "BROWN", "ProbationYYYMMDDD": "", "DOB": "", "OffenseDate": "", "LastName": "CAMARDA", "DOBAKA": "", "BirthState": "", "Fines": "", "Weight": "170 lbs.", "Address2": "", "Address1": "", "sourceState": "FL", "NCICCode": "", "Sex": "MALE", "CourtCosts": "", "ConvictionPlace": "", "Race": "WHITE", "Height": "5'07''", "Disposition": "", "Hair": "BLACK", "Source": "", "OffenseCode": "", "MilitaryService": "", "Plea": "", "OffenseDesc1": "", "OffenseDesc2": "", "Age": "", "AKA1": "WAREN CAMARDA", "AKA2": "", "SkinTone": "", "sourceName": "FLDOC", "FirstName": "WARREN", "Zip": "", "Court": "", "ChargesFiledDate": "", "SSN": "", "DispositionDate": "", "Generation": "MALE", "IDCaseNumber": "C03215", "City": "", "SentenceYYYMMDDD": "", "ConvictionDate": "", "Category": "", "MiddleName": "W", "State": "", "ScarsMarks": "", "@id": "598313255", "Counts": "" } ] }
android
json
parsing
null
null
05/18/2012 15:05:23
not a real question
JSon responce order change after JSONObject jsonObject = new JSONObject(json_source); === my String json_source= { "search": [ { "IDCaseNumber": "C03215", "Category": "", "SSN": "", "FirstName": "WARREN", "LastName": "CAMARDA", "MiddleName": "W", "Generation": "MALE", "DOB": "", "BirthState": "", "AKA1": "WAREN CAMARDA", "AKA2": "", "DOBAKA": "", "Address1": "", "Address2": "", "City": "", "State": "", "Zip": "", "Age": "", "Hair": "BLACK", "Eye": "BROWN", "Height": "5'07''", "Weight": "170 lbs.", "Race": "WHITE", "ScarsMarks": "", "Sex": "MALE", "SkinTone": "", "MilitaryService": "", "ChargesFiledDate": "", "OffenseDate": "", "OffenseCode": "", "NCICCode": "", "OffenseDesc1": "", "OffenseDesc2": "", "Counts": "", "Plea": "", "ConvictionDate": "", "ConvictionPlace": "", "SentenceYYYMMDDD": "", "ProbationYYYMMDDD": "", "Court": "", "Source": "", "Disposition": "", "DispositionDate": "", "CourtCosts": "", "ArrestingAgency": "", "caseType": "", "Fines": "", "sourceState": "FL", "sourceName": "FLDOC", "PhotoName": "", "@id": "598313255" } ] } but JSONObject jsonObject = new JSONObject(json_source); Log.e("",""+jsonObject); { "search": [ { "caseType": "", "PhotoName": "", "ArrestingAgency": "", "Eye": "BROWN", "ProbationYYYMMDDD": "", "DOB": "", "OffenseDate": "", "LastName": "CAMARDA", "DOBAKA": "", "BirthState": "", "Fines": "", "Weight": "170 lbs.", "Address2": "", "Address1": "", "sourceState": "FL", "NCICCode": "", "Sex": "MALE", "CourtCosts": "", "ConvictionPlace": "", "Race": "WHITE", "Height": "5'07''", "Disposition": "", "Hair": "BLACK", "Source": "", "OffenseCode": "", "MilitaryService": "", "Plea": "", "OffenseDesc1": "", "OffenseDesc2": "", "Age": "", "AKA1": "WAREN CAMARDA", "AKA2": "", "SkinTone": "", "sourceName": "FLDOC", "FirstName": "WARREN", "Zip": "", "Court": "", "ChargesFiledDate": "", "SSN": "", "DispositionDate": "", "Generation": "MALE", "IDCaseNumber": "C03215", "City": "", "SentenceYYYMMDDD": "", "ConvictionDate": "", "Category": "", "MiddleName": "W", "State": "", "ScarsMarks": "", "@id": "598313255", "Counts": "" } ] }
1
4,886,609
02/03/2011 13:19:33
418,518
08/12/2010 14:31:21
1
1
Glassfish, JRuby, Rails 3 throws rake error
I am currently using: - Ubuntu 10.04LTS - Netbeans 6.9.1 (with embedded JRuby 1.5.1) - JDK6u17 - GlassFish Gem 1.0.2 I am using a old JDK because of this bug: http://jira.codehaus.org/browse/JRUBY-4785 I have partially completed application, but i want migrate to rails 3(currently application is in rails 2.3.8). So i go to: `$HOME/netbeans-6.9.1/ruby/jruby-1.5.1/bin` and type: `jruby gem install rails -v=3.0.3`. Everything is OK. Then i create a sample RoR project and use some simple scaffold. Works. But when i choose in Netbeans `rake db:migrate` it shows me message: `"db:migrate" taks does not exist`. **Any idea how to fix that?** I would be grateful for the help.
ruby-on-rails
netbeans
glassfish
rake
jruby
null
open
Glassfish, JRuby, Rails 3 throws rake error === I am currently using: - Ubuntu 10.04LTS - Netbeans 6.9.1 (with embedded JRuby 1.5.1) - JDK6u17 - GlassFish Gem 1.0.2 I am using a old JDK because of this bug: http://jira.codehaus.org/browse/JRUBY-4785 I have partially completed application, but i want migrate to rails 3(currently application is in rails 2.3.8). So i go to: `$HOME/netbeans-6.9.1/ruby/jruby-1.5.1/bin` and type: `jruby gem install rails -v=3.0.3`. Everything is OK. Then i create a sample RoR project and use some simple scaffold. Works. But when i choose in Netbeans `rake db:migrate` it shows me message: `"db:migrate" taks does not exist`. **Any idea how to fix that?** I would be grateful for the help.
0
4,720,140
01/18/2011 03:07:54
332,019
05/04/2010 04:55:02
1,120
88
Using new Layout Handle globally, defined in Mage_Page, of Magento
I am mentioning what all I have done so far in one of my projects using Magento version 1.4.2, but PLEASE correct me if any of my process seems wrong. I will be more than grateful to you all. I have got some very different look for my product page, so much so that it may not be wise to use the default available page layout handles. So I thought of using another layout handle "`page_product_list`" than the available ones (like "`page_two_columns_left`", "`page_two_columns_right`"). For using it, I defined a block of XML in the file "`config.xml`" (located in the folder "`/app/code/local/Mage/Page/etc/`"), just like the other layout handle blocks. So now what I want is to load this layout handle instead of the "`page_two_columns_left`" & "`default`" layout handles, whenever any user tries to see the details page of any Category. But it's not working. Can somebody please guide me as to what can be done in order to achieve this properly in Magento way?
php
layout
magento
handle
magento-1.4
null
open
Using new Layout Handle globally, defined in Mage_Page, of Magento === I am mentioning what all I have done so far in one of my projects using Magento version 1.4.2, but PLEASE correct me if any of my process seems wrong. I will be more than grateful to you all. I have got some very different look for my product page, so much so that it may not be wise to use the default available page layout handles. So I thought of using another layout handle "`page_product_list`" than the available ones (like "`page_two_columns_left`", "`page_two_columns_right`"). For using it, I defined a block of XML in the file "`config.xml`" (located in the folder "`/app/code/local/Mage/Page/etc/`"), just like the other layout handle blocks. So now what I want is to load this layout handle instead of the "`page_two_columns_left`" & "`default`" layout handles, whenever any user tries to see the details page of any Category. But it's not working. Can somebody please guide me as to what can be done in order to achieve this properly in Magento way?
0
10,859,136
06/02/2012 01:30:23
431,876
08/26/2010 13:24:16
380
10
targeting the element from where event is generated
I have a custom event trigger on adding an item .... Add item to shopping cart : var order = function (){ $(document).trigger('customEvent'); ........... ........ }; now I have a structure where price of the item is listed and when adding that item in cart I have to grab the price from dom . But issue is if i listen to customEvent it will target the document instead of where event is triggered. So is there a way to target that element ? event.target || event.srcElement || event.originalTarget || $(event.target) all point to document not the element .
javascript
jquery
events
null
null
null
open
targeting the element from where event is generated === I have a custom event trigger on adding an item .... Add item to shopping cart : var order = function (){ $(document).trigger('customEvent'); ........... ........ }; now I have a structure where price of the item is listed and when adding that item in cart I have to grab the price from dom . But issue is if i listen to customEvent it will target the document instead of where event is triggered. So is there a way to target that element ? event.target || event.srcElement || event.originalTarget || $(event.target) all point to document not the element .
0
11,174,259
06/24/2012 01:05:59
1,469,901
06/20/2012 16:28:13
1
0
WPF Capture Video and play in Background
I'm looking for a way to capture and display a videostream, from a locally attached camera, in the background of my application (behind the other controls). While I've found some ways to accomplish this (e.g. WPFMediaKit), I haven't found a way to set the codec for decoding the stream (when I use the VideoCaptureElement for example, the element either stays black/shows nothing or lags in performance - it works when the right codec is used). Thus I'm looking for a lib/way to solve this problem. Thanks
c#
wpf
null
null
null
06/24/2012 04:56:03
not a real question
WPF Capture Video and play in Background === I'm looking for a way to capture and display a videostream, from a locally attached camera, in the background of my application (behind the other controls). While I've found some ways to accomplish this (e.g. WPFMediaKit), I haven't found a way to set the codec for decoding the stream (when I use the VideoCaptureElement for example, the element either stays black/shows nothing or lags in performance - it works when the right codec is used). Thus I'm looking for a lib/way to solve this problem. Thanks
1
175,969
10/06/2008 20:07:02
1,659
08/17/2008 20:20:20
5,463
323
Which PHP-based CMS or framework has the best documentation?
I'm part of a group that's conisdering a PHP-based system to serve a community for communications purposes, including collaboration, event calendars, and a photo gallery. We're also loking into social networking integration (particularly Facebook) and maybe payment processing for community events. The two main CMSs we're considering are Wordpress and Joomla. We're also thinking of building on top of Symfony or Zend. **Which PHP-based system has the best documentation so that those of us with limited knowledge of the frameworks can ramp up easily?**.
joomla
wordpress
php
symfony
zend
10/02/2011 00:37:29
not constructive
Which PHP-based CMS or framework has the best documentation? === I'm part of a group that's conisdering a PHP-based system to serve a community for communications purposes, including collaboration, event calendars, and a photo gallery. We're also loking into social networking integration (particularly Facebook) and maybe payment processing for community events. The two main CMSs we're considering are Wordpress and Joomla. We're also thinking of building on top of Symfony or Zend. **Which PHP-based system has the best documentation so that those of us with limited knowledge of the frameworks can ramp up easily?**.
4
8,159,486
11/16/2011 22:13:50
1,027,169
11/03/2011 07:49:01
16
0
Is Java is an "island" for developing new apps and libraries?
I will be making a cross-platform, graphical mathematical modeling application, for example, a user can drop a bunch of nodes on a canvas, specify some mathematical relationships between them, and run a simulation. I'm also interested in seeing in this being a web app. I have had some programming experience in Java, MATLAB, Python, but I have never made a large application, thus I know very little about software architecture, and how multiple languages work together. I am trying to figure out the best IDE, language(s), etc., to work in. The previous work done by my group has a lot of C/C++ libraries to draw from for back-end work, like simulation. I was told by my boss that Java is an "island" for development, meaning the Java app has difficulty using libraries from other languages and making its own libraries usable to other languages. Is this true? Can someone shed some light on this topic? Also, then **what tools should I be using**? I am ready to learn anything, but I'm trying to go for what would be the **most productive** route. Learning and then programming everything in C/C++ does not seem like a very productive route to me currently. Things I've looked at so far include WindowBuilder/GWT Designer (this seems like a way to make both desktop and web apps), Mono/GTK+/MonoDevelop, and Delphi Please feel free to be as verbose as you can, thanks!
java
web-applications
application
mono
windowbuilder
11/16/2011 23:11:27
not constructive
Is Java is an "island" for developing new apps and libraries? === I will be making a cross-platform, graphical mathematical modeling application, for example, a user can drop a bunch of nodes on a canvas, specify some mathematical relationships between them, and run a simulation. I'm also interested in seeing in this being a web app. I have had some programming experience in Java, MATLAB, Python, but I have never made a large application, thus I know very little about software architecture, and how multiple languages work together. I am trying to figure out the best IDE, language(s), etc., to work in. The previous work done by my group has a lot of C/C++ libraries to draw from for back-end work, like simulation. I was told by my boss that Java is an "island" for development, meaning the Java app has difficulty using libraries from other languages and making its own libraries usable to other languages. Is this true? Can someone shed some light on this topic? Also, then **what tools should I be using**? I am ready to learn anything, but I'm trying to go for what would be the **most productive** route. Learning and then programming everything in C/C++ does not seem like a very productive route to me currently. Things I've looked at so far include WindowBuilder/GWT Designer (this seems like a way to make both desktop and web apps), Mono/GTK+/MonoDevelop, and Delphi Please feel free to be as verbose as you can, thanks!
4
7,064,429
08/15/2011 11:31:24
894,838
08/15/2011 11:31:24
1
0
How to refer to all IP's using an IP Range e.g. XX.XX.XX.XX / 24
As the title suggests - How to refer to all IP's using an IP Range e.g. XX.XX.XX.XX / 24?
networking
ip
null
null
null
08/15/2011 11:34:53
off topic
How to refer to all IP's using an IP Range e.g. XX.XX.XX.XX / 24 === As the title suggests - How to refer to all IP's using an IP Range e.g. XX.XX.XX.XX / 24?
2
6,645,389
07/11/2011 03:06:03
596,634
01/31/2011 09:46:18
-2
3
Suggest Free MYSQL SP Generator
Suggest a good Stored procedure generator that generates good secure code and is available for free ?
mysql
generator
procedure
null
null
07/11/2011 03:46:08
not a real question
Suggest Free MYSQL SP Generator === Suggest a good Stored procedure generator that generates good secure code and is available for free ?
1
10,740,705
05/24/2012 15:35:36
766,010
05/23/2011 12:39:14
149
7
Using Url.Content() when sending an html email with images
I need my app to send a confirmation email to a user. I have used the following method to render the view as a string: public string RenderViewToString<T>(string viewPath, T model) { using (var writer = new StringWriter()) { var view = new WebFormView(viewPath); var vdd = new ViewDataDictionary<T>(model); var viewCxt = new ViewContext(ControllerContext, view, vdd, new TempDataDictionary(), writer); viewCxt.View.Render(viewCxt, writer); return writer.ToString(); } } which I got from [here][1]. It works great, however my images aren't being included. I'm using: <img src="<%:Url.Content("~/Resource/confirmation-email/imageName.png") %>" which is giving me http://resource/confirmation-email/imageName.png This works fine when viewing the page on the site, however the image links don't work in the email. I need it to give me me: http://domain.com/application/resource/confirmation-email/imageName.png I've also tried using: VirtualPathUtility.ToAbsolute() [1]: http://stackoverflow.com/questions/483091/render-a-view-as-a-string
asp.net
html
email
img
null
null
open
Using Url.Content() when sending an html email with images === I need my app to send a confirmation email to a user. I have used the following method to render the view as a string: public string RenderViewToString<T>(string viewPath, T model) { using (var writer = new StringWriter()) { var view = new WebFormView(viewPath); var vdd = new ViewDataDictionary<T>(model); var viewCxt = new ViewContext(ControllerContext, view, vdd, new TempDataDictionary(), writer); viewCxt.View.Render(viewCxt, writer); return writer.ToString(); } } which I got from [here][1]. It works great, however my images aren't being included. I'm using: <img src="<%:Url.Content("~/Resource/confirmation-email/imageName.png") %>" which is giving me http://resource/confirmation-email/imageName.png This works fine when viewing the page on the site, however the image links don't work in the email. I need it to give me me: http://domain.com/application/resource/confirmation-email/imageName.png I've also tried using: VirtualPathUtility.ToAbsolute() [1]: http://stackoverflow.com/questions/483091/render-a-view-as-a-string
0
5,133,057
02/27/2011 11:51:19
636,412
02/27/2011 11:51:19
1
0
When will we have bulk image uplaod for Drupal 7
I am waiting for this a lot. I think I started to use D7 too soon.
drupal-7
null
null
null
null
02/28/2011 16:23:11
off topic
When will we have bulk image uplaod for Drupal 7 === I am waiting for this a lot. I think I started to use D7 too soon.
2
10,104,703
04/11/2012 11:08:26
1,326,369
04/11/2012 10:59:45
1
0
Generating a random turtle function in python
I'm trying to write a function called randomTurtle(): - generate a random number between 0 and 100 (0 and 100 included) that will determine the total number of moves the turtle will make (in other words, how many times the turtle will loop through) Then For each repetition of the sequence): Generate a random number of steps between 1 and 50 (1 and 50 included). Move the turtle forward by that amount. Select a random float between 0 and 1. If the value is less than 0.5, turn the turtle right. If the value is greater than or equal to 0.5, turn the turtle left
python
null
null
null
null
04/11/2012 20:22:57
not a real question
Generating a random turtle function in python === I'm trying to write a function called randomTurtle(): - generate a random number between 0 and 100 (0 and 100 included) that will determine the total number of moves the turtle will make (in other words, how many times the turtle will loop through) Then For each repetition of the sequence): Generate a random number of steps between 1 and 50 (1 and 50 included). Move the turtle forward by that amount. Select a random float between 0 and 1. If the value is less than 0.5, turn the turtle right. If the value is greater than or equal to 0.5, turn the turtle left
1
10,518,133
05/09/2012 14:26:23
467,875
10/06/2010 11:21:37
430
44
window.onpopstate for android?
Im making a mobile optimised website that has fullscreen dialog windows that open when you 'click' certain elements on the page. These windows are actually just divs that are animated into position. If the user presses the browser back button when one of these dialoge windows is open I want the dialoge box to close, not for the page to be left all together. I can do this with iPhone. If I make the element you click a link fragment, then on the window.onpopstate event I can use window.location.href to check the url and hide the dialoge box if appropriate. However I cant get this to work on Android as window.onpopstate isn't supported (at least with the phone im testing with which is quite old). How can I get round this? jQuery Mobile can do this, so I know it must be possible somehow. Thanks
javascript
android
null
null
null
null
open
window.onpopstate for android? === Im making a mobile optimised website that has fullscreen dialog windows that open when you 'click' certain elements on the page. These windows are actually just divs that are animated into position. If the user presses the browser back button when one of these dialoge windows is open I want the dialoge box to close, not for the page to be left all together. I can do this with iPhone. If I make the element you click a link fragment, then on the window.onpopstate event I can use window.location.href to check the url and hide the dialoge box if appropriate. However I cant get this to work on Android as window.onpopstate isn't supported (at least with the phone im testing with which is quite old). How can I get round this? jQuery Mobile can do this, so I know it must be possible somehow. Thanks
0
8,092,031
11/11/2011 09:34:23
957,095
09/21/2011 13:56:19
3
0
Cannot create message: incorrect content-type for SOAP version. Got text/xml; charset=UTF-8, but expected application/soap+xml
I am trying to use the large merchant services api provided by Ebay to upload files onto ebay. They have provided with a sample .jar file of the same. It seems to be working fine when we excute the .jar file on the command prompt, but when i am trying to integrate its source in my web app its giving me this error. Also i tried to create a web service client using netbeans and tried to use it, but still it gave me the same error. I also changed the SOAP version from 1.1 to 1.2 but that too doesnt seem to work. The following is the complete stack trace. Nov 11, 2011 2:59:41 PM com.sun.xml.internal.messaging.saaj.soap.MessageImpl init SEVERE: SAAJ0533: Cannot create message: incorrect content-type for SOAP version. Got text/xml; charset=UTF-8, but expected application/soap+xml Nov 11, 2011 2:59:41 PM com.sun.xml.internal.messaging.saaj.soap.MessageImpl init SEVERE: SAAJ0535: Unable to internalize message Exception in thread "main" javax.xml.ws.WebServiceException: Couldn't create SOAP message due to exception: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Unable to internalize message at com.sun.xml.internal.ws.util.SOAPConnectionUtil.getSOAPMessage(SOAPConnectionUtil.java:83) at com.sun.xml.internal.ws.encoding.soap.client.SOAPXMLDecoder.toSOAPMessage(SOAPXMLDecoder.java:102) at com.sun.xml.internal.ws.protocol.soap.client.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:440) at com.sun.xml.internal.ws.protocol.soap.client.SOAPMessageDispatcher.doSend(SOAPMessageDispatcher.java:260) at com.sun.xml.internal.ws.protocol.soap.client.SOAPMessageDispatcher.send(SOAPMessageDispatcher.java:139) at com.sun.xml.internal.ws.encoding.soap.internal.DelegateBase.send(DelegateBase.java:86) at com.sun.xml.internal.ws.client.EndpointIFInvocationHandler.implementSEIMethod(EndpointIFInvocationHandler.java:174) at com.sun.xml.internal.ws.client.EndpointIFInvocationHandler.invoke(EndpointIFInvocationHandler.java:108) at $Proxy28.createUploadJob(Unknown Source) at com.SwiftConnectV1.fileprocess.LMS.BulkDataExchangeActions.createUploadJob(BulkDataExchangeActions.java:138) at com.SwiftConnectV1.fileprocess.LMS.LMSClientJobs.createUploadJob(LMSClientJobs.java:154) at com.SwiftConnectV1.fileprocess.LMS.LMSSample.main(LMSSample.java:74) Caused by: Couldn't create SOAP message due to exception: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Unable to internalize message at com.sun.xml.internal.ws.util.SOAPUtil.createMessage(SOAPUtil.java:154) at com.sun.xml.internal.ws.util.SOAPConnectionUtil.getSOAPMessage(SOAPConnectionUtil.java:78) ... 11 more Caused by: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Unable to internalize message at com.sun.xml.internal.messaging.saaj.soap.MessageImpl.init(MessageImpl.java:475) at com.sun.xml.internal.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:278) at com.sun.xml.internal.messaging.saaj.soap.ver1_2.Message1_2Impl.<init>(Message1_2Impl.java:61) at com.sun.xml.internal.messaging.saaj.soap.ver1_2.SOAPMessageFactory1_2Impl.createMessage(SOAPMessageFactory1_2Impl.java:62) at com.sun.xml.internal.ws.util.SOAPUtil.createMessage(SOAPUtil.java:152) ... 12 more Caused by: com.sun.xml.internal.messaging.saaj.soap.SOAPVersionMismatchException: Cannot create message: incorrect content-type for SOAP version. Got: text/xml; charset=UTF-8 Expected: application/soap+xml at com.sun.xml.internal.messaging.saaj.soap.MessageImpl.init(MessageImpl.java:356) ... 16 more Thanks in advance, Amit
java
web-services
soap
struts
ebay
null
open
Cannot create message: incorrect content-type for SOAP version. Got text/xml; charset=UTF-8, but expected application/soap+xml === I am trying to use the large merchant services api provided by Ebay to upload files onto ebay. They have provided with a sample .jar file of the same. It seems to be working fine when we excute the .jar file on the command prompt, but when i am trying to integrate its source in my web app its giving me this error. Also i tried to create a web service client using netbeans and tried to use it, but still it gave me the same error. I also changed the SOAP version from 1.1 to 1.2 but that too doesnt seem to work. The following is the complete stack trace. Nov 11, 2011 2:59:41 PM com.sun.xml.internal.messaging.saaj.soap.MessageImpl init SEVERE: SAAJ0533: Cannot create message: incorrect content-type for SOAP version. Got text/xml; charset=UTF-8, but expected application/soap+xml Nov 11, 2011 2:59:41 PM com.sun.xml.internal.messaging.saaj.soap.MessageImpl init SEVERE: SAAJ0535: Unable to internalize message Exception in thread "main" javax.xml.ws.WebServiceException: Couldn't create SOAP message due to exception: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Unable to internalize message at com.sun.xml.internal.ws.util.SOAPConnectionUtil.getSOAPMessage(SOAPConnectionUtil.java:83) at com.sun.xml.internal.ws.encoding.soap.client.SOAPXMLDecoder.toSOAPMessage(SOAPXMLDecoder.java:102) at com.sun.xml.internal.ws.protocol.soap.client.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:440) at com.sun.xml.internal.ws.protocol.soap.client.SOAPMessageDispatcher.doSend(SOAPMessageDispatcher.java:260) at com.sun.xml.internal.ws.protocol.soap.client.SOAPMessageDispatcher.send(SOAPMessageDispatcher.java:139) at com.sun.xml.internal.ws.encoding.soap.internal.DelegateBase.send(DelegateBase.java:86) at com.sun.xml.internal.ws.client.EndpointIFInvocationHandler.implementSEIMethod(EndpointIFInvocationHandler.java:174) at com.sun.xml.internal.ws.client.EndpointIFInvocationHandler.invoke(EndpointIFInvocationHandler.java:108) at $Proxy28.createUploadJob(Unknown Source) at com.SwiftConnectV1.fileprocess.LMS.BulkDataExchangeActions.createUploadJob(BulkDataExchangeActions.java:138) at com.SwiftConnectV1.fileprocess.LMS.LMSClientJobs.createUploadJob(LMSClientJobs.java:154) at com.SwiftConnectV1.fileprocess.LMS.LMSSample.main(LMSSample.java:74) Caused by: Couldn't create SOAP message due to exception: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Unable to internalize message at com.sun.xml.internal.ws.util.SOAPUtil.createMessage(SOAPUtil.java:154) at com.sun.xml.internal.ws.util.SOAPConnectionUtil.getSOAPMessage(SOAPConnectionUtil.java:78) ... 11 more Caused by: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Unable to internalize message at com.sun.xml.internal.messaging.saaj.soap.MessageImpl.init(MessageImpl.java:475) at com.sun.xml.internal.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:278) at com.sun.xml.internal.messaging.saaj.soap.ver1_2.Message1_2Impl.<init>(Message1_2Impl.java:61) at com.sun.xml.internal.messaging.saaj.soap.ver1_2.SOAPMessageFactory1_2Impl.createMessage(SOAPMessageFactory1_2Impl.java:62) at com.sun.xml.internal.ws.util.SOAPUtil.createMessage(SOAPUtil.java:152) ... 12 more Caused by: com.sun.xml.internal.messaging.saaj.soap.SOAPVersionMismatchException: Cannot create message: incorrect content-type for SOAP version. Got: text/xml; charset=UTF-8 Expected: application/soap+xml at com.sun.xml.internal.messaging.saaj.soap.MessageImpl.init(MessageImpl.java:356) ... 16 more Thanks in advance, Amit
0
3,644,949
09/05/2010 03:52:11
172,637
09/13/2009 00:11:44
3,549
130
.val() doesn't set value for select (jQuery)
$('.reset').click(function () { $('select[name=one]').val(opt2); });​ JSFiddle [here][1]. What should I change? [1]: http://jsfiddle.net/VhZ4S/ Thanks!
javascript
jquery
forms
select
null
null
open
.val() doesn't set value for select (jQuery) === $('.reset').click(function () { $('select[name=one]').val(opt2); });​ JSFiddle [here][1]. What should I change? [1]: http://jsfiddle.net/VhZ4S/ Thanks!
0
7,334,447
09/07/2011 13:12:29
912,432
08/25/2011 15:18:39
14
1
Secondary index update issue
I have created KS & CF using cassandra-0.7.8 and inserted some rows and column values(around 1000 rows). Later, I wanted to index 2 column values. So, I issued 'update column family..' command. After, when I query based on indexed value it says "Row does not found". After indexing 1. Issued nodetool flush 2.restarted Cassandra once. Though it is same. But, I could see some XXX-Index.db file on cassandra data directory. What am I missing? Here are CF details, create column family ipinfo with column_type=Standard and default_validation_class = UTF8Type and comparator=UTF8Type and keys_cached=25000 and rows_cached=5000 and column_metadata=[ { column_name : country, validation_class : UTF8Type}, { column_name : ip, validation_class : LongType}, { column_name : domain, validation_class : UTF8Type }, ]; update column family ip with column_type=Standard and default_validation_class = UTF8Type and comparator=UTF8Type and keys_cached=25000 and rows_cached=5000 and column_metadata=[ {column_name : country, validation_class : UTF8Type }, {column_name : domain, validation_class : UTF8Type, index_type: KEYS}, {column_name : ip, validation_class : LongType, index_type: KEYS} ]; Any suggestions would be appreciated.
cassandra
null
null
null
null
null
open
Secondary index update issue === I have created KS & CF using cassandra-0.7.8 and inserted some rows and column values(around 1000 rows). Later, I wanted to index 2 column values. So, I issued 'update column family..' command. After, when I query based on indexed value it says "Row does not found". After indexing 1. Issued nodetool flush 2.restarted Cassandra once. Though it is same. But, I could see some XXX-Index.db file on cassandra data directory. What am I missing? Here are CF details, create column family ipinfo with column_type=Standard and default_validation_class = UTF8Type and comparator=UTF8Type and keys_cached=25000 and rows_cached=5000 and column_metadata=[ { column_name : country, validation_class : UTF8Type}, { column_name : ip, validation_class : LongType}, { column_name : domain, validation_class : UTF8Type }, ]; update column family ip with column_type=Standard and default_validation_class = UTF8Type and comparator=UTF8Type and keys_cached=25000 and rows_cached=5000 and column_metadata=[ {column_name : country, validation_class : UTF8Type }, {column_name : domain, validation_class : UTF8Type, index_type: KEYS}, {column_name : ip, validation_class : LongType, index_type: KEYS} ]; Any suggestions would be appreciated.
0
5,804,292
04/27/2011 12:43:31
284,354
03/02/2010 11:37:23
165
7
Android: Where log cat goes while running on device?
I'm using Eclipse on mac for developing android apps. When I run the application on emulator the log cat window shows what is expected and do work fine but when I run(or even debug) on real android connected device my log cat window doesn't show even a single line. How to deal with log cat when running on real android devices? Thanks,
android
eclipse
logcat
null
null
null
open
Android: Where log cat goes while running on device? === I'm using Eclipse on mac for developing android apps. When I run the application on emulator the log cat window shows what is expected and do work fine but when I run(or even debug) on real android connected device my log cat window doesn't show even a single line. How to deal with log cat when running on real android devices? Thanks,
0
5,862,705
05/02/2011 21:30:25
206,644
11/09/2009 06:08:57
49
3
Best Practices for Concurrent CRM 2011 Development
What are the best practices for dealing with concurrent development in CRM 2011? What is the proper way to deal with changes to customizations by different developers? Assuming that each developer has their own local dev environment and there is a community dev environment... How do developers avoid overwrite each other's work when they "check in" / import their customizations with the community development server? How do developers avoid overwriting their local work when they "check out" / export customizations from the community server and then attempt to import them? What tools are typically used to help automate this process?
development-environment
dynamics-crm-2011
null
null
null
09/09/2011 20:13:23
not constructive
Best Practices for Concurrent CRM 2011 Development === What are the best practices for dealing with concurrent development in CRM 2011? What is the proper way to deal with changes to customizations by different developers? Assuming that each developer has their own local dev environment and there is a community dev environment... How do developers avoid overwrite each other's work when they "check in" / import their customizations with the community development server? How do developers avoid overwriting their local work when they "check out" / export customizations from the community server and then attempt to import them? What tools are typically used to help automate this process?
4
7,349,709
09/08/2011 14:31:55
637,556
02/28/2011 11:03:04
30
3
Reproduce Contact/Action-style cells on an Android listview
I'd like to reproduce a part of the "Contact" application on my app : the "Action" cells "Call xxx" ( with the phone icon and the number ) "Send a message" ( with the msg icon and the number ) "Send an email" ( with the mail icon and the address ) I've got an HTC legend so i'm not sure if this is part of htc sense or integrated on android Is this integrated in the API and Monodroid, have you got some code sample or do I have to develop them from scratch ? Thanks in advance, Camille Hamel
c#
android
mono
monodroid
null
null
open
Reproduce Contact/Action-style cells on an Android listview === I'd like to reproduce a part of the "Contact" application on my app : the "Action" cells "Call xxx" ( with the phone icon and the number ) "Send a message" ( with the msg icon and the number ) "Send an email" ( with the mail icon and the address ) I've got an HTC legend so i'm not sure if this is part of htc sense or integrated on android Is this integrated in the API and Monodroid, have you got some code sample or do I have to develop them from scratch ? Thanks in advance, Camille Hamel
0
2,486,871
03/21/2010 11:26:25
228,741
12/10/2009 11:36:53
222
11
SWF only working in debug folder.
If I copy all the files from the debug folder and paste it somewhere it stops working gives me a sandbox error. ( I am not using any absolute paths) and everything seems to be fine in debug folder. Any Ideas? It's a actionscript project in flex builder.
flexbuilder
flex
actionscript-3
null
null
null
open
SWF only working in debug folder. === If I copy all the files from the debug folder and paste it somewhere it stops working gives me a sandbox error. ( I am not using any absolute paths) and everything seems to be fine in debug folder. Any Ideas? It's a actionscript project in flex builder.
0
10,204,789
04/18/2012 07:23:41
844,068
07/14/2011 07:47:01
59
1
Mysql Server Configure Best Practise In the RAM perspective
I have just got a new machine that will be dedicated to my mysql server. It has a big RAM for 24G. (it is big at least for me though) I am looking for good practices to configure mysql server in case of much usable RAM in aim to make very best use of the RAM, and can anyone share something good please? The server will be basically used as a general one, that is, both insert and select are important for the time-sensitive, and simultaneous select operations are many more than inserts in our case. The storage engine mostly uses MyISAM, and many indexes have created and used. can you please give specific configurations like how much should be for: sort_buffer_size=? key_buffer_size=? myisam_sort_buffer_size=? and all possible variables that the RAM matter. and the considerations behind them. Thanks,
mysql
null
null
null
null
04/19/2012 14:58:15
off topic
Mysql Server Configure Best Practise In the RAM perspective === I have just got a new machine that will be dedicated to my mysql server. It has a big RAM for 24G. (it is big at least for me though) I am looking for good practices to configure mysql server in case of much usable RAM in aim to make very best use of the RAM, and can anyone share something good please? The server will be basically used as a general one, that is, both insert and select are important for the time-sensitive, and simultaneous select operations are many more than inserts in our case. The storage engine mostly uses MyISAM, and many indexes have created and used. can you please give specific configurations like how much should be for: sort_buffer_size=? key_buffer_size=? myisam_sort_buffer_size=? and all possible variables that the RAM matter. and the considerations behind them. Thanks,
2
6,303,322
06/10/2011 07:36:01
792,190
06/10/2011 05:47:57
1
0
Converting C variables into JSON Format..
I am coding a C program that my C string variables need to be converted into JSON string variables. But i am failed to convert them. The string variables i have in my C program are char mcode[20]="123456", billno[20]="0057",customerId[10]="8989898",name[20]="abc",details[20]={"FMCG","90000"}; float total=135000; And i want the above values to be converted into JSON code as shown in below Format. { "mcode":"123456" , "bill": { "no": "0057", "customerId": "8989898", "name":"abc", "details": [{"category":"FMCG","amount":90000},{"category":"Electronics","amount":45000}] }, "total":135000 } } } Help me in finding the code in C.. Thanks.
json
null
null
null
null
null
open
Converting C variables into JSON Format.. === I am coding a C program that my C string variables need to be converted into JSON string variables. But i am failed to convert them. The string variables i have in my C program are char mcode[20]="123456", billno[20]="0057",customerId[10]="8989898",name[20]="abc",details[20]={"FMCG","90000"}; float total=135000; And i want the above values to be converted into JSON code as shown in below Format. { "mcode":"123456" , "bill": { "no": "0057", "customerId": "8989898", "name":"abc", "details": [{"category":"FMCG","amount":90000},{"category":"Electronics","amount":45000}] }, "total":135000 } } } Help me in finding the code in C.. Thanks.
0
10,313,036
04/25/2012 09:39:30
432,259
08/26/2010 19:29:06
783
38
Maven: inheritance of artifacts built by assembly plugin
I am building our Web-application using Maven Assembly plug-in. This is motivated by a requirement to extract some data out of special plug-ins. The fragment of assembly descriptor demonstrates this: <dependencySet> <unpack>true</unpack> <scope>runtime</scope> <useProjectArtifact>false</useProjectArtifact> <includes> <include>org.myproject.module:*:jar</include> </includes> <unpackOptions> <includes> <include>images/**</include> <include>install/**</include> <include>mappings/**</include> </includes> </unpackOptions> <outputDirectory>./WEB-INF/myproject-modules/${artifact.name}</outputDirectory> </dependencySet> All plug-ins with groupId=org.myproject.module have this special treatment and extraction of module-specific folders. Now, I have a requirement to build another WAR with exactly the same approach, but different set of modules. Is there any way to nicely extend my original POM, and simply add dependencies, _without need to have a copy_ of my assembly descriptor(s) (stored in src/main/assembly)? Simply extending pom fails with missing assembly descriptor, which is physically found in parent: <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>2.3</version> <configuration> <descriptors> <descriptor>src/main/assembly/assembly.xml</descriptor> </descriptors> </configuration> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin> </plugins> </pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> </plugin> </plugins> </build>
maven
assembly
null
null
null
null
open
Maven: inheritance of artifacts built by assembly plugin === I am building our Web-application using Maven Assembly plug-in. This is motivated by a requirement to extract some data out of special plug-ins. The fragment of assembly descriptor demonstrates this: <dependencySet> <unpack>true</unpack> <scope>runtime</scope> <useProjectArtifact>false</useProjectArtifact> <includes> <include>org.myproject.module:*:jar</include> </includes> <unpackOptions> <includes> <include>images/**</include> <include>install/**</include> <include>mappings/**</include> </includes> </unpackOptions> <outputDirectory>./WEB-INF/myproject-modules/${artifact.name}</outputDirectory> </dependencySet> All plug-ins with groupId=org.myproject.module have this special treatment and extraction of module-specific folders. Now, I have a requirement to build another WAR with exactly the same approach, but different set of modules. Is there any way to nicely extend my original POM, and simply add dependencies, _without need to have a copy_ of my assembly descriptor(s) (stored in src/main/assembly)? Simply extending pom fails with missing assembly descriptor, which is physically found in parent: <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>2.3</version> <configuration> <descriptors> <descriptor>src/main/assembly/assembly.xml</descriptor> </descriptors> </configuration> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin> </plugins> </pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> </plugin> </plugins> </build>
0
9,083,768
01/31/2012 17:07:37
1,162,116
01/21/2012 09:34:44
82
0
Jquery no behavior on click
I have a div with an id called #wrapper. Next to it I have button. When the button is clicked, an ajax call is triggered returning a list of divs with a class called .calendarDate. Everything works great, #wrapper is populated fine. Now I am trying to have a click event on that .calendarDate class, but it is not working. The strange part is that the css properties I apply to that class are working properly. Hope someone can acknowledge about that strange behavior. By he way, no errors in my debugger. Thank you in advance for your replies. Cheers. Marc
jquery
null
null
null
null
null
open
Jquery no behavior on click === I have a div with an id called #wrapper. Next to it I have button. When the button is clicked, an ajax call is triggered returning a list of divs with a class called .calendarDate. Everything works great, #wrapper is populated fine. Now I am trying to have a click event on that .calendarDate class, but it is not working. The strange part is that the css properties I apply to that class are working properly. Hope someone can acknowledge about that strange behavior. By he way, no errors in my debugger. Thank you in advance for your replies. Cheers. Marc
0
8,988,707
01/24/2012 14:41:25
483,777
10/22/2010 03:32:01
92
3
Content posted to blogs ranking higher than original page. SEO
On our site users create pages of content that can also be posted to a Wordpress or Blogger page. We've done everything we have read to do to make sure that the original on our site gets the credit including cutting the content down to 450 characters and adding a link to the original page at both the top and bottom of the post. Unfortunately, the Wordpress and Blogger posts continually rank higher on Google than our own pages with the expanded content. What are we missing?
wordpress
seo
blogger
null
null
01/25/2012 13:44:32
off topic
Content posted to blogs ranking higher than original page. SEO === On our site users create pages of content that can also be posted to a Wordpress or Blogger page. We've done everything we have read to do to make sure that the original on our site gets the credit including cutting the content down to 450 characters and adding a link to the original page at both the top and bottom of the post. Unfortunately, the Wordpress and Blogger posts continually rank higher on Google than our own pages with the expanded content. What are we missing?
2
9,430,974
02/24/2012 12:43:18
1,210,850
02/15/2012 08:56:18
3
0
suppress doxygen language has not been updated warning
I use doxygen 1.7.4 on Windows XP. I set the output language to german, and doxygen generates the following warning: Warning: The selected output language "german" has not been updated since release 1.6.3. As a result some sentences may appear in English. Because I collect all warnings in our build-environment I want to suppress this one. Does anybody know how to do this?
warnings
doxygen
suppress-warnings
null
null
null
open
suppress doxygen language has not been updated warning === I use doxygen 1.7.4 on Windows XP. I set the output language to german, and doxygen generates the following warning: Warning: The selected output language "german" has not been updated since release 1.6.3. As a result some sentences may appear in English. Because I collect all warnings in our build-environment I want to suppress this one. Does anybody know how to do this?
0
2,211,136
02/05/2010 23:13:56
261,002
01/28/2010 13:23:08
6
0
how to develop AForge.NET for Computer Vision
I'm trying to develop a program to recognize a hand gestures and base on the hand gestures, run some commands or move the mouse. how can I use AForge.NET with C#??? it is possible to do that? is there any tutorial out there???? Please help
c#
gesture-recognition
aforge
null
null
07/15/2012 17:30:19
not a real question
how to develop AForge.NET for Computer Vision === I'm trying to develop a program to recognize a hand gestures and base on the hand gestures, run some commands or move the mouse. how can I use AForge.NET with C#??? it is possible to do that? is there any tutorial out there???? Please help
1
6,801,580
07/23/2011 15:58:59
767,469
05/24/2011 09:35:04
34
0
Emailing Cart Contents
I have this script to display my cart: $cartOutput .= '<tr>'; $cartOutput .= '<td><img src="stock_photos/' . $item_id . '.png" alt="' . $product_name. '" /></td>'; $cartOutput .= '<td>' . $product_name . ' ' . $details . '</td>'; $cartOutput .= '<td>&#8364;' . $price . '</td>'; $cartOutput .= '<td><input id="quantity" name="quantity" type="text" value="' . $each_item['quantity'] . '" size="1" maxlength="2" style="text-align: center;"/></td>'; $cartOutput .= '<td><span class="text">&#8364;' . $pricetotal . '</td>'; $cartOutput .= '</tr>'; Is there a way to email the cart (items information) upon checkout? Thank you
php
null
null
null
null
07/23/2011 20:49:06
not a real question
Emailing Cart Contents === I have this script to display my cart: $cartOutput .= '<tr>'; $cartOutput .= '<td><img src="stock_photos/' . $item_id . '.png" alt="' . $product_name. '" /></td>'; $cartOutput .= '<td>' . $product_name . ' ' . $details . '</td>'; $cartOutput .= '<td>&#8364;' . $price . '</td>'; $cartOutput .= '<td><input id="quantity" name="quantity" type="text" value="' . $each_item['quantity'] . '" size="1" maxlength="2" style="text-align: center;"/></td>'; $cartOutput .= '<td><span class="text">&#8364;' . $pricetotal . '</td>'; $cartOutput .= '</tr>'; Is there a way to email the cart (items information) upon checkout? Thank you
1
11,314,757
07/03/2012 15:57:15
1,218,369
02/18/2012 17:28:01
66
3
Python vs PHP for a API
I partly know the answer to this as what I would say "<b>it's the one which you find best developing with</b>" but from a technical side of things for such tasks as URL bindings, SQL queries, use of <i>Restful</i> HTTP verbs etc. Which i know you can do with both languages but also how much of this can you do easily with the core library without <i>megabytes</i> of code. Also the availability of frameworks and the ability to create a fast but stable api that did not take <i>milleniums</i> to create. <i>so</i> <b>which is <i>better</i> ?</b>
php
python
sql
api
rest
07/03/2012 16:09:42
not constructive
Python vs PHP for a API === I partly know the answer to this as what I would say "<b>it's the one which you find best developing with</b>" but from a technical side of things for such tasks as URL bindings, SQL queries, use of <i>Restful</i> HTTP verbs etc. Which i know you can do with both languages but also how much of this can you do easily with the core library without <i>megabytes</i> of code. Also the availability of frameworks and the ability to create a fast but stable api that did not take <i>milleniums</i> to create. <i>so</i> <b>which is <i>better</i> ?</b>
4
9,222,869
02/10/2012 04:53:55
1,178,392
01/30/2012 15:30:54
15
0
How to create a playlist with a single php file and multiple media files?
well I'm trying to create a great playlist of music, only using a sigle php file. Right now, with this code I can stream a song from a single media file source: <?php // Try and open the remote stream if (!$stream = fopen('http://example.com/audio.mp3', 'r')) { // If opening failed, inform the client we have no content header('HTTP/1.1 500 Internal Server Error'); exit('Unable to open remote stream'); } // It's probably an idea to remove the execution time limit - on Windows hosts // this could result in the audio stream cutting off mid-flow set_time_limit(0); // Inform the client we will be sending it some MPEG audio header('Content-Type: audio/mpeg'); // Send the data fpassthru($stream); // Thanks DaveRandom ?> So, the idea is almost simple: with a single php file, create a playlist. The php file streams the first song, and then inmediatly, play another one - previously set on the php file - and over and over again, with all of the sources in the php file. Thanks.
php
file
stream
media
multiple
null
open
How to create a playlist with a single php file and multiple media files? === well I'm trying to create a great playlist of music, only using a sigle php file. Right now, with this code I can stream a song from a single media file source: <?php // Try and open the remote stream if (!$stream = fopen('http://example.com/audio.mp3', 'r')) { // If opening failed, inform the client we have no content header('HTTP/1.1 500 Internal Server Error'); exit('Unable to open remote stream'); } // It's probably an idea to remove the execution time limit - on Windows hosts // this could result in the audio stream cutting off mid-flow set_time_limit(0); // Inform the client we will be sending it some MPEG audio header('Content-Type: audio/mpeg'); // Send the data fpassthru($stream); // Thanks DaveRandom ?> So, the idea is almost simple: with a single php file, create a playlist. The php file streams the first song, and then inmediatly, play another one - previously set on the php file - and over and over again, with all of the sources in the php file. Thanks.
0
3,595,333
08/29/2010 15:28:24
429,583
08/24/2010 13:39:46
1
0
How to solve my difficulty making algorithms?
First of all, sorry, but my English is not very good. I'm at the third semester at a programming course and I can't "get it". I passed previous exams because I've studied three times the amount my colleagues did. And, now in my Data Structures class when the professor asks us to make list algorithms ( for example ), my colleagues just start to write the code while me ( or would be "I"? ), even after seeing it done, can't understand. I find it so hard it's painful. It takes me 1 hour to understand simple algorithms. So the question is: can anyone recommend me books or something, that will help me think more like a programmer? I mean, "normal" people, after a given problem, seem to immediately make the picture in their head and star to write the code.
algorithm
null
null
null
null
05/30/2012 11:13:44
not constructive
How to solve my difficulty making algorithms? === First of all, sorry, but my English is not very good. I'm at the third semester at a programming course and I can't "get it". I passed previous exams because I've studied three times the amount my colleagues did. And, now in my Data Structures class when the professor asks us to make list algorithms ( for example ), my colleagues just start to write the code while me ( or would be "I"? ), even after seeing it done, can't understand. I find it so hard it's painful. It takes me 1 hour to understand simple algorithms. So the question is: can anyone recommend me books or something, that will help me think more like a programmer? I mean, "normal" people, after a given problem, seem to immediately make the picture in their head and star to write the code.
4
2,190,155
02/03/2010 06:38:40
162,381
08/25/2009 00:44:47
121
14
best way in producing a master script for SQL
i want to extract specific database tables & stored procedures into one master script. Do you know any software that can help me do this faster? I've tried using the SQL Database publishing tool, but it's not that efficient since its gathering tables that I didn't select.
sql
sql-server-2005
tsql
null
null
null
open
best way in producing a master script for SQL === i want to extract specific database tables & stored procedures into one master script. Do you know any software that can help me do this faster? I've tried using the SQL Database publishing tool, but it's not that efficient since its gathering tables that I didn't select.
0
7,339,079
09/07/2011 18:56:58
485,418
10/24/2010 02:43:09
100
1
Using NOT IN and OR not working as intended in MySQL
I'm attempting to write a query that will allow me to get any record from one table if the id doesn't exist in another table, or if it does exist and it also meets a second criteria. Below is what I attempted to do, but it always returns 0 rows: SELECT p.pageid, p.pager FROM pages p, update u WHERE p.pageid NOT IN (SELECT pageid FROM update) OR (p.pageid = u.pageid AND u.pagenums > 1000) LIMIT 100 From what I can tell this *should* work, but it's not. Any help is appreciated.
mysql
sql
null
null
null
null
open
Using NOT IN and OR not working as intended in MySQL === I'm attempting to write a query that will allow me to get any record from one table if the id doesn't exist in another table, or if it does exist and it also meets a second criteria. Below is what I attempted to do, but it always returns 0 rows: SELECT p.pageid, p.pager FROM pages p, update u WHERE p.pageid NOT IN (SELECT pageid FROM update) OR (p.pageid = u.pageid AND u.pagenums > 1000) LIMIT 100 From what I can tell this *should* work, but it's not. Any help is appreciated.
0
1,311,661
08/21/2009 12:29:54
160,763
08/21/2009 12:29:53
1
0
Is it possible to use ASP.NET MembershipProvider/RoleProvider in self-hosted WCF services?
I am trying to use custom ASP.NET MembershipProvider and RoleProvider to handle security for my service. The service is self-hosted in a console app, not in IIS. I use webHttpBinding with Basic Authentication. I configured serviceCredentials and serviceAuthorization to use providers. Providers really get initialized. But WCF seems to ignore my settings and tryes to login user to Windows. I figured that out from Events Log, and proved by sending my windows credentials to the service. Below you can see my configuration and debug screenshots. Why is it using windows for auth? Maybe it is impossible to use ASP.NET auth providers without IIS? <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.web> <roleManager enabled="true" defaultProvider="CustomRoleProvider"> <providers> <clear/> <add name="CustomRoleProvider" type="CustomRoles.CustomRoleProvider, CustomRoles"/> </providers> </roleManager> <membership defaultProvider="CustomMembershipProvider" userIsOnlineTimeWindow="15"> <providers> <clear/> <add name="CustomMembershipProvider" type="CustomRoles.CustomMembershipProvider, CustomRoles"/> </providers> </membership> </system.web> <system.serviceModel> <bindings> <webHttpBinding> <binding name="webHttp"> <security mode="TransportCredentialOnly"> <transport clientCredentialType="Basic" /> </security> </binding> </webHttpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior name="Service"> <serviceAuthorization principalPermissionMode="UseAspNetRoles" roleProviderName="CustomRoleProvider" /> <serviceCredentials> <userNameAuthentication userNamePasswordValidationMode="MembershipProvider" membershipProviderName="CustomMembershipProvider" /> </serviceCredentials> <serviceSecurityAudit auditLogLocation="Application" serviceAuthorizationAuditLevel="SuccessOrFailure" messageAuthenticationAuditLevel="SuccessOrFailure" /> </behavior> </serviceBehaviors> </behaviors> <services> <service behaviorConfiguration="Service" name="CustomRoles.Service"> <endpoint address="http://127.0.0.1:8060" binding="webHttpBinding" bindingConfiguration="webHttp" contract="CustomRoles.IService" /> </service> </services> </system.serviceModel> </configuration> That's what I see when debug. Why is it using windows for auth? [credentials screen][1] [1]: http://img81.imageshack.us/img81/1289/credentials.gif
wcf
authentication
asp.net-membership
roleprovider
webhttpbinding
null
open
Is it possible to use ASP.NET MembershipProvider/RoleProvider in self-hosted WCF services? === I am trying to use custom ASP.NET MembershipProvider and RoleProvider to handle security for my service. The service is self-hosted in a console app, not in IIS. I use webHttpBinding with Basic Authentication. I configured serviceCredentials and serviceAuthorization to use providers. Providers really get initialized. But WCF seems to ignore my settings and tryes to login user to Windows. I figured that out from Events Log, and proved by sending my windows credentials to the service. Below you can see my configuration and debug screenshots. Why is it using windows for auth? Maybe it is impossible to use ASP.NET auth providers without IIS? <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.web> <roleManager enabled="true" defaultProvider="CustomRoleProvider"> <providers> <clear/> <add name="CustomRoleProvider" type="CustomRoles.CustomRoleProvider, CustomRoles"/> </providers> </roleManager> <membership defaultProvider="CustomMembershipProvider" userIsOnlineTimeWindow="15"> <providers> <clear/> <add name="CustomMembershipProvider" type="CustomRoles.CustomMembershipProvider, CustomRoles"/> </providers> </membership> </system.web> <system.serviceModel> <bindings> <webHttpBinding> <binding name="webHttp"> <security mode="TransportCredentialOnly"> <transport clientCredentialType="Basic" /> </security> </binding> </webHttpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior name="Service"> <serviceAuthorization principalPermissionMode="UseAspNetRoles" roleProviderName="CustomRoleProvider" /> <serviceCredentials> <userNameAuthentication userNamePasswordValidationMode="MembershipProvider" membershipProviderName="CustomMembershipProvider" /> </serviceCredentials> <serviceSecurityAudit auditLogLocation="Application" serviceAuthorizationAuditLevel="SuccessOrFailure" messageAuthenticationAuditLevel="SuccessOrFailure" /> </behavior> </serviceBehaviors> </behaviors> <services> <service behaviorConfiguration="Service" name="CustomRoles.Service"> <endpoint address="http://127.0.0.1:8060" binding="webHttpBinding" bindingConfiguration="webHttp" contract="CustomRoles.IService" /> </service> </services> </system.serviceModel> </configuration> That's what I see when debug. Why is it using windows for auth? [credentials screen][1] [1]: http://img81.imageshack.us/img81/1289/credentials.gif
0
305,369
11/20/2008 13:56:52
11,333
09/16/2008 07:13:03
444
47
Firefox doesn't take table styling from master style?
I have a stylesheet in my master page that defines several general things (basic doc structure, header images, control styling etc). Amongs those styling rules are the table stylings. Now in all pages that inherit from the master page, the tables are styled the same. It works in Opera and it even works in IE. But WHY oh WHY doesn't it work in FF? If I copy paste the exact same styling into a style sheet that gest loaded explicitly at the content page, it all works fine... All my pages validate 100% XHTML strict. Sadly, there is no public example I can show you. Is this a known bug or am I doing something wrong?
asp.net-mvc
css
null
null
null
11/20/2008 14:29:50
off topic
Firefox doesn't take table styling from master style? === I have a stylesheet in my master page that defines several general things (basic doc structure, header images, control styling etc). Amongs those styling rules are the table stylings. Now in all pages that inherit from the master page, the tables are styled the same. It works in Opera and it even works in IE. But WHY oh WHY doesn't it work in FF? If I copy paste the exact same styling into a style sheet that gest loaded explicitly at the content page, it all works fine... All my pages validate 100% XHTML strict. Sadly, there is no public example I can show you. Is this a known bug or am I doing something wrong?
2
7,106,110
08/18/2011 10:42:17
84,201
03/29/2009 07:46:24
8,604
162
What is good strategy to make a flexible layout for Landscape and Portrait orientation and should also work well in Desktop?
Currently I use fixed `width:960px` because I want to keep the layout centered in desktop. but doing this it makes problem in iPad portrait mode. I need to re-define widht to `768px` and also do adjustments for according to that. is there a way to make a flexible layout for **Desktop + iPad ( Portrait + Landscape mode) with minimal code and minimal efforts.
css
css3
mobile-safari
null
null
null
open
What is good strategy to make a flexible layout for Landscape and Portrait orientation and should also work well in Desktop? === Currently I use fixed `width:960px` because I want to keep the layout centered in desktop. but doing this it makes problem in iPad portrait mode. I need to re-define widht to `768px` and also do adjustments for according to that. is there a way to make a flexible layout for **Desktop + iPad ( Portrait + Landscape mode) with minimal code and minimal efforts.
0
10,828,868
05/31/2012 07:03:03
1,376,826
05/05/2012 13:15:28
1
0
I want to send zip file as an attachment to mail using php
I am new in php and want to send my zip file as atachment to mail in php. if any code and suggestions are accepted. thanks
php
null
null
null
null
05/31/2012 07:06:41
not a real question
I want to send zip file as an attachment to mail using php === I am new in php and want to send my zip file as atachment to mail in php. if any code and suggestions are accepted. thanks
1
9,240,176
02/11/2012 12:23:01
1,190,616
02/05/2012 12:55:19
8
1
syntax error in Fixture for Ruby on Rails
I am trying to fill my Transquans model with data. Transquans belongs_to Warehouse and Clients, of which I have samples of size seven each. Warehouses and Clients both have codename string, namely WHi or CLi respectively. My try to build a fixture looks like this: <% @warehouses = Warehouse.find(:all) %> <% @clients = Client.find(:all) %> <% 1.upto(49) do |i| %> fix_<%= i %>: id: <%= i %> <% 1.upto(7) do |j| %> <% 1.upto(7) do |k| %> @warehouses.codename: WH<%= j %> @clients.codename: CL<%= k %> quan: <%= 0 %> distance: <%= 5+rand(994)%> <% end %> <% end %> <% end %> Loading this fixture into the database causes an error: rake aborted! couldn't parse YAML at line 9 column 26 which is the word codename. The problem surely is the linking to the parent directories Warehouse and Client. For better understanding the data [structure model][1] can be seen. Thank you for your help. [1]: http://dl.dropbox.com/u/45905590/datastructure.png
ruby-on-rails-3
fixtures
null
null
null
null
open
syntax error in Fixture for Ruby on Rails === I am trying to fill my Transquans model with data. Transquans belongs_to Warehouse and Clients, of which I have samples of size seven each. Warehouses and Clients both have codename string, namely WHi or CLi respectively. My try to build a fixture looks like this: <% @warehouses = Warehouse.find(:all) %> <% @clients = Client.find(:all) %> <% 1.upto(49) do |i| %> fix_<%= i %>: id: <%= i %> <% 1.upto(7) do |j| %> <% 1.upto(7) do |k| %> @warehouses.codename: WH<%= j %> @clients.codename: CL<%= k %> quan: <%= 0 %> distance: <%= 5+rand(994)%> <% end %> <% end %> <% end %> Loading this fixture into the database causes an error: rake aborted! couldn't parse YAML at line 9 column 26 which is the word codename. The problem surely is the linking to the parent directories Warehouse and Client. For better understanding the data [structure model][1] can be seen. Thank you for your help. [1]: http://dl.dropbox.com/u/45905590/datastructure.png
0
9,208,542
02/09/2012 09:49:06
1,179,639
01/31/2012 06:15:07
16
0
how to properly use XmlWriter in C#?
I am trying to write a chunk of XML data to a file using the code below using (XmlWriter writer = XmlWriter.Create("D://project//data//" + i + ".xml")) but it gives the following error Server Error in '/' Application. Could not find a part of the path 'D:\project\data\1.xml'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\project\data\1.xml'. while when I am reading an XML using XmlReader using the code like bellow XmlReader reader = XmlReader.Create("d://project_elysian//data.xml"); it does create the reader seamlessly and gives no error, can't understand why?
c#
xml
null
null
null
02/10/2012 00:43:07
too localized
how to properly use XmlWriter in C#? === I am trying to write a chunk of XML data to a file using the code below using (XmlWriter writer = XmlWriter.Create("D://project//data//" + i + ".xml")) but it gives the following error Server Error in '/' Application. Could not find a part of the path 'D:\project\data\1.xml'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\project\data\1.xml'. while when I am reading an XML using XmlReader using the code like bellow XmlReader reader = XmlReader.Create("d://project_elysian//data.xml"); it does create the reader seamlessly and gives no error, can't understand why?
3
9,350,399
02/19/2012 15:16:05
679,099
03/13/2011 11:25:30
407
3
touchesBegan and touchesMoved stuck
i am using this code in my app to recognize touch and drag on specific `UIView`, now i have a problem that if i make the touch and immediate make a drag the `touchesMoved` called only 3-4 times and stop and then the `touchesCancelled` called, but if i touch the screen wait a second and then make a drag it call `touchesMoved` every time the finger move. -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ NSArray* touchArray = [touches allObjects]; UITouch* touch = [touchArray objectAtIndex:0]; CGPoint point = [touch locationInView:self.view]; UIView *tmp = [self.view hitTest:point withEvent:event]; if (tmp == volumeViewBackground) { //do something }else { NSLog(@"err"); } } -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{ NSArray* touchArray = [touches allObjects]; UITouch* touch = [touchArray objectAtIndex:0]; CGPoint point = [touch locationInView:self.view]; UIView *tmp = [self.view hitTest:point withEvent:event]; if (tmp == volumeViewBackground) { //do something }else { NSLog(@"err"); } } -(void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event{ NSLog(@"error"); }
iphone
objective-c
null
null
null
null
open
touchesBegan and touchesMoved stuck === i am using this code in my app to recognize touch and drag on specific `UIView`, now i have a problem that if i make the touch and immediate make a drag the `touchesMoved` called only 3-4 times and stop and then the `touchesCancelled` called, but if i touch the screen wait a second and then make a drag it call `touchesMoved` every time the finger move. -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ NSArray* touchArray = [touches allObjects]; UITouch* touch = [touchArray objectAtIndex:0]; CGPoint point = [touch locationInView:self.view]; UIView *tmp = [self.view hitTest:point withEvent:event]; if (tmp == volumeViewBackground) { //do something }else { NSLog(@"err"); } } -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{ NSArray* touchArray = [touches allObjects]; UITouch* touch = [touchArray objectAtIndex:0]; CGPoint point = [touch locationInView:self.view]; UIView *tmp = [self.view hitTest:point withEvent:event]; if (tmp == volumeViewBackground) { //do something }else { NSLog(@"err"); } } -(void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event{ NSLog(@"error"); }
0
6,169,777
05/29/2011 19:02:53
775,363
05/29/2011 18:15:02
26
0
Another c++ interview question
One of the questions I was asked in past job interview. Interview is over now, so I am asking only not to screw up so bad on the next one.. // Explain the differences between buffer1, buffer2 and buffer3 in the // example code below. Consider: // i. Scope & Lifetime // ii. Performance & use of system resources char buffer1[512]; void func1() { char buffer2[1024]; //... } void func2() { char* buffer3 = static_cast<char*> ( malloc(2048) ); //... } My answer was.. *buffer1 is a global variable visible by entire application buffer1 exists while application is running buffer1 will use 512 bytes on stack buffer1 is allocated on stack therefore its perfomance is much greater then buffer3 buffer2 is local variable created when func1 is called buffer2 can only be accessed by members inside func1 buffer2 exists as long as func1 executes buffer2 uses 1024 bytes on stack and has high performance due to being allocated on a stack buffer3 is local variable created when func2 is called buffer3 can only be accessed by members inside func2 buffer3 still exists after func2 finishes and needs to be freed manually buffer3 uses 2048 of heap memory buffer3 has slower performance then buffer1 or buffer2* I am pretty sure I am missing something here, it is not entirely correct. Thanks for help guys!!
c++
null
null
null
null
05/29/2011 19:07:40
not a real question
Another c++ interview question === One of the questions I was asked in past job interview. Interview is over now, so I am asking only not to screw up so bad on the next one.. // Explain the differences between buffer1, buffer2 and buffer3 in the // example code below. Consider: // i. Scope & Lifetime // ii. Performance & use of system resources char buffer1[512]; void func1() { char buffer2[1024]; //... } void func2() { char* buffer3 = static_cast<char*> ( malloc(2048) ); //... } My answer was.. *buffer1 is a global variable visible by entire application buffer1 exists while application is running buffer1 will use 512 bytes on stack buffer1 is allocated on stack therefore its perfomance is much greater then buffer3 buffer2 is local variable created when func1 is called buffer2 can only be accessed by members inside func1 buffer2 exists as long as func1 executes buffer2 uses 1024 bytes on stack and has high performance due to being allocated on a stack buffer3 is local variable created when func2 is called buffer3 can only be accessed by members inside func2 buffer3 still exists after func2 finishes and needs to be freed manually buffer3 uses 2048 of heap memory buffer3 has slower performance then buffer1 or buffer2* I am pretty sure I am missing something here, it is not entirely correct. Thanks for help guys!!
1
9,576,056
03/06/2012 00:05:45
648,896
03/07/2011 21:56:34
90
2
Using RJB or plain Javascript?
What do you think? Which one is the best in Rails framework? Using plain javascript or RJB? Can you explain pros and cons of the usage each? Thanks in advance for the ideas...
javascript
ruby-on-rails
rjb
null
null
03/06/2012 03:35:21
not constructive
Using RJB or plain Javascript? === What do you think? Which one is the best in Rails framework? Using plain javascript or RJB? Can you explain pros and cons of the usage each? Thanks in advance for the ideas...
4
8,340,844
12/01/2011 11:45:50
327,528
04/28/2010 06:13:59
934
12
Why does Microsoft have two competing ORMs?
Microsoft has created both the Entity Framework and Linq-To-SQL. Aren't these two competing ORMs? Why would they do this? When would you use one rather than the other?
entity-framework
linq-to-sql
orm
null
null
12/01/2011 11:53:05
not constructive
Why does Microsoft have two competing ORMs? === Microsoft has created both the Entity Framework and Linq-To-SQL. Aren't these two competing ORMs? Why would they do this? When would you use one rather than the other?
4
7,752,886
10/13/2011 10:39:25
961,032
09/23/2011 11:26:45
1
0
change the url using Javascript
i have to change the url on click of one anchor tag..and that code is <a class="test_Class" onclick="if(!window.location.hash) {window.location.hash='slide:demp';}else if(window.location.hash!='slide:demp'){window.location.hash='slide:demp';}" id="ngg-next-5" href="http://www.rantsports.com/blog/2011/10/05/test-for-slide/rantgallery/image/image/demp"><img src="http://rantsports.wpengine.netdna-cdn.com/wp-content/plugins/nextgen-gallery/images/next.png" style="width:45px;"></a> It works in IE..but not working in Firefox and chrome.. i got an error like :: document.getElementById(oParagraphs[i].id).click is not a function plz give me any solutions... thanks in advance....
javascript
null
null
null
null
10/14/2011 22:26:23
not a real question
change the url using Javascript === i have to change the url on click of one anchor tag..and that code is <a class="test_Class" onclick="if(!window.location.hash) {window.location.hash='slide:demp';}else if(window.location.hash!='slide:demp'){window.location.hash='slide:demp';}" id="ngg-next-5" href="http://www.rantsports.com/blog/2011/10/05/test-for-slide/rantgallery/image/image/demp"><img src="http://rantsports.wpengine.netdna-cdn.com/wp-content/plugins/nextgen-gallery/images/next.png" style="width:45px;"></a> It works in IE..but not working in Firefox and chrome.. i got an error like :: document.getElementById(oParagraphs[i].id).click is not a function plz give me any solutions... thanks in advance....
1
10,050,287
04/06/2012 23:18:03
745,919
05/09/2011 22:37:00
106
3
Android : why does native_start fails in startNavigating() on Android 2.3.1 emulator?
I am using Android 2.3.1 project to get a current location using LocationManager.GPS_PROVIDER. This is my code @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); LocationManager locManager = (LocationManager)this.getSystemService(Context.LOCATION_SERVICE); LocationListener locListener = new BTILocationListener(); locManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locListener); } public class BTILocationListener implements LocationListener { @Override public void onLocationChanged(Location loc) { Log.d("BTILocation", "Inside onLocationChanged() ---"); if (loc != null) { double latitude = loc.getLatitude(); double longitude = loc.getLongitude(); String locationstr = "Latitude = " + latitude + " longitude = " +longitude; Log.d("BTILocation", locationstr); } } @Override public void onProviderDisabled(String provider) { Toast.makeText(getApplicationContext(), "GPS Disabled", Toast.LENGTH_SHORT).show(); Log.w("BTILocation", "GPS is Disabled"); } @Override public void onProviderEnabled(String provider) { Toast.makeText(getApplicationContext(), "GPS Enabled", Toast.LENGTH_SHORT).show(); Log.w("BTILocation", "GPS is Enabled"); } @Override public void onStatusChanged(String provider, int status, Bundle extras) { // TODO Auto-generated method stub } } The permission set I use - <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission> I use open telnet connection telnet localhost 5544 geo fix 12 22 I see following errors on logcat - E/GpsLocationProvider( 75): native_start failed in startNavigating() The location object returned in onLocationChanged(location loc) is always null on 2.3.1. The same code works fine in Android 2.1 and 4.0. Please please help me solve this issue, I have tried google search but I couldn't find the solution anywhere. Thanks! I don't have Google APIs compatible with Android API level 7, does anyone know how I can download it?
java
android
android-emulator
geolocation
gps
null
open
Android : why does native_start fails in startNavigating() on Android 2.3.1 emulator? === I am using Android 2.3.1 project to get a current location using LocationManager.GPS_PROVIDER. This is my code @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); LocationManager locManager = (LocationManager)this.getSystemService(Context.LOCATION_SERVICE); LocationListener locListener = new BTILocationListener(); locManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locListener); } public class BTILocationListener implements LocationListener { @Override public void onLocationChanged(Location loc) { Log.d("BTILocation", "Inside onLocationChanged() ---"); if (loc != null) { double latitude = loc.getLatitude(); double longitude = loc.getLongitude(); String locationstr = "Latitude = " + latitude + " longitude = " +longitude; Log.d("BTILocation", locationstr); } } @Override public void onProviderDisabled(String provider) { Toast.makeText(getApplicationContext(), "GPS Disabled", Toast.LENGTH_SHORT).show(); Log.w("BTILocation", "GPS is Disabled"); } @Override public void onProviderEnabled(String provider) { Toast.makeText(getApplicationContext(), "GPS Enabled", Toast.LENGTH_SHORT).show(); Log.w("BTILocation", "GPS is Enabled"); } @Override public void onStatusChanged(String provider, int status, Bundle extras) { // TODO Auto-generated method stub } } The permission set I use - <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission> I use open telnet connection telnet localhost 5544 geo fix 12 22 I see following errors on logcat - E/GpsLocationProvider( 75): native_start failed in startNavigating() The location object returned in onLocationChanged(location loc) is always null on 2.3.1. The same code works fine in Android 2.1 and 4.0. Please please help me solve this issue, I have tried google search but I couldn't find the solution anywhere. Thanks! I don't have Google APIs compatible with Android API level 7, does anyone know how I can download it?
0
172,266
10/05/2008 16:51:12
21,785
09/24/2008 17:56:37
1
0
What are the best resources to starting learning Perl?
I want to start learning Perl from scratch and I need to find some good tutorials and books to begin with. I found [this tutorial][1] very helpful and I'm wondering if you guys know of some more useful resources to help me learn more about this language. [1]: http://www.comp.leeds.ac.uk/Perl/start.html
perl
tutorials
resources
null
null
04/18/2012 12:07:05
not constructive
What are the best resources to starting learning Perl? === I want to start learning Perl from scratch and I need to find some good tutorials and books to begin with. I found [this tutorial][1] very helpful and I'm wondering if you guys know of some more useful resources to help me learn more about this language. [1]: http://www.comp.leeds.ac.uk/Perl/start.html
4
5,921,418
05/07/2011 13:40:04
110,976
05/22/2009 09:20:53
1,370
14
Error on char array declaration in GCC 3.3.4
int main () { char b[100]; for(i = 0 to 10) scanf ("%c%*c", b[i]); } but am getting the error 'Format arguemnt is not a pointer' How can i declare an array to get all values form the user?
c++
c
gcc
gcc-warning
null
05/07/2011 18:33:08
not a real question
Error on char array declaration in GCC 3.3.4 === int main () { char b[100]; for(i = 0 to 10) scanf ("%c%*c", b[i]); } but am getting the error 'Format arguemnt is not a pointer' How can i declare an array to get all values form the user?
1
7,514,449
09/22/2011 12:04:13
427,907
08/22/2010 22:45:59
441
11
exponential growth over time - how do I calculate the increase over a delta-time?
This is probably a silly / stupid question, but I'm still gonna ask it : if I have an initial start value at Time 0 (which is in my case always 1.0) and a rate of growth, how do I figure out the increase between Time1 and Time2 ?
time
delta
exponential
growth
null
null
open
exponential growth over time - how do I calculate the increase over a delta-time? === This is probably a silly / stupid question, but I'm still gonna ask it : if I have an initial start value at Time 0 (which is in my case always 1.0) and a rate of growth, how do I figure out the increase between Time1 and Time2 ?
0
8,409,138
12/07/2011 01:00:00
1,061,354
11/23/2011 07:15:25
6
0
how to make a method that takes an array of integers and returns the avg number?
System.out.println(type integer); int 1 = kb.nextInt(); System.out.println(type integer); int 2 = kb.nextInt(); System.out.println(type integer); int 3 = kb.nextInt(); System.out.println(type integer); int 4 = kb.nextInt(); int [] integers = new int {1 + 2 + 3 + 4} System.out.println(integers / numberofinputs?); yeah i dont know how to divide the total sum by the amount of numbers inside the array.
java
eclipse
null
null
null
12/07/2011 04:20:16
not constructive
how to make a method that takes an array of integers and returns the avg number? === System.out.println(type integer); int 1 = kb.nextInt(); System.out.println(type integer); int 2 = kb.nextInt(); System.out.println(type integer); int 3 = kb.nextInt(); System.out.println(type integer); int 4 = kb.nextInt(); int [] integers = new int {1 + 2 + 3 + 4} System.out.println(integers / numberofinputs?); yeah i dont know how to divide the total sum by the amount of numbers inside the array.
4
10,175,204
04/16/2012 13:36:31
1,336,395
04/16/2012 13:21:44
1
0
sorting checkedlistbox iin .net 2.0
When right-clicks the cell origin at Datagridview in windows application it clears and fill the CheckedListBox with columns header text. Then it shows the popup.Now how can i sorting items using checked.i want to sort on same right click.
c#
.net
null
null
null
04/19/2012 11:54:36
not a real question
sorting checkedlistbox iin .net 2.0 === When right-clicks the cell origin at Datagridview in windows application it clears and fill the CheckedListBox with columns header text. Then it shows the popup.Now how can i sorting items using checked.i want to sort on same right click.
1
3,959,594
10/18/2010 13:24:22
455,592
09/22/2010 21:55:41
1
0
How to bind data coming from dataset to header in rdlc reports?
Expected: I need to get values coming from the dataset to put them in the header. I've done some work around: -Create textboxs in the body area, populate them with the correct values coming from dataset. Get the values from the Header like this: ReportItems!txtFromBody.Value No luck! The header is filled out with the correct information in the last page only. I thought maybe I can use parameters, not sure at this point. Need some help!!
rdlc
dynamic-rdlc-generation
null
null
null
null
open
How to bind data coming from dataset to header in rdlc reports? === Expected: I need to get values coming from the dataset to put them in the header. I've done some work around: -Create textboxs in the body area, populate them with the correct values coming from dataset. Get the values from the Header like this: ReportItems!txtFromBody.Value No luck! The header is filled out with the correct information in the last page only. I thought maybe I can use parameters, not sure at this point. Need some help!!
0
7,495,440
09/21/2011 06:30:29
921,420
08/31/2011 10:54:59
61
0
Sqlite couldnt show the currect current time
I have set my time as US Locale.I have made database in Sqlite.In database i have fields like Entry_Date which set as CURRENT_TIMESTAMP..Now i run query like SELECT time('now') o/p: 06:22:09 It display wrong time.so my question is How do i set the Sqlite time?
iphone
objective-c
xcode
null
null
null
open
Sqlite couldnt show the currect current time === I have set my time as US Locale.I have made database in Sqlite.In database i have fields like Entry_Date which set as CURRENT_TIMESTAMP..Now i run query like SELECT time('now') o/p: 06:22:09 It display wrong time.so my question is How do i set the Sqlite time?
0
8,274,816
11/25/2011 22:35:09
979,375
10/04/2011 21:49:15
1
0
new app in facebook, need´s aproval?
I´m a developer from mexico. I´m programming a app in facebook. My code is ready but i don´t know if my app needs to be approval or something like that.
facebook
application
null
null
null
12/01/2011 22:22:37
not a real question
new app in facebook, need´s aproval? === I´m a developer from mexico. I´m programming a app in facebook. My code is ready but i don´t know if my app needs to be approval or something like that.
1