Search Results

Search found 205 results on 9 pages for 'tu tran'.

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

  • Linq Query Performance , comparing Compiled query vs Non-Compiled.

    - by AG.
    Hello Guys, I was wondering if i extract the common where clause query into a common expression would it make my query much faster, if i have say something like 10 linq queries on a collection with exact same 1st part of the where clause. I have done a small example to explain a bit more . public class Person { public string First { get; set; } public string Last { get; set; } public int Age { get; set; } public String Born { get; set; } public string Living { get; set; } } public sealed class PersonDetails : List<Person> { } PersonDetails d = new PersonDetails(); d.Add(new Person() {Age = 29, Born = "Timbuk Tu", First = "Joe", Last = "Bloggs", Living = "London"}); d.Add(new Person() { Age = 29, Born = "Timbuk Tu", First = "Foo", Last = "Bar", Living = "NewYork" }); Expression<Func<Person, bool>> exp = (a) => a.Age == 29; Func<Person, bool> commonQuery = exp.Compile(); var lx = from y in d where commonQuery.Invoke(y) && y.Living == "London" select y; var bx = from y in d where y.Age == 29 && y.Living == "NewYork" select y; Console.WriteLine("All Details {0}, {1}, {2}, {3}, {4}", lx.Single().Age, lx.Single().First , lx.Single().Last, lx.Single().Living, lx.Single().Born ); Console.WriteLine("All Details {0}, {1}, {2}, {3}, {4}", bx.Single().Age, bx.Single().First, bx.Single().Last, bx.Single().Living, bx.Single().Born); So can some of the guru's here give me some advice if it would be a good practice to write query like var lx = "Linq Expression " or var bx = "Linq Expression" ? Any inputs would be highly appreciated. Thanks, AG

    Read the article

  • How to store child objects on GAE using JDO from Scala

    - by Gero
    Hi, I'm have a parent-child relation between 2 classes, but the child objects are never stored. I do get an warning: "org.datanucleus.store.appengine.MetaDataValidator checkForIllegalChildField: Unable to validate relation net.vermaas.kivanotify.model.UserCriteria.internalCriteria" but it is unclear to me why this occurs. Already tried several alternatives without luck. The parent class is "UserCriteria" which has a List of "Criteria" as children. The classes are defined as follows (Scala): class UserCriteria(tu: String, crit: Map[String, String]) extends LogHelper { @PrimaryKey @Persistent{val valueStrategy = IdGeneratorStrategy.IDENTITY} var id = KeyFactory.createKey("UserCriteria", System.nanoTime) @Persistent var twitterUser = tu @Persistent var internalCriteria: java.util.List[Criteria] = flatten(crit) def flatten(crits: Map[String, String]) : java.util.List[Criteria] = { val list = new java.util.ArrayList[Criteria] for (key <- crits.keySet) { list.add(new Criteria(this, key, crits(key))) } list } def criteria: Map[String, String] = { val crits = mutable.Map.empty[String, String] for (i <- 0 to internalCriteria.size-1) { crits(internalCriteria.get(i).name) = internalCriteria.get(i).value } Map.empty ++ crits } // Stripped the equals, canEquals, hashCode, toString code to keep the code snippet short... } @PersistenceCapable @EmbeddedOnly class Criteria(uc: UserCriteria, nm: String, vl: String) { @Persistent var userCriteria = uc @Persistent var name = nm @Persistent var value = vl override def toString = { "Criteria name: " + name + " value: " + value } } Any ideas why the childs are not stored? Or why I get the error message? Thanks, Gero

    Read the article

  • CRM 2011 - Set/Retrieve work hours programmatically

    - by Philip Rich
    I am attempting to retrieve a resources work hours to perform some logic I require. I understand that the CRM scheduling engine is a little clunky around such things, but I assumed that I would be able to find out how the working hours were stored in the DB eventually... So a resource has associated calendars and those calendars have associated calendar rules and inner calendars etc. It is possible to look at the start/end and frequency of aforementioned calendar rules and query their codes to work out whether a resource is 'working' during a given period. However, I have not been able to find the actual working hours, the 9-5 shall we say in any field in the DB. I even tried some SQL profiling while I was creating a new schedule for a resource via the UI, but the results don't show any work hours passing to SQL. For those with the patience the intercepted SQL statement is below:- EXEC Sp_executesql N'update [CalendarRuleBase] set [ModifiedBy]=@ModifiedBy0, [EffectiveIntervalEnd]=@EffectiveIntervalEnd0, [Description]=@Description0, [ModifiedOn]=@ModifiedOn0, [GroupDesignator]=@GroupDesignator0, [IsSelected]=@IsSelected0, [InnerCalendarId]=@InnerCalendarId0, [TimeZoneCode]=@TimeZoneCode0, [CalendarId]=@CalendarId0, [IsVaried]=@IsVaried0, [Rank]=@Rank0, [ModifiedOnBehalfBy]=NULL, [Duration]=@Duration0, [StartTime]=@StartTime0, [Pattern]=@Pattern0 where ([CalendarRuleId] = @CalendarRuleId0)', N'@ModifiedBy0 uniqueidentifier,@EffectiveIntervalEnd0 datetime,@Description0 ntext,@ModifiedOn0 datetime,@GroupDesignator0 ntext,@IsSelected0 bit,@InnerCalendarId0 uniqueidentifier,@TimeZoneCode0 int,@CalendarId0 uniqueidentifier,@IsVaried0 bit,@Rank0 int,@Duration0 int,@StartTime0 datetime,@Pattern0 ntext,@CalendarRuleId0 uniqueidentifier', @ModifiedBy0='EB04662A-5B38-E111-9889-00155D79A113', @EffectiveIntervalEnd0='2012-01-13 00:00:00', @Description0=N'Weekly Single Rule', @ModifiedOn0='2012-03-12 16:02:08', @GroupDesignator0=N'FC5769FC-4DE9-445d-8F4E-6E9869E60857', @IsSelected0=1, @InnerCalendarId0='3C806E79-7A49-4E8D-B97E-5ED26700EB14', @TimeZoneCode0=85, @CalendarId0='E48B1ABF-329F-425F-85DA-3FFCBB77F885', @IsVaried0=0, @Rank0=2, @Duration0=1440, @StartTime0='2000-01-01 00:00:00', @Pattern0=N'FREQ=WEEKLY;INTERVAL=1;BYDAY=SU,MO,TU,WE,TH,FR,SA', @CalendarRuleId0='0A00DFCF-7D0A-4EE3-91B3-DADFCC33781D' The key parts in the statement are the setting of the pattern:- @Pattern0=N'FREQ=WEEKLY;INTERVAL=1;BYDAY=SU,MO,TU,WE,TH,FR,SA' However, as mentioned, no indication of the work hours set. Am I thinking about this incorrectly or is CRM doing something interesting around these work hours? Any thoughts greatly appreciated, thanks.

    Read the article

  • Disable/Enable applicationbar Button in runtime with event textchanged (Windows Phone)

    - by user3621634
    In this part of the code is the event TextChanged to enable the button in te applicationbar Code in C# private void Textbox_TextChanged(object sender, EventArgs e) { ApplicationBarIconButton btn_guardar = ApplicationBar.Buttons[0] as applicationBarIconButton; if (!string.IsNullOrEmpty(txt_nom_usuario.Text) && !string.IsNullOrEmpty(txt_edad_usuario.Text) && !string.IsNullOrEmpty(txt_peso_usuario.Text)) { btn_guardar.IsEnabled = true; } else btn_guardar.IsEnabled = false; } Code XAML <phone:PhoneApplicationPage.ApplicationBar> <shell:ApplicationBar Mode="Default" IsVisible="True"> <shell:ApplicationBarIconButton x:Name="btn_guardar" IconUri="/icons/appbar.save.rest.png" Text="Guardar" Click="btn_guardar_Click" IsEnabled="False" /> <shell:ApplicationBarIconButton x:Name="btn_atras" IconUri="/icons/appbar.back.rest.png" Text="Atrás" Click="btn_atras_Click" /> </shell:ApplicationBar> </phone:PhoneApplicationPage.ApplicationBar> <TextBlock x:Name="lbl_ingresanombre" Height="39" Margin="60,28,0,0" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Top" Width="248" FontSize="29.333" FontFamily="{StaticResource Helvetica}"><Run Text="Ingresa "/><Run Text="tu nombre"/></TextBlock> <TextBox x:Name="txt_nom_usuario" Height="63" Margin="47,58,69,0" TextWrapping="Wrap" Text="&#xa;" FontSize="21.333" VerticalAlignment="Top" IsEnabled="True" /> <TextBlock x:Name="lbl_edad" Height="38" Margin="60,117,0,0" TextWrapping="Wrap" Text="Ingresa tu edad" VerticalAlignment="Top" FontSize="29.333" HorizontalAlignment="Left" FontFamily="{StaticResource Helvetica}"/> <TextBox x:Name="txt_edad_usuario" InputScope="TelephoneLocalNumber" Height="63" TextWrapping="Wrap" Text="&#xa;" FontSize="21.333" Margin="47,147,69,0" VerticalAlignment="Top" MaxLength="3" />

    Read the article

  • The first Oracle Solaris 11 book is now available

    - by user12608550
    The first Oracle Solaris 11 book is now available: Oracle Solaris 11 System Administration - The Complete Reference by Michael Jang, Harry Foxwell, Christine Tran, and Alan Formy-Duval The book covers the Oracle Solaris 11 11/11 release; although the next OS release will be available soon, the book covers major topics and features that are not expected to change significantly. The target audience is broad, and includes Solaris admins, Linux admins and developers, and even those somewhat unfamiliar with UNIX. The coauthors include practitioners and developers from outside of Oracle, emphasizing their field experience using Solaris 11. The book complements the extensive Oracle Solaris 11 Information Library, and covers the main system administration topics of installation, configuration, and management. More Oracle Solaris 11 info here

    Read the article

  • Reproducing a Conversion Deadlock

    - by Alexander Kuznetsov
    Even if two processes compete on only one resource, they still can embrace in a deadlock. The following scripts reproduce such a scenario. In one tab, run this: CREATE TABLE dbo.Test ( i INT ) ; GO INSERT INTO dbo.Test ( i ) VALUES ( 1 ) ; GO SET TRANSACTION ISOLATION LEVEL SERIALIZABLE ; BEGIN TRAN SELECT i FROM dbo.Test ; --UPDATE dbo.Test SET i=2 ; After this script has completed, we have an outstanding transaction holding a shared lock. In another tab, let us have that another connection have...(read more)

    Read the article

  • Are log records removed from ldf file for rollbacks?

    - by TiborKaraszi
    Seems like a simple enough question, right? This question (but more targeted, read on) was raised in an MCT forum. While the discussion was on-going and and I tried to come up with answers, I realized that this question are really several questions. First, what is a rollback? I can see three different types of rollbacks (there might be more, of course): Regular rollback, as in ROLLBACK TRAN (or lost/terminated connection) Rollback done by restore recovery. I.e., end-time of backup included some transaciton...(read more)

    Read the article

  • NHibernate, transactions and TransactionScope

    - by Erik
    I'm trying to find the best solution to handle transaction in a web application that uses NHibernate. We use a IHttpModule and at HttpApplication.BeginRequest we open a new session and we bind it to the HttpContext with ManagedWebSessionContext.Bind(context, session); We close and unbind the session on HttpApplication.EndRequest. In our Repository base class, we always wrapped a transaction around our SaveOrUpdate, Delete, Get methods like, according to best practice: public virtual void Save(T entity) { var session = DependencyManager.Resolve<ISession>(); using (var transaction = session.BeginTransaction()) { session.SaveOrUpdate(entity); transaction.Commit(); } } But then this doesn't work, if you need to put a transaction somewhere in e.g. a Application service to include several repository calls to Save, Delete, etc.. So what we tried is to use TransactionScope (I didn't want to write my own transactionmanager). To test that this worked, I use an outer TransactionScope that doesn't call .Complete() to force a rollback: Repository Save(): public virtual void Save(T entity) { using (TransactionScope scope = new TransactionScope()) { var session = Depe.ndencyManager.Resolve<ISession>(); session.SaveOrUpdate(entity); scope.Complete(); } } The block that uses the repository: TestEntity testEntity = new TestEntity { Text = "Test1" }; ITestRepository testRepository = DependencyManager.Resolve<ITestRepository>(); testRepository.Save(testEntity); using (var scope = new TransactionScope()) { TestEntity entityToChange = testRepository.GetById(testEntity.Id); entityToChange.Text = "TestChanged"; testRepository.Save(entityToChange); } TestEntity entityChanged = testRepository.GetById(testEntity.Id); Assert.That(entityChanged.Text, Is.EqualTo("Test1")); This doesn't work. But to me if NHibernate supports TransactionScope it would! What happens is that there is no ROLLBACK at all in the database but when the testRepository.GetById(testEntity.Id); statement is executed a UPDATE with SET Text = "TestCahgned" is fired instead (It should have been fired between BEGIN TRAN and ROLLBACK TRAN). NHibernate reads the value from the level1 cache and fires a UPDATE to the database. Not expected behaviour!? From what I understand whenever a rollback is done in the scope of NHibernate you also need to close and unbind the current session. My question is: Does anyone know of a good way to do this using TransactionScope and ManagedWebSessionContext?

    Read the article

  • Have I to count transactions before rollback one in catch block in T-SQL?

    - by abatishchev
    I have next block in the end of each my stored procedure for SQL Server 2008 BEGIN TRY BEGIN TRAN -- my code COMMIT END TRY BEGIN CATCH IF (@@trancount > 0) BEGIN ROLLBACK DECLARE @message NVARCHAR(MAX) DECLARE @state INT SELECT @message = ERROR_MESSAGE(), @state = ERROR_STATE() RAISERROR (@message, 11, @state) END END CATCH Is it possible to switch CATCH-block to BEGIN CATCH ROLLBACK DECLARE @message NVARCHAR(MAX) DECLARE @state INT SELECT @message = ERROR_MESSAGE(), @state = ERROR_STATE() RAISERROR (@message, 11, @state) END CATCH or just BEGIN CATCH ROLLBACK END CATCH ?

    Read the article

  • RUN 2012 Buenos Aires - Desarrollando para dispositivos móviles con HTML5 y ASP.NET

    - by MarianoS
    El próximo Viernes 23 de Marzo a las 8:30 hs en la Universidad Católica Argentina se realizará una nueva edición del Run en Buenos Aires, el evento Microsoft más importante del año. Particularmente, voy a estar junto con Rodolfo Finochietti e Ignacio Lopez presentando nuestra charla “Desarrollando para dispositivos móviles con HTML5 y ASP.NET” donde voy a presentar algunas novedades de ASP.NET MVC 4. Esta es la agenda completa de sesiones para Desarrolladores: Keynote: Un mundo de dispositivos conectados. Aplicaciones al alcance de tu mano: Windows Phone – Ariel Schapiro, Miguel Saez. Desarrollando para dispositivos móviles con HTML5 y ASP.NET – Ignacio Lopez, Rodolfo Finochietti, Mariano Sánchez. Servicios en la Nube con Windows Azure – Matias Woloski, Johnny Halife. Desarrollo Estilo Metro en Windows 8 – Martin Salias, Miguel Saez, Adrian Eidelman, Rubén Altman, Damian Martinez Gelabert. El evento es gratuito, con registro previo: http://bit.ly/registracionrunargdev

    Read the article

  • Que es Virtualbox?

    - by [email protected]
    VIRTUALBOX (Open Source para virtualización)Las herrramientas de virtualización se han puesto de moda de manera casi exponencial durante los últimos años. Una de ellas es VirtualBox, esta corre sobre diferentes sistemas operativos y para los desarrolladores e ingenieros en computo que desean realizar pruebas de productos sin afectar sus maquinas, esta es una de las mejores alternativas. Adicionalmente hay algo que tiene VirtualBox que aun es mejor, es un program Open Source, eso significa que la podras usar en tu maquina teniendo un costo de $0.Esta herramienta realiza basicamente la misma funcion que Vmware Workstation, e incluso puede ejecutar la maquinas virtuales creadas con vmware workstation sin necesidad de realizar conversiones de alguna manera.La ultima version disponible al dia de hoy es la 3.1.6 y este puede ser descargado facilmente.  Solo visita uno de estos sites."Get  the lastest VirtualBox version at here"http://www.virtualbox.org/wiki/Downloadso en la pagina de Oracle"Get  the lastest VirtualBox version at here"http://dlc.sun.com/virtualbox/vboxdownload.html

    Read the article

  • Most efficient AABB - Ray intersection algorithm for input/output distance calculation

    - by Tobbey
    Thanks to the following thread : most efficient AABB vs Ray collision algorithms I have seen very fast algorithm for ray/AABB intersection point computation. Unfortunately, most of the recent algorithm are accelerated by omitting the "output" intersection point of the box. In my application, I would interested in getting both the the distance from source ray to input: t0 and source ray to output of bounding box: t1. I have seen for instance Eisemann designed a very fast version regarding plucker, smits, ... , but it does not compare the case when both input/output distance should be computed see: http://www.cg.cs.tu-bs.de/publications/Eisemann07FRA/ Does someone know where I can find more information on algorithm performances for the specific input/output problem ? Thank you in advance

    Read the article

  • How to disable laptop internal keyboard

    - by Abhijit Navale
    I am using external usb keyboard. I want to disable laptop's internal keyboard using software. I know that i can just remove the internal keyboards wire and disconnect it physically, but i wanted to disable it using software so that later I can enable it by just executing a command in terminal easily. I am talking about disabling the keyboard and NOT the keyboard layout. I am having Hp-Compaq Presario A965 TU Laptop Intel Centrino Core 2 Duo(Freq. 2 GHz). I am using 64 bit Ubuntu Lucid Lynx.

    Read the article

  • How to structure well my adwords campaign?

    - by Romain Dorange
    I am starting an adwords campaigns and I will measure conversion rates using the Adwords conversion tracking pixel. Conversion might be account creation or a concrete sale. As it will be a test campaign to have some insights on CTR, CR, etc... on the future, I am likely to try several configurations. two differents ads with different landing URL and messages : one with a focus on the product / the other will contains a discount embedded in the URL 4 differents groups/thematics of keywords I guess I have to build 4 ads groups based on the keywords 2 ads with the different messages assign the two ads to each ads groups follow the campaign precisely in the ads tabs where I can see the effectiveness of each Ads per Ads Groups (for a total of 8 lines of reporting) Am I right ? Also, what are the KPI I can have from an adwords campaign tu measure global effectiveness? measure of ROI from concrete sales (tracking pixel with e-commerce tag on confirmation page) measure of ROI from leads acquisition (tracking pixel on account creation) measure of traffic increase with the campaign Thanks a lot.

    Read the article

  • How do I open port 51413 for Transmission?

    - by user94159
    Just moved to ubuntu on my macbook and spend whole day trying to open transmission port 51413. Already done: I have ufw but i opened ports there and tried without it - probably not the problem 51413/tcp ALLOW Anywhere 51413/tcp ALLOW Anywhere (v6) 21/tcp ALLOW OUT Anywhere 80 ALLOW OUT Anywhere 143 ALLOW OUT Anywhere 2049 ALLOW OUT Anywhere 110 ALLOW OUT Anywhere 135,139,445/tcp ALLOW OUT Anywhere 137,138/udp ALLOW OUT Anywhere 25/tcp ALLOW OUT Anywhere 631 ALLOW OUT Anywhere 443/tcp ALLOW OUT Anywhere 53/udp ALLOW OUT Anywhere 123/udp ALLOW OUT Anywhere 993/tcp ALLOW OUT Anywhere 465/tcp ALLOW OUT Anywhere 51413/tcp ALLOW OUT Anywhere router Pirelli DRG A125G; tried disabling firewall, forwarding ports according portforward.com but I have no experience with such thing so I dont know if i succeeded On transmission still shows port blocked and nothing is downloading... CanYouSeeMe.org tried tu use to see if ports are open but it shows that port is blocked Also tried qbitorrent it also doesnt work

    Read the article

  • Mouse clicks automatically / Raton hace clicks automaticos

    - by Antoni Ghalam
    Good day friends, my problem is that my mouse clicks automatically and is getting on my nerves. I tried to do the solutioned mentioned here: Press Alt + F2 and type gnome-mouse-properties then press Enter. Go to Accessibility tab and uncheck the option "Initiate click when stopping..." but my problem is that the Accessibility tab is not there. Buenos dias amigo tengo el problema de que mi raton da clicks automaticos y me fasidia mucho intente hacer la solucion que tu diste aqui. Haga clic en Alt + F2 y poner gnome-mouse-properties y pulsa enter. Ir a la accesibilidad y desmarque la opción "iniciar haga clic en ..." pero mi problema es q no me aparese la pestaña de accesibilidad me podrias ayudar porfavor

    Read the article

  • Simplifique su mobilidade empresarial

    - by RED League Heroes-Oracle
    Durante muchos años, los departamentos de TI de las empresas dieron más atención a las computadoras (desktops y notebooks), para que estas pudieran trabajar con las aplicaciones de negocios. Con el advenimiento de la computación móvil, las aplicaciones comenzaron a estar vinculadas no solamente a las computadoras. Actualmente los usuarios buscan usar o acceder a las aplicaciones de la empresa a través de tabletas o teléfonos inteligentes a cualquier hora, en cualquier lugar.  VIVIMOS EN UN AMBIENTE MULTICANAL. Este nuevo ambiente trae nuevas oportunidades y desafíos, ve en este e-book como Oracle puede ayudarte a ti y a tu empresa en esta nueva era. Descarga aquí:

    Read the article

  • MacVim and netrw - Press ENTER

    - by Jonatan Littke
    Hey guys. I've set up MacVim to work with netrw for remote editing (yaaay!), but whenever I save a file, I get the following error: :!scp -q '/var/folders/PN/PNhWJAr5GGC0WfeLdFgWV++++TU/-Tmp-/v771493/0' 'remot_host:path/remote_file.css' Press ENTER or type command to continue Hitting ENTER removes it and I can edit again. I don't know what it is and it's annoying, but perhaps not broken. Tips?

    Read the article

  • fullcalendar colored same td?

    - by Torenaga
    Hello Is possible change background-color on same td in fullcalendar? for example: I like have blue beckground at Mo 10:00-14:00 and green beckground at Tu 9:30-11:30. I visit: http://code.google.com/p/fullcalendar/issues/detail?id=144&colspec=ID%20Type%20Status%20Milestone%20Summary%20Stars But it is possible now and how? P.S: Sorry, I have bad English :(

    Read the article

  • NSPredicate and arrays

    - by bend0r
    Hello, I've got a short question. I have an NSArray filled with Cars (inherits from NSObject) Car has the @property NSString *engine (also regarded @synthesize ...) Now I want tu filter the array using NSPredicate predicate = [NSPredicate predicateWithFormat:[NSString stringWithFormat:@"(engine like %@)", searchText]]; newArray = [ArrayWithCars filteredArrayUsingPredicate:predicate]; This throws an valueForUndefinedKey error. Is the predicateWithFormat correct? thanks for your responses

    Read the article

  • Unicode troubles

    - by user343803
    Hello, i have just known Python for few days. Unicode seems to be a problem with Python. i have a text file stores a text string like this '\u0110\xe8n \u0111\u1ecf n\xfat giao th\xf4ng Ng\xe3 t\u01b0 L\xe1ng H\u1ea1' i can read the file and print the string out but it displays incorrectly. How can i print it out to screen correctly as follow: "Ðèn d? nút giao thông Ngã tu Láng H?" Thanks in advance

    Read the article

  • Disqus: change captions after success with jQuery

    - by andufo
    Hi, Disqus automatically places defined captions upon request. For example: Add new Comment I've tried to change its value with jquery on ready(): $('#dsq-new-post h3').text('Paticipa con tu cuenta favorita'); No success :( ... how can i know when disqus script is finished parsing the data so i can change the caption value of h3?

    Read the article

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