Search Results

Search found 4981 results on 200 pages for 'dean mark anthony'.

Page 15/200 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • How to check a SQL database table to see if a record exists

    - by Anthony
    I have a SQL database that creates a record for every document uploaded by the user to the server. I want to check this table before a user uploads a document to ensure they don't upload a file with name that already exists. I know how to make the connection and make the SqlCommand to query the table for an existing record. But I don't know how to check the record count from the sqlCommand I made. Does that make sense? Using myConnectionCheck As New SqlConnection(myConnectionStringCheck) Dim myCommandCheck As New SqlCommand() myCommandCheck.Connection = myConnectionCheck myCommandCheck.CommandText = "SELECT * FROM Req_Docs WHERE Doc_Name =" & DocName myConnectionCheck.Open() myCommandCheck.ExecuteNonQuery() End Using Thanks in advance, Anthony

    Read the article

  • asp.net: Is it possible to have multiple login forms to access different subfolders?

    - by Anthony
    Hi, Is it possible to have multiple login pages for different folders within an asp.net application? Say I have this structure: /admin /customer /login-admin.aspx /login-customer.aspx I have 2 different login forms. One for the admin people and one for the customers (the forms are different as the customers need to provide extra information on their login page). In the authentication section of the webconfig file (which is at the root of the web app), I can only specify one Login page. So how can I make sure thaf if anyone tries to access a webpage in /admin they will be redirected to /login-admin.aspx and if they try to access a webpage in /customer they will be redirected to /login-customer.aspx ? Thanks, Anthony

    Read the article

  • Flex Mobile : How to skin view?

    - by Anthony
    I would like to know if it's possible to skin view for my Flex mobile application : My ActivityView.as public class ActivityView extends View My ActivityViewSkin.mxml (It skin associated) <?xml version="1.0" encoding="utf-8"?> <s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"> <fx:Metadata> [HostComponent("com.corp.views.activity.ActivityView")] ... It's a good way for mobile development ? And how can I use this in this skin : <s:navigationContent> Thank you very much ! Anthony

    Read the article

  • Multimedia files written over WAN are getting truncated

    - by Dean
    I use the windows Multimedia API to create .wav files. 1. Open file with mmsioOpen 2. Creates WAVE,frm and data chunks using mmioCreateChunk 3. Write audio data using mmioWrite 4. Ascend out of the chunks using mmioAscend 5. Close file using mmioClose The file is being written into a temporary location, so after it has been closed it gets copied to another location using the CopyFile. This program is written in C++ and works great until the file it is writing resides over a WAN in a different city or country. The end result is a wav file that should be 20-30 seconds long ends up being 4 secodns long. It is always the last bit that is missing, so when you play it back it just stops before then of the recording. I initially thought that maybe I was copying the file too soon so as a test I put in a pause of 30 seconds after closing the file using Sleep(30000), but this made no difference to either it being truncated or by how much. I have modified the program to write to a file in parrallel using CreateFile and WriteFile, and the result is the same, so it is not an issue specifically with the mmio API's. Does anyone have any ideas why this is happening and if there is a work-around to it? I suspect that I may end up having the temporary location on the local drive, but this is quite a big change to the application as well as existing deployments. thanks for everyones time Dean

    Read the article

  • Problem Displaying XML in Grid View-newbie

    - by Dean
    I am trying to do something in VisualWebDev 2008 Express that I thought would be simple, but it is not working. I want to display data from an XML file so I added the XMLDataSource to my page, pointed it to the XML file, and then added the GridView and connected it to the datasource. I am getting the following error: GridView - GridView1There was an error rendering the control. The data source for GridView with id 'GridView1' did not have any properties or attributes from which to generate columns. Ensure that your data source has content. Could someone please tell me what I might be doing wrong, TIA Dean A smippet from my XML is as follows: 6019 - Renaissance MS - New School Renaissance MS 7155 Hall Road Fairburn, GA 30213 NS-6019200-LA-01 New School Close-out NS-6019200 0.000000000000000e+000 The construction of the new Renaissance MS will be at the intersection of Jones/Hall Road, in the districts 7th & 9F and Land Lots 117, 143 & 146 of Fulton County, GA. The work includes the construction of the 180,500 square foot building that will house 34 standard classrooms, 12 standard science labs, 20 special purpose classrooms, cafeteria and litchen, gymnasium, media center and administrative offices. The site will also have multi-purpose playfields with track, softball field, tennis courts and basketball/volleyball court. Terry O'Brien Parsons Stevens Wilkinson Stang Newdow Barton Malow -84.62242 33.61497

    Read the article

  • Using HABTM relationships in cakephp plugins with unique set to false

    - by Dean
    I am working on a plugin for our CakePHP CMS that will handle blogs. When getting to the tags I needed to set the HABTM relationship to unique = false to be able add tags to a post without having to reset them all. The BlogPost model looks like this class BlogPost extends AppModel { var $name = 'BlogPost'; var $actsAs = array('Core.WhoDidIt', 'Containable'); var $hasMany = array('Blog.BlogPostComment'); var $hasAndBelongsToMany = array('Blog.BlogTag' => array('unique' => false), 'Blog.BlogCategory'); } The BlogTag model looks like this class BlogTag extends AppModel { var $name = 'BlogTag'; var $actsAs = array('Containable'); var $hasAndBelongsToMany = array('Blog.BlogPost'); } The SQL error I am getting when I have the unique = true setting in the HABTM relationship between the BlogPost and BlogTag is Query: SELECT `Blog`.`BlogTag`.`id`, `Blog`.`BlogTag`.`name`, `Blog`.`BlogTag`.`slug`, `Blog`.`BlogTag`.`created_by`, `Blog`.`BlogTag`.`modified_by`, `Blog`.`BlogTag`.`created`, `Blog`.`BlogTag`.`modified`, `BlogPostsBlogTag`.`blog_post_id`, `BlogPostsBlogTag`.`blog_tag_id` FROM `blog_tags` AS `Blog`.`BlogTag` JOIN `blog_posts_blog_tags` AS `BlogPostsBlogTag` ON (`BlogPostsBlogTag`.`blog_post_id` = 4 AND `BlogPostsBlogTag`.`blog_tag_id` = `Blog`.`BlogTag`.`id`) As you can see it is trying to set the blog_tags table to 'Blog'.'BlogTag. which isn't a valid MySQL name. When I remove the unique = true from the relationship it all works find and I can save one tag but when adding another it just erases the first one and puts the new one in its place. Does anyone have any ideas? is it a bug or am I just missing something? Cheers, Dean

    Read the article

  • PeopleSoft Upgrades, Fusion, & BI for Leading European PeopleSoft Applications Customers

    - by Mark Rosenberg
    With so many industry-leading services firms around the globe managing their businesses with PeopleSoft, it’s always an adventure setting up times and meetings for us to keep in touch with them, especially those outside of North America who often do not get to join us at Oracle OpenWorld. Fortunately, during the first two weeks of May, Nigel Woodland (Oracle’s Service Industries Director for the EMEA region) and I successfully blocked off our calendars to visit seven different customers spanning four countries in Western Europe. We met executives and leaders at four Staffing industry firms, two Professional Services firms that engage in consulting and auditing, and a Financial Services firm. As we shared the latest information regarding product capabilities and plans, we also gained valuable insight into the hot technology topics facing these businesses. What we heard was both informative and inspiring, and I suspect other Oracle PeopleSoft applications customers can benefit from one or more of the following observations from our trip. Great IT Plans Get Executed When You Respect the Users Each of our visits followed roughly the same pattern. After introductions, Nigel outlined Oracle’s product and technology strategy, including a discussion of how we at Oracle invest in each layer of the “technology stack” to provide customers with unprecedented business management capabilities and choice. Then, I provided the specifics of the PeopleSoft product line’s investment strategy, detailing the dramatic number of rich usability and functionality enhancements added to release 9.1 since its general availability in 2009 and the game-changing capabilities slated for 9.2. What was most exciting about each of these discussions was that shortly after my talking about what customers can do with release 9.1 right now to drive up user productivity and satisfaction, I saw the wheels turning in the minds of our audiences. Business analyst and end user-configurable tools and technologies, such as WorkCenters and the Related Action Framework, that provide the ability to tailor a “central command center” to the exact needs of each recruiter, biller, and every other role in the organization were exactly what each of our customers had been looking for. Every one of our audiences agreed that these tools which demonstrate a respect for the user would finally help IT pole vault over the wall of resistance that users had often raised in the past. With these new user-focused capabilities, IT is positioned to definitively partner with the business, instead of drag the business along, to unlock the value of their investment in PeopleSoft. This topic of respecting the user emerged during our very first visit, which was at Vital Services Group at their Head Office “The Mill” in Manchester, England. (If you are a student of architecture and are ever in Manchester, you should stop in to see this amazingly renovated old mill building.) I had just finished explaining our PeopleSoft 9.2 roadmap, and Mike Code, PeopleSoft Systems Manager for this innovative staffing company, said, “Mark, the new features you’ve shown us in 9.1/9.2 are very relevant to our business. As we forge ahead with the 9.1 upgrade, the ability to configure a targeted user interface with WorkCenters, Related Actions, Pivot Grids, and Alerts will enable us to satisfy the business that this upgrade is for them and will deliver tangible benefits. In fact, you’ve highlighted that we need to start talking to the business to keep up the momentum to start reviewing the 9.2 upgrade after we get to 9.1, because as much as 9.1 and PeopleTools 8.52 offers, what you’ve shown us for 9.2 is what we’ve envisioned was ultimately possible with our investment in PeopleSoft applications.” We also received valuable feedback about our investment for the Staffing industry when we visited with Hans Wanders, CIO of Randstad (the second largest Staffing company in the world) in the Netherlands. After our visit, Hans noted, “It was very interesting to see how the PeopleSoft applications have developed. I was truly impressed by many of the new developments.” Hans and Mike, sincere thanks for the validation that our team’s hard work and dedication to “respecting the users” is worth the effort! Co-existence of PeopleSoft and Fusion Applications Just Makes Sense As a “product person,” one of the most rewarding things about visiting customers is that they actually want to talk to me. Sometimes, they want to discuss a product area that we need to enhance; other times, they are interested in learning how to extract more value from their applications; and still others, they want to tell me how they are using the applications to drive real value for the business. During this trip, I was very pleased to hear that several of our customers not only thought the co-existence of Fusion applications alongside PeopleSoft applications made sense in theory, but also that they were aggressively looking at how to deploy one or more Fusion applications alongside their PeopleSoft HCM and FSCM applications. The most common deployment plan in the works by three of the organizations is to upgrade to PeopleSoft 9.1 or 9.2, and then adopt one of the new Fusion HCM applications, such as Fusion Performance Management or the full suite of  Fusion Talent Management. For example, during an applications upgrade planning discussion with the staffing company Hays plc., Mark Thomas, who is Hays’ UK IT Director, commented, “We are very excited about where we can go with the latest versions of the PeopleSoft applications in conjunction with Fusion Talent Management.” Needless to say, this news was very encouraging, because it reiterated that our applications investment strategy makes good business sense for our customers. Next Generation Business Intelligence Is the Key to the Future The third, and perhaps most exciting, lesson I learned during this journey is that our audiences already know that the latest generation of Business Intelligence technologies will be the “secret sauce” for organizations to transform business in radical ways. While a number of the organizations we visited on the trip have deployed or are deploying Oracle Business Intelligence Enterprise Edition and the associated analytics applications to provide dashboards of easy-to-understand, user-configurable metrics that help optimize business performance according to current operating procedures, what’s most exciting to them is being able to use Business Intelligence to change the way an organization does business, grows revenue, and makes a profit. In particular, several executives we met asked whether we can help them minimize the need to have perfectly structured data and at the same time generate analytics that improve order fulfillment decision-making. To them, the path to future growth lies in having the ability to analyze unstructured data rapidly and intuitively and leveraging technology’s ability to detect patterns that a human cannot reasonably be expected to see. For illustrative purposes, here is a good example of a business problem where analyzing a combination of structured and unstructured data can produce better results. If you have a resource manager trying to decide which person would be the best fit for an assignment in terms of ensuring (a) client satisfaction, (b) the individual’s satisfaction with the work, (c) least travel distance, and (d) highest margin, you traditionally compare resource qualifications to assignment needs, calculate margins on past work with the client, and measure distances. To perform these comparisons, you are likely to need the organization to have profiles setup, people ranked against profiles, margin targets setup, margins measured, distances setup, distances measured, and more. As you can imagine, this requires organizations to plan and implement data setup, capture, and quality management initiatives to ensure that dependable information is available to support resourcing analysis and decisions. In the fast-paced, tight-budget world in which most organizations operate today, the effort and discipline required to maintain high-quality, structured data like those described in the above example are certainly not desirable and in some cases are not feasible. You can imagine how intrigued our audiences were when I informed them that we are ready to help them analyze volumes of unstructured data, detect trends, and produce recommendations. Our discussions delved into examples of how the firms could leverage Oracle’s Secure Enterprise Search and Endeca technologies to keyword search against, compare, and learn from unstructured resource and assignment data. We also considered examples of how they could employ Oracle Real-Time Decisions to generate statistically significant recommendations based on similar resourcing scenarios that have produced the desired satisfaction and profit margin results. --- Although I had almost no time for sight-seeing during this trip to Europe, I have to say that it may have been one of the most energizing and engaging trips of my career. Showing these dedicated customers how they can give every user a uniquely tailored set of tools and address business problems in ways that have to date been impossible made the journey across the Atlantic more than worth it. If any of these three topics intrigue you, I’d recommend you contact your Oracle applications representative to arrange for more detailed discussions with the appropriate members of our organization.

    Read the article

  • SQL Server Transaction Marks: Restoring multiple databases to a common relative point

    - by Mladen Prajdic
    We’re all familiar with the ability to restore a database to point in time using the RESTORE WITH STOPAT statement. But what if we have multiple databases that are accessed from one application or are modifying each other? And over multiple instances? And all databases have different workloads? And we want to restore all of the databases to some known common relative point? The catch here is that this common relative point isn’t the same point in time for all databases. This common relative point in time might be now in DB1, now-1 hour in DB2 and yesterday in DB3. And we don’t know the exact times. Let me introduce you to Transaction Marks. When we run a marked transaction using the WITH MARK option a flag is set in the transaction log and a row is added to msdb..logmarkhistory table. When restoring a transaction log backup we can restore to either before or after that marked transaction. The best thing is that we don’t even need to have one database modifying another database. All we have to do is use a marked transaction with the same name in different database. Let’s see how this works with an example. The code comments say what’s going on. USE master GOCREATE DATABASE TestTxMark1GOUSE TestTxMark1GOCREATE TABLE TestTable1( ID INT, VALUE UNIQUEIDENTIFIER) -- insert some data into the table so we can have a starting pointINSERT INTO TestTable1SELECT ROW_NUMBER() OVER(ORDER BY number) AS RN, NULLFROM master..spt_valuesORDER BY RNSELECT *FROM TestTable1GO-- TAKE A FULL BACKUP of the databseBACKUP DATABASE TestTxMark1 TO DISK = 'c:\TestTxMark1.bak'GO USE master GOCREATE DATABASE TestTxMark2GOUSE TestTxMark2GOCREATE TABLE TestTable2( ID INT, VALUE UNIQUEIDENTIFIER)-- insert some data into the table so we can have a starting pointINSERT INTO TestTable2SELECT ROW_NUMBER() OVER(ORDER BY number) AS RN, NEWID()FROM master..spt_valuesORDER BY RNSELECT *FROM TestTable2GO-- TAKE A FULL BACKUP of our databseBACKUP DATABASE TestTxMark2 TO DISK = 'c:\TestTxMark2.bak'GO -- start a marked transaction that modifies both databasesBEGIN TRAN TxDb WITH MARK -- update values from NULL to random value UPDATE TestTable1 SET VALUE = NEWID(); -- update first 100 values from random value -- to NULL in different DB UPDATE TestTxMark2.dbo.TestTable2 SET VALUE = NULL WHERE ID <= 100;COMMITGO     -- some time goes by here -- with various database activity... -- We see two entries for marks in each database. -- This is just informational and has no bearing on the restore itself.SELECT * FROM msdb..logmarkhistory USE masterGO-- create a log backup to restore to mark pointBACKUP LOG TestTxMark1 TO DISK = 'c:\TestTxMark1.trn'GO-- drop the database so we can restore it backDROP DATABASE TestTxMark1GO USE masterGO-- create a log backup to restore to mark pointBACKUP LOG TestTxMark2 TO DISK = 'c:\TestTxMark2.trn'GO-- drop the database so we can restore it backDROP DATABASE TestTxMark2GO -- RESTORE THE DATABASE BACK BEFORE OUR TRANSACTION-- restore the full backup RESTORE DATABASE TestTxMark1 FROM DISK = 'c:\TestTxMark1.bak' WITH NORECOVERY;-- restore the log backup to the transaction markRESTORE LOG TestTxMark1 FROM DISK = 'c:\TestTxMark1.trn' WITH RECOVERY, -- recover to state before the transaction STOPBEFOREMARK = 'TxDb'; -- recover to state after the transaction -- STOPATMARK = 'TxDb';GO -- RESTORE THE DATABASE BACK BEFORE OUR TRANSACTION-- restore the full backup RESTORE DATABASE TestTxMark2 FROM DISK = 'c:\TestTxMark2.bak' WITH NORECOVERY;-- restore the log backup to the transaction markRESTORE LOG TestTxMark2 FROM DISK = 'c:\TestTxMark2.trn' WITH RECOVERY, -- recover to state before the transaction STOPBEFOREMARK = 'TxDb'; -- recover to state after the transaction -- STOPATMARK = 'TxDb';GO USE TestTxMark1-- we restored to time before the transaction -- so we have NULL values in our tableSELECT * FROM TestTable1 USE TestTxMark2-- we restored to time before the transaction -- so we DON'T have NULL values in our tableSELECT * FROM TestTable2   Transaction marks can be used like a crude sync mechanism for cross database operations. With them we can mark our databases with a common “restore to” point so we know we have a valid state between all databases to restore to.

    Read the article

  • Dependency Injection Introduction

    - by MarkPearl
    I recently was going over a great book called “Dependency Injection in .Net” by Mark Seeman. So far I have really enjoyed the book and would recommend anyone looking to get into DI to give it a read. Today I thought I would blog about the first example Mark gives in his book to illustrate some of the benefits that DI provides. The ones he lists are Late binding Extensibility Parallel Development Maintainability Testability To illustrate some of these benefits he gives a HelloWorld example using DI that illustrates some of the basic principles. It goes something like this… class Program { static void Main(string[] args) { var writer = new ConsoleMessageWriter(); var salutation = new Salutation(writer); salutation.Exclaim(); Console.ReadLine(); } } public interface IMessageWriter { void Write(string message); } public class ConsoleMessageWriter : IMessageWriter { public void Write(string message) { Console.WriteLine(message); } } public class Salutation { private readonly IMessageWriter _writer; public Salutation(IMessageWriter writer) { _writer = writer; } public void Exclaim() { _writer.Write("Hello World"); } }   If you had asked me a few years ago if I had thought this was a good approach to solving the HelloWorld problem I would have resounded “No”. How could the above be better than the following…. class Program { static void Main(string[] args) { Console.WriteLine("Hello World"); Console.ReadLine(); } }  Today, my mind-set has changed because of the pain of past programs. So often we can look at a small snippet of code and make judgements when we need to keep in mind that we will most probably be implementing these patterns in projects with hundreds of thousands of lines of code and in projects that we have tests that we don’t want to break and that’s where the first solution outshines the latter. Let’s see if the first example achieves some of the outcomes that were listed as benefits of DI. Could I test the first solution easily? Yes… We could write something like the following using NUnit and RhinoMocks… [TestFixture] public class SalutationTests { [Test] public void ExclaimWillWriteCorrectMessageToMessageWriter() { var writerMock = MockRepository.GenerateMock<IMessageWriter>(); var sut = new Salutation(writerMock); sut.Exclaim(); writerMock.AssertWasCalled(x => x.Write("Hello World")); } }   This would test the existing code fine. Let’s say we then wanted to extend the original solution so that we had a secure message writer. We could write a class like the following… public class SecureMessageWriter : IMessageWriter { private readonly IMessageWriter _writer; private readonly string _secretPassword; public SecureMessageWriter(IMessageWriter writer, string secretPassword) { _writer = writer; _secretPassword = secretPassword; } public void Write(string message) { if (_secretPassword == "Mark") { _writer.Write(message); } else { _writer.Write("Unauthenticated"); } } }   And then extend our implementation of the program as follows… class Program { static void Main(string[] args) { var writer = new SecureMessageWriter(new ConsoleMessageWriter(), "Mark"); var salutation = new Salutation(writer); salutation.Exclaim(); Console.ReadLine(); } }   Our application has now been successfully extended and yet we did very little code change. In addition, our existing tests did not break and we would just need add tests for the extended functionality. Would this approach allow parallel development? Well, I am in two camps on parallel development but with some planning ahead of time it would allow for it as you would simply need to decide on the interface signature and could then have teams develop different sections programming to that interface. So,this was really just a quick intro to some of the basic concepts of DI that Mark introduces very successfully in his book. I am hoping to blog about this further as I continue through the book to list some of the more complex implementations of containers.

    Read the article

  • Codeigniter benchmarking, where are these ms coming from?

    - by ropstah
    I'm in the process of benchmarking my website. class Home extends Controller { function Home() { parent::Controller(); $this->benchmark->mark('Constructor_start'); $this->output->enable_profiler(TRUE); $this->load->library ('MasterPage'); $this->benchmark->mark('Constructor_end'); } function index() { $this->benchmark->mark('Index_start'); $this->masterpage->setMasterPage('master/home'); $this->masterpage->addContent('home/index', 'page'); $this->masterpage->show(); $this->benchmark->mark('Index_start'); } } These are the results: Loading Time Base Classes: 0.0076 Constructor: 0.0007 Index: 0.0440 Controller Execution Time ( Home/ Index ): 0.4467 Total Execution Time: 0.4545` I understand the following: Loading Time Base Classes (0.0076) Constructor (0.0007) Index (0.0440) But where is the rest of the time coming from?

    Read the article

  • how to add annotation to map in xcode

    - by somu
    hai to all... i am trying to mark some places on map from xcode(iphone app) but now i can mark the only 1 place at a time ..i want to mark the so many places at a time with titles for them could any one help me its urgent thanks

    Read the article

  • C# Printing Properties

    - by Mark
    I have a class like this with a bunch of properties: class ClassName { string Name {get; set;} int Age {get; set;} DateTime BirthDate {get; set;} } I would like to print the name of the property and it's value using the value's ToString() method and the Property's name like this: ClassName cn = new ClassName() {Name = "Mark", Age = 428, BirthData = DateTime.Now} cn.MethodToPrint(); // Output // Name = Mark, Age = 428, BirthDate = 12/30/2010 09:20:23 PM Reflection is perfectly okay, in fact I think it is probably required. I'd also be neat if it could somehow work on any class through some sort of inheritance. I'm using 4.0 if that matters.

    Read the article

  • LevelToVisibilityConverter in silverligt 4

    - by prince23
    <UserControl x:Class="SLGridImage.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" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"> <UserControl.Resources> <local:LevelToVisibilityConverter x:Key="LevelToVisibility" /> </UserControl.Resources> <Grid x:Name="LayoutRoot" Background="White"> <sdk:DataGrid x:Name="dgMarks" CanUserResizeColumns="False" SelectionMode="Single" AutoGenerateColumns="False" VerticalAlignment="Top" ItemsSource="{Binding MarkCollection}" IsReadOnly="True" Margin="13,44,0,0" RowDetailsVisibilityMode="Collapsed" Height="391" HorizontalAlignment="Left" Width="965" VerticalScrollBarVisibility="Visible" > <sdk:DataGrid.Columns> <sdk:DataGridTemplateColumn> <sdk:DataGridTemplateColumn.CellTemplate> <DataTemplate> <Button x:Name="myButton" Click="myButton_Click"> <StackPanel Orientation="Horizontal"> <Image Margin="2, 2, 2, 2" x:Name="imgMarks" Stretch="Fill" Width="12" Height="12" Source="Images/test.png" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="{Binding Level, Converter={StaticResource LevelToVisibility}}" /> <TextBlock Text="{Binding Level}" TextWrapping="NoWrap" ></TextBlock> </StackPanel> </Button> </DataTemplate> </sdk:DataGridTemplateColumn.CellTemplate> </sdk:DataGridTemplateColumn> <sdk:DataGridTemplateColumn Header="Name" > <sdk:DataGridTemplateColumn.CellTemplate> <DataTemplate > <Border> <TextBlock Text="{Binding Name}" /> </Border> </DataTemplate> </sdk:DataGridTemplateColumn.CellTemplate> </sdk:DataGridTemplateColumn> <sdk:DataGridTemplateColumn Header="Marks" Width="80"> <sdk:DataGridTemplateColumn.CellTemplate> <DataTemplate> <Border> <TextBlock Text="{Binding Marks}" /> </Border> </DataTemplate> </sdk:DataGridTemplateColumn.CellTemplate> </sdk:DataGridTemplateColumn> </sdk:DataGrid.Columns> </sdk:DataGrid> </Grid> </UserControl> in .cs 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; using System.Collections.ObjectModel; using System.ComponentModel; namespace SLGridImage { public partial class MainPage : UserControl { private MarksViewModel model = new MarksViewModel(); public MainPage() { InitializeComponent(); this.DataContext = model; } private void myButton_Click(object sender, RoutedEventArgs e) { } } public class MarksViewModel : INotifyPropertyChanged { public MarksViewModel() { markCollection.Add(new Mark() { Name = "ABC", Marks = 23, Level = 0 }); markCollection.Add(new Mark() { Name = "XYZ", Marks = 67, Level = 1 }); markCollection.Add(new Mark() { Name = "YU", Marks = 56, Level = 0 }); markCollection.Add(new Mark() { Name = "AAA", Marks = 89, Level = 1 }); } private ObservableCollection<Mark> markCollection = new ObservableCollection<Mark>(); public ObservableCollection<Mark> MarkCollection { get { return this.markCollection; } set { this.markCollection = value; OnPropertyChanged("MarkCollection"); } } public event PropertyChangedEventHandler PropertyChanged; public void OnPropertyChanged(string propName) { if (PropertyChanged != null) this.PropertyChanged(this, new PropertyChangedEventArgs(propName)); } } public class Mark { public string Name { get; set; } public int Marks { get; set; } public int Level { get; set; } } public class LevelToVisibilityConverter : System.Windows.Data.IValueConverter { #region IValueConverter Members public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { Visibility isVisible = Visibility.Collapsed; if ((value == null)) return isVisible; int condition = (int)value; isVisible = condition == 1 ? Visibility.Visible : Visibility.Collapsed; return isVisible; } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } #endregion } } when i run getting error The type 'local:LevelToVisibilityConverter' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. what i am i missing here looking forward for an solution thank you

    Read the article

  • How to prevent Windows XP from stealing my input Ctrl-Space which is meant for Emacs

    - by Dean
    I am learning and using Emacs. What I found annoying is that Ctrl-Space input will be stolen by Windows XP to switch the language bar instead of setting the mark in Emacs. The "language bar" is the native input languages selection such as Chinese keyboard other than English keyboard. Is there a way to temporarily prevent XP from stealing it? I have disabled the language bar from "Regional and language options" from Control Panel but the problem still exists. It doesn't happen on my Windows 2000 desktop at office but it happens on my work Windows XP laptop. Thank you very much.

    Read the article

  • How to split HTML code with javascript or JQuery

    - by Dean
    Hi I'm making a website using JSP and servlets and I have to now break up a list of radio buttons to insert a textarea and a button. I have got the button and textarea to hide and show when you click on the radio button it shows the text area and button. But this only appears at the top and when there are hundreds on the page this will become awkward so i need a way for it to appear underneath. Here is what my HTML looks like when complied: <form action="addSpotlight" method="POST"> <table> <tr><td><input type="radio" value="29" name="publicationIDs" ></td><td>A System For Dynamic Server Allocation in Application Server Clusters, IEEE International Symposium on Parallel and Distributed Processsing with Applications, 2008</td> </tr> <tr><td><input type="radio" value="30" name="publicationIDs" ></td><td>Analysing BitTorrent's Seeding Strategies, 7th IEEE/IFIP International Conference on Embedded and Ubiquitous Computing (EUC-09), 2009</td> </tr> <tr><td><input type="radio" value="31" name="publicationIDs" ></td><td>The Effect of Server Reallocation Time in Dynamic Resource Allocation, UK Performance Engineering Workshop 2009, 2009</td> </tr> <tr><td><input type="radio" value="32" name="publicationIDs" ></td><td>idk, hello, 1992</td> </tr> <tr><td><input type="radio" value="33" name="publicationIDs" ></td><td>sad, safg, 1992</td> </tr> <div class="abstractWriteup"><textarea name="abstract"></textarea> <input type="submit" value="Add Spotlight"></div> </table> </form> Now here is what my JSP looks like: <form action="addSpotlight" method="POST"> <table> <%int i = 0; while(i<ids.size()){%> <tr><td><input type="radio" value="<%=ids.get(i)%>" name="publicationIDs" ></td><td><%=info.get(i)%></td> </tr> <%i++; }%> <div class="abstractWriteup"><textarea name="abstract"></textarea> <input type="submit" value="Add Spotlight"></div> </table> </form> Thanks in Advance Dean

    Read the article

  • JavaScript function binding (this keyword) is lost after assignment

    - by Ding
    this is one of most mystery feature in JavaScript, after assigning the object method to other variable, the binding (this keyword) is lost var john = { name: 'John', greet: function(person) { alert("Hi " + person + ", my name is " + this.name); } }; john.greet("Mark"); // Hi Mark, my name is John var fx = john.greet; fx("Mark"); // Hi Mark, my name is my question is: 1) what is happening behind the assignment? var fx = john.greet; is this copy by value or copy by reference? fx and john.greet point to two diferent function, right? 2) since fx is a global method, the scope chain contains only global object. what is the value of this property in Variable object?

    Read the article

  • Inserting newlines into a GtkTextView widget (GTK+ programming)

    - by Mark Roberts
    I've got a button which when clicked copies and appends the text from a GtkEntry widget into a GtkTextView widget. (This code is a modified version of an example found in the "The Text View Widget" chapter of Foundations of GTK+ Development.) I'm looking to insert a newline character before the text which gets copied and appended, such that each line of text will be on its own line in the GtkTextView widget. How would I do this? I'm brand new to GTK+. Here's the code sample: #include <gtk/gtk.h> typedef struct { GtkWidget *entry, *textview; } Widgets; static void insert_text (GtkButton*, Widgets*); int main (int argc, char *argv[]) { GtkWidget *window, *scrolled_win, *hbox, *vbox, *insert; Widgets *w = g_slice_new (Widgets); gtk_init (&argc, &argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (window), "Text Iterators"); gtk_container_set_border_width (GTK_CONTAINER (window), 10); gtk_widget_set_size_request (window, -1, 200); w->textview = gtk_text_view_new (); w->entry = gtk_entry_new (); insert = gtk_button_new_with_label ("Insert Text"); g_signal_connect (G_OBJECT (insert), "clicked", G_CALLBACK (insert_text), (gpointer) w); scrolled_win = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (scrolled_win), w->textview); hbox = gtk_hbox_new (FALSE, 5); gtk_box_pack_start_defaults (GTK_BOX (hbox), w->entry); gtk_box_pack_start_defaults (GTK_BOX (hbox), insert); vbox = gtk_vbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (vbox), scrolled_win, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0); gtk_container_add (GTK_CONTAINER (window), vbox); gtk_widget_show_all (window); gtk_main(); return 0; } /* Insert the text from the GtkEntry into the GtkTextView. */ static void insert_text (GtkButton *button, Widgets *w) { GtkTextBuffer *buffer; GtkTextMark *mark; GtkTextIter iter; const gchar *text; buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (w->textview)); text = gtk_entry_get_text (GTK_ENTRY (w->entry)); mark = gtk_text_buffer_get_insert (buffer); gtk_text_buffer_get_iter_at_mark (buffer, &iter, mark); gtk_text_buffer_insert (buffer, &iter, text, -1); } You can compile this command (assuming the file is named file.c): gcc file.c -o file `pkg-config --cflags --libs gtk+-2.0` Thanks everybody!

    Read the article

  • UIPickerView crashing when switching segemented control

    - by Mattog1456
    Hello, I have four NSDictionaries that I would like to use to populate a pickerview depending on a segemented control. With the code I have, the first segmented control/pickerview works fine but when I switch to the second segment the picker view only loads part of the second dictionary, that is it loads the same number of rows as it counted in the first dictionary. When I change the segmented control to the third or fourth segment it simply crashes with a sigabrt error indicating that it cannot index item43 when only 27 exist. This I suspect stems from a UItextfield population based on the upickerview row and object. I think the problem is with the way I have the data source and delegate set up. #pragma mark - #pragma mark UIPickerViewDelegate - (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component { if ([wine selectedSegmentIndex] == 0) { return [robskeys objectAtIndex:row]; } if ([wine selectedSegmentIndex] == 1) { return [esabskeys objectAtIndex:row]; } if ([wine selectedSegmentIndex] == 2) { return [lebskeys objectAtIndex:row]; } else if ([wine selectedSegmentIndex] == 3) { return [sbskeys objectAtIndex:row]; } return @"Unknown title"; } #pragma mark - #pragma mark UIPickerViewDataSource - (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView { return 1; } - (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component { if ([wine selectedSegmentIndex] == 0) { return robskeys.count; } if ([wine selectedSegmentIndex] == 1) { return esabskeys.count; } if ([wine selectedSegmentIndex] == 2) { return lebskeys.count; } else if ([wine selectedSegmentIndex] == 3) { return sbskeys.count; } return 1; } #pragma mark - Any help would be much appreciated Thank you

    Read the article

  • Android onActivityResult is always 0

    - by Dean
    This has been killing me for two days now. I have a main Activity A which calls a second Activity B. Activity B simply presents the user with a listview. When I press an item on the list view I want a couple of strings to be passed back to the main Activity A and Activiy B will finish. The problem is I always get a resultcode of 0 and the data bundle is null. I really don't understand why this is happening. Here is my code. Start Activity B for result; Test.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent i = new Intent(recipeActivity.this, BrowseLoadRecipes.class); startActivityForResult(i, RECIPE_CHOOSER); } }); This starts the second Activity fine. Activity B populates a listview and when I click an item I'm trying to send some data back to the calling Activity A. Any text at the moment, so I used the following in Activity B; lv.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> a, View v, int position, long id) { Bundle bundle = new Bundle(); bundle.putString("TEXT", "Please work... pleeeeaasee"); Intent mIntent = new Intent(); mIntent.putExtras(bundle); setResult(RESULT_OK, mIntent); finish(); } }); In the calling activity I have the following listening for the return as follows; protected void onActivityResult(int requestCode, int resultCode, Intent data) { switch(requestCode) { //TODO case RECIPE_CHOOSER: Toast.makeText(getApplicationContext(), "In recipe return", Toast.LENGTH_SHORT).show(); Toast.makeText(getApplicationContext(), "resultCode is " + String.valueOf(resultCode), Toast.LENGTH_SHORT).show(); if (resultCode == RESULT_OK) { Bundle b = getIntent().getExtras(); Toast.makeText(getApplicationContext(), "Returned " + b.getString("TEXT"), Toast.LENGTH_LONG).show(); } if (resultCode == RESULT_CANCELED) { } break; } } } I can see that the request code is correctly returned, but the resultcode is always a 0 and the data is always a null. I've ran through the debug and the setResult is doing its job and the bundle does indeed have the data I'm passing, but it's lost at some point along the way. Is there something in the manifest I'm missing or something. It's killed my progress on this project so far. Any help would truly be appreciated. Thanks, Dean

    Read the article

  • Oracle's Primavera P6 Analytics Now Available!

    - by mark.kromer
    Oracle's Primavera product team has announced this week that general availability of our first Oracle BI (OBI) based analytical product with pre-built business intelligence dashboards, reports and KPIs built in. P6 Analytics uses OBI's drill-down capabilities, summarizations, hierarchies and other BI features to provide knowledge to your business users to make the best decisions on portfolios, projects, schedules & resources with deep insights. Without needing to launch into the P6 tool, your executives, PMO, project sponsors, etc. can view up to date project performance information as well as historic trends of project performance. Using web-based portal technology, P6 Analytics makes it easy to manage by exception and then drill down to quickly identify root cause analysis of problem projects. At the same time, a brand new version of the P6 Reporting Database R2 was just announded and is also now available. This updated reporting database provides you with 4 star schemas with spread data and includes P6 activity, project and resource codes. You can use the data warehouse and ETL functions of the P6 Reporting Database R2 with your own reporting tools or build dashboards that utilize the hierarchies & drill down to the day-level on scheduled activities using Busines Objects, Cognos, Microsoft, etc. Both of these products can be downloaded from E-Delivery under the Primavera applications section in the P6 EPPM v7.0 media pack. I put some examples below of the resource utilization, earned value, landing page and portfolio analysis dashboards that come out of the box with P6 Analytics to give you these deep insights into your projects & portfolios on day 1 of using the tool. Please send an email to Karl or me if you have any questions or would like more information. Oracle Technology Network and the Oracle.com marketing sites are currently being refreshed with further details of these exciting new releases of the Primavera BI and data warehouse products. Lastly, scroll below for some screenshots of the new P6 Analytics R1 product using OBIEE! Thanks, Mark Kromer

    Read the article

  • Client-side code and UPK

    - by [email protected]
    There is a long running discussion in UPK Development regarding the use of any client side code as part of the end-user playback. By this I mean anything which requires an install including ActiveX controls, browser helper objects, stand-alone applications, things that run in the task bar, etc. We all have grown to love zero-footprint applications over the past ten years, but there are some things which are not technically feasible using HTML alone. One example of this is the functionality provided by our SmartHelp in-application support component. This allows the user to launch context sensitive help without making modifications to the target application. (If you are unfamiliar with SmartHelp, more information can be found in the "In-Application Support Guide" in the UPK manual directory) We always try to implement everything we can using only HTML but there are many features which have been requested over the years that would require some client-side code in order to work. When these come up for discussion, there is always a spirited debate about the acceptability of a client side solution. I thought it would be interesting to ask for feedback from a wider audience. What do you think about client-side components? Would your organization consider them? Do you already deploy SmartHelp? Is there a large hurdle to clear for these to be worth the deployment costs? Let us know. Mark Overton, VP Development for UPK

    Read the article

  • My first animation - Using SDL.NET C#

    - by Mark
    Hi all! I'm trying to animate a player object in my 2D grid when the user clicks somewhere in the screen. I got the following 4 variables: oX (Current player position X) oY (Current player position Y) dX (Destination X) dY (Destination Y) How can I make sure the player moves in a straight line to the new XY coordinates. The way I'm doing it now is really awfull and causes the player to first move along x axis, and finally in y axis. Can someone give me some guidance with the involved math cause I'm really not sure on how to accomplish this. Thank you for your time. Kind regards, Mark Update: It's working now but whats the right way to check if the current positions are equal to the target position? private static void MovePlayer(double x2, double y2, int duration) { double hX = x2 - m_PlayerPosition.X; double hY = y2 - m_PlayerPosition.Y; double Length = Math.Sqrt(Math.Pow(hX, 2) + Math.Pow(hY, 2)); hX = hX / Length; hY = hY / Length; while (m_PlayerPosition.X != Convert.ToInt32(x2) || m_PlayerPosition.Y != Convert.ToInt32(y2)) { m_PlayerPosition.X += Convert.ToInt32(hX * 1); m_PlayerPosition.Y += Convert.ToInt32(hY * 1); UpdatePlayerLocation(); } }

    Read the article

  • An Oracle Event for Your Facility & Equipment Maintenance Staff

    - by Mark Rosenberg
    The 7th Annual Oracle Maintenance Summit will occur February 4 – 6, 2013 at the Hyatt Regency San Francisco. This year, the Maintenance Summit will be one of the major pillars of a larger Oracle Value Chain Summit. What makes this event different from the other events hosted by Oracle and the PeopleSoft Community’s various user groups is that it is specifically meant to provide a venue for the facility and equipment maintenance community to talk about all things related to maintenance.  Maintenance Planners, Maintenance Schedulers, Vice Presidents and Directors of Physical Plant, Operations Managers, Craft Supervisors, IT management, and IT analysts typically attend this event and find it to be a very valuable experience. The Maintenance pillar will provide the same atmosphere and opportunity to hear from PeopleSoft Maintenance Management customers, Oracle Product Strategy, and partners, as in past years.  For more information, you can access the registration website for the Value Chain Summit. For existing PeopleSoft Maintenance Management customers…if you are interested in participating in the PeopleSoft Maintenance Management Focus Group in which Oracle discusses product roadmap topics with the community of customers who have licensed the PeopleSoft Maintenance Management application, please contact [email protected], [email protected], or Mark[email protected]. The Focus Group will meet on February 7th, and attendance is by invitation only.We look forward to seeing you in San Francisco! P.S.  The Early Bird registration fee is $195. Register before December 31 to take advantage of this introductory low price, as the registration fee will go up to $295 after that date.

    Read the article

  • What do YOU want to see in a SharePoint jQuery Session?

    - by Mark Rackley
    Hey party people. So, as you have probably realized by now, I’ve been using quite a bit of jQuery with SharePoint. It’s pretty amazing what you can actually accomplish with a little stubbornness and some guidance from the gurus. Well, it looks like I’ll be putting together a SharePoint jQuery session that I will be presenting at a few conferences. This is such a big and broad topic I could speak on it for hours! So, I need YOUR assistance to help me narrow down what I’ll be focusing on. Some ideas I have are: How to even get started; how to set up SharePoint to work with jQuery What third party libraries exist out there that integrate well with SharePoint How to interact with default SharePoint forms and jQuery (cascading dropdowns, disabling fields, etc..) What is SPServices and how can you use it When should you NOT use jQuery What do YOU want to see though? This session is for YOU guys, not for me. Please take a moment to leave a comment below and let me know what you would like to see and learn. Thanks, and I look forward to seeing you in my sessions!! Mark

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >