Daily Archives

Articles indexed Monday June 14 2010

Page 2/108 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • setup proxy app.config in .net

    - by acidzombie24
    I am having much problems setting up the proxy through app.config. I want 2 ip address to go through my proxy on my local computer. From what i can tell i need to set a proxy then set a bypass list. So i figure .* will match everything and i'll just remove the two i want. So i wrote the below and the 2 ip address (i realize the 2nd is a range) is being bypassed. Maybe i need to more the add to the end? the address are still being bypassed. How do i change this so all websites do not go to my proxy and the two ip do? <system.net> <defaultProxy> <proxy proxyaddress="http://127.0.0.1" /> <bypasslist> <remove address="209\.62\.36\.21" /> <remove address="72\.21\.\d{1,3}\.\d{1,3}" /> <add address=".*" /> </bypasslist> </defaultProxy> </system.net>

    Read the article

  • How to use Client Application Services with WCF?

    - by Adabada
    Howdy, I followed these two tutorial to get Client Application services working using WCF instead of the traditional web services project: http://msdn.microsoft.com/en-us/library/bb398990.aspx http://msdn.microsoft.com/en-us/library/bb546195.aspx But when configuring the winforms project services tab with the wcf services location, the generated code in app.config points to a "Authentication_JSON_AppService.axd" service uri that doesn't exist. How can I use Client Application Services using WCF as the "transport" and still use the services tab to configure the settings on the client windows application? Thanks

    Read the article

  • Why does this compile?

    - by akf
    I was taken aback earlier today when debugging some code to find that something like the following does not throw a compile-time exception: public Test () { HashMap map = (HashMap) getList(); } private List getList(){ return new ArrayList(); } As you can imagine, a ClassCastException is thrown at runtime, but can someone explain why the casting of a List to a HashMap is considered legal at compile time?

    Read the article

  • Storing script files outside web root

    - by memilanuk
    I've seen recommendations to store some or all php include files some place other than in the web document root directory (username/public_html in my case) for the specific reason of protecting php files with sensitive information (like database connection and login info) in the event that the web server hiccups and stops protecting php files and they become 'visible' to outsiders who know where to look. It seems somewhat paranoid to me, but I'm guessing people have gotten burned badly on this before so I'm willing to go along. The suggestion usually takes the form of having the include files in something like '../include_files/' so its not directly in the document root and not directly accessible to outsiders through the web server. My question is this: is there a significant difference in security between that way and just putting your 'include_files' directory under the document root and sticking an .htaccess file in there (with the appropriate entries)? Would putting an .htaccess file in '../include_files/' make any significant improvement there? TIA, Monte

    Read the article

  • Rendering spatial data of GeoQuerySet in a custom view on GeoDjango

    - by dmytro
    Hello. I have just started my first project on GeoDjango. As a matter of fact, with GeoDjango powered Admin application we all have a great possibility to view/edit spatial data, associated with the current object. The problem is that after the objects having been populated I need to render several objects' associated geometry at once on a single map. I might implement it as a model action, redirecting to a custom view. I just don't know, how to include the OpenLayers widget in the view and how to render there my compound geometry from my GeoQuerySet. I would be very thankful for any hint from an experienced GeoDjango programmer.

    Read the article

  • Joomla - Joomfish Error Blank index.php

    - by Ivan Slaughter
    I have joomla error since installing multilanguage with joomfish. I'm using Joomla 1.5.11 and Joomfish 2.0.4. Resulting a blank page. How to trace error? since using joomla default error reporting doesn't work. still blank page with nothing. Please help, cause i can't figure out the error?

    Read the article

  • how to set a fixed color bar for pcolor in python matplotlib?

    - by user248237
    I am using pcolor with a custom color map to plot a matrix of values. I set my color map so that low values are white and high values are red, as shown below. All of my matrices have values between 0 and 20 (inclusive) and I'd like 20 to always be pure red and 0 to always be pure white, even if the matrix has values that don't span the entire range. For example, if my matrix only has values between 2 and 7, I don't want it to plot 2 as white and 7 as red, but rather color it as if the range is still 0 to 20. How can I do this? I tried using the "ticks=" option of colorbar but it did not work. Here is my current code (assume "my_matrix" contains the values to be plotted): cdict = {'red': ((0.0, 1.0, 1.0), (0.5, 1.0, 1.0), (1.0, 1.0, 1.0)), 'green': ((0.0, 1.0, 1.0), (0.5, 1.0, 1.0), (1.0, 0.0, 0.0)), 'blue': ((0.0, 1.0, 1.0), (0.5, 1.0, 1.0), (1.0, 0.0, 0.0))} my_cmap = matplotlib.colors.LinearSegmentedColormap('my_colormap', cdict, 256) colored_matrix = plt.pcolor(my_matrix, cmap=my_cmap) plt.colorbar(colored_matrix, ticks=[0, 5, 10, 15, 20]) any idea how I can fix this to get the right result? thanks very much.

    Read the article

  • Binding DataTemplates (or another aproach)

    - by Bataglião
    Hi all, I'm having some troubles trying to dynamically generate content in WPF and after it bind data. I have the following scenario: TabControl - Dynamically generated TabItems through DataTemplate - inside TabItems, I have dynamic content generated by DataTemplate that I wish to bind (ListBox). The code follows: ::TabControl <TabControl Height="252" HorizontalAlignment="Left" Name="tabControl1" VerticalAlignment="Top" Width="458" Margin="12,12,12,12" ContentTemplate="{StaticResource tabItemContent}"></TabControl> ::The Template for TabControl to generate TabItems <DataTemplate x:Key="tabItemContent"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="*" /> </Grid.RowDefinitions> <ListBox ItemTemplate="{StaticResource listBoxContent}" ItemsSource="{Binding}"> </ListBox> </Grid> </DataTemplate> ::The template for ListBox Inside each TabItem <DataTemplate x:Key="listBoxContent"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="22"/> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <Image Grid.Column="0" Source="{Binding Path=PluginIcon}" /> <TextBlock Grid.Column="1" Text="{Binding Path=Text}" /> </Grid> </DataTemplate> So, when I try to do this on code inside a loop to create the tabitems: TabItem tabitem = tabControl1.Items[catIndex] as TabItem; tabitem.DataContext = plugins.ToList(); where 'plugins' is an Enumerable The ListBox is not bounded. I tried also to find the ListBox inside the TabItem to set the ItemSource property but no success at all. Someone have an idea on how to do that? Thanks in advance.

    Read the article

  • Permissions done on MySQL side or PHP side?

    - by Kerry
    When I am grabbing data from my table that require permissions, should all the permission be done there? Such as checking for an admin or if they can view the data (in MySQL)? Or should I grab it if they have a record at all, then check the specific actions (such as view, add, edit, delete) on the PHP side?

    Read the article

  • How to give alternating table rows different background colors using PHP

    - by Sam
    I have a table of data that is generated dynamically based on the contents stored in a mysql database. This is how my code looks: <table border="1"> <tr> <th>Name</th> <th>Description</th> <th>URL</th> </tr> <?php $query = mysql_query("SELECT * FROM categories"); while ($row = mysql_fetch_assoc($query)) { $catName = $row['name']; $catDes = $row['description']; $catUrl = $row['url']; echo "<tr class=''>"; echo "<td>$catName</td>"; echo "<td>$catDes</td>"; echo "<td>$catUrl</td>"; echo "</tr>"; } ?> </table> Now if the table was static, then I would just assign each alternating table row one of 2 styles in repeated order: .whiteBackground { background-color: #fff; } .grayBackground { background-color: #ccc; } and that would be the end of that. However since the table rows are dynamically generated, how can I achieve this?

    Read the article

  • android widget unresponsive

    - by John
    I have a widget that you press and it then it will update the text on the widget. I have set an on click listener to launch another activity to perform the text update, But for some reason it only works temporarily and then it will become unresponsive and not do anything when pressed. Does anyone know why it might be doing that? i have posted my widget code below in case it is helpful. @Override public void onUpdate(Context context, AppWidgetManager appWidgetManager,int[] appWidgetIds) { thisWidget = new ComponentName(context, MemWidget.class); Intent intent = new Intent(context, updatewidget.class); PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0); // Get the layout for the App Widget and attach an on-click listener to the button RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget); views.setOnClickPendingIntent(R.id.ImageButton01, pendingIntent); // Tell the AppWidgetManager to perform an update on the current App Widget appWidgetManager.updateAppWidget(thisWidget, views); } @Override public void onReceive(Context context, Intent intent) { appWidgetManager = AppWidgetManager.getInstance(context); remoteViews = new RemoteViews(context.getPackageName(), R.layout.widget); thisWidget = new ComponentName(context, MemWidget.class); // v1.5 fix that doesn't call onDelete Action final String action = intent.getAction(); if (AppWidgetManager.ACTION_APPWIDGET_DELETED.equals(action)) { final int appWidgetId = intent.getExtras().getInt( AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID); if (appWidgetId != AppWidgetManager.INVALID_APPWIDGET_ID) { this.onDeleted(context, new int[] { appWidgetId }); } } else { super.onReceive(context, intent); } }

    Read the article

  • How do I check if selected value of the ListBox is not selected in C#?

    - by Sahat
    This code will display the selected value from the listbox. E.g. if I sellect Item 1 I will get the following output: You have selected Item 1. Label1.Text = "You have selected " + DropDownList1.SelectedValue + "<br />"; But if I don't select anything and click on Submit button, I will get: You have selected What would I need to make it display "You have not selected anything. Please select at least 1 item." UPDATE: I am using ASP.NET WebForms.

    Read the article

  • Get updated size of QGraphicsView

    - by onurozcelik
    Hi, In my Qt Application I am dynamically creating QGraphicsView(s) and adding them inside a QGridLayout. When I add first view inside grid, the view covers all the available space inside grid. Then I add second view and there are now two equally sized views inside grid. Then I add third view and there are now three equally sized views inside grid. And so on. How can I get updated size of first view? Below is my trial but I think this is not working. //Definition of viewsPerRow static const int viewsPerRow = 3; void window::newViewRequested() { QGraphicsView *view = new QGraphicsView; view->setVisible(true); viewVector.push_back(view); for(int i = viewGrid->count(); i < viewVector.count(); i++) { viewGrid->addWidget(view,i / viewsPerRow ,i % viewsPerRow); } qDebug()<<viewGrid->cellRect(0,0); }

    Read the article

  • How to make django test framework read from live database?

    - by lfborjas
    I realize there's a similar question here, but this one has a different approach: I have a django app that does queries over data indexed with djapian ; I'd like to write unit tests for this app's search component, and, obviously, I'd need the django settings module and all connections with the database active, so the test runner that django provides seems ideal. however, the django testing framework creates a dummy database and I'd hate to dump all my data to a fixture and then index it (the tests would take forever!); My data isn't at risk because the tests would only read from the database, so, how could this be achieved? -I'm new at this whole unit testing thing, so the solution of writing a new test runner I read in that similar question doesn't enlighten me a bit, at least not without some details

    Read the article

  • Download databasename.bak file

    - by Jordon
    I have downloaded databasename.bak file from my hosting company, when i tried to restore that DB file in SQL server 2008 it is keep on giving me following error. The media family on device 'C:\go4sharepoint_1384_8481.bak' is incorrectly formed. SQL Server cannot process this media family. RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3241) According to this error and from following link http://www.sqlcoffee.com/Troubleshooting047.htm It is clear that either file i am downloading is corrupt or it is getting corrupted on the way? Any idea, why I am keep on receiving this error? I tried almost all ways but unable to fix this problem, please help me.

    Read the article

  • How to run sandboxed web browser with extensions

    - by Nrew
    I followed the steps here on how to create a sandboxed web browser using Sandboxie. So that you won't have to right-click a shortcut everytime and choose run sandboxed. And so that I could set a keyboard shortcut for the sandboxed web browser. I am using Iron browser, but when I try to execute the shortcut created by sandboxie. It doesn't have extensions in it. What do I do in order to load the extensions along with the browser

    Read the article

  • Best way to collect and store data daily?

    - by mktb
    I have a bunch of statistics: # of users, # of families, ratio user/family, etc. I'd like to store these daily so I can view this data historically. However, I'm looking for the most effective way to store this data. Should I run a cron job that writes to the database DATE: today USERS: 123 FAMILIES: 456 RATIO: 7.89 or whatever? (or should I write multiple rows like DATE: today DATATYPE: users VALUE: 123?) Or is there another option I can use that is more efficient or more effective? Thanks!

    Read the article

  • serial port does not exist in current context: c#

    - by I__
    here's the code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Threading; namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } public class ThreadWork { private static SerialPort serialPort1; public static void DoWork() { serialPort1.Open(); serialPort1.Write("AT+CMGF=1\r\n"); //Thread.Sleep(500); serialPort1.Write("AT+CNMI=2,2\r\n"); //Thread.Sleep(500); serialPort1.Write("AT+CSCA=\"+4790002100\"\r\n"); //Thread.Sleep(500); serialPort1.DataReceived += serialPort1_DataReceived_1; } } private void Form1_Load(object sender, EventArgs e) { ThreadStart myThreadDelegate = new ThreadStart(ThreadWork.DoWork); Thread myThread = new Thread(myThreadDelegate); myThread.Start(); } private void serialPort1_DataReceived_1(object sender, System.IO.Ports.SerialDataReceivedEventArgs e) { string response = serialPort1.ReadLine(); this.BeginInvoke(new MethodInvoker(() => textBox1.AppendText(response + "\r\n"))); } } } and i get an error on this line: string response = serialPort1.ReadLine(); it says:: Error 1 The name 'serialPort1' does not exist in the current context C:\Users\alexluvsdanielle\AppData\Local\Temporary Projects\WindowsFormsApplication1\Form1.cs 44 31 WindowsFormsApplication1 what am i doing wrong?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >