Search Results

Search found 2677 results on 108 pages for 'eren trigger'.

Page 31/108 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • How to use multiple identity numbers in one table?

    - by vincer
    I have an web application that creates printable forms, these forms have a unique number on them, the problem is I have 2 forms that separate numbers need to be created for them. ie) Form1- Numbered 2000000-2999999 Form2- Numbered 3000000-3999999 dbo.test2 - is my form information table Tsel - is my autoinc table for the 3000000 series numbers Tadv - is my autoinc table for the 2000000 series numbers What I have done is create 2 tables with just autoinc row (one for 2000000 series numbers and one for 3000000 series numbers), I then created a trigger to add a record to the coresponding table, read back the autoinc number and add it to my table that stores the form information including the just created autoinc number for the right series of forms. Although it does work, I'm concerned that the numbers will get messed up under load. I'm not sure the @@IDENTITY will always return the right value when many people are using the system. (I cannot have duplicates and I need to use the numbering form show above. See code below. ** TRIGGER ** CREATE TRIGGER MAKEANID2 ON dbo.test2 AFTER INSERT AS SET NOCOUNT ON declare @someid int declare @someid2 int declare @startfrom int declare @test1 varchar(10) select @someid=@@IDENTITY select @test1 = (Select name1 from test2 where sysid = @someid ) if @test1 = 'select' begin insert into Tsel Default values select @someid2 = @@IDENTITY end if @test1 = 'adv' begin insert into Tadv Default values select @someid2 = @@IDENTITY end update test2 set name2=(@someid2) where sysid = @someid SET NOCOUNT OFF

    Read the article

  • MSSQL Server using multiple ID Numbers

    - by vincer
    I have an web application that creates printable forms, these forms have a unique number on them, the problem is I have 2 forms that separate numbers need to be created for them. ie) Form1- Numbered 2000000-2999999 Form2- Numbered 3000000-3999999 dbo.test2 - is my form information table Tsel - is my autoinc table for the 3000000 series numbers Tadv - is my autoinc table for the 2000000 series numbers What I have done is create 2 tables with just autoinc row (one for 2000000 series numbers and one for 3000000 series numbers), I then created a trigger to add a record to the coresponding table, read back the autoinc number and add it to my table that stores the form information including the just created autoinc number for the right series of forms. Although it does work, I'm concerned that the numbers will get messed up under load. I'm not sure the @@IDENTITY will always return the right value when many people are using the system. (I cannot have duplicates and I need to use the numbering form show above. Thanks for any help See code below. ** TRIGGER ** CREATE TRIGGER MAKEANID2 ON dbo.test2 AFTER INSERT AS SET NOCOUNT ON declare @someid int declare @someid2 int declare @startfrom int declare @test1 varchar(10) select @someid=@@IDENTITY select @test1 = (Select name1 from test2 where sysid = @someid ) if @test1 = 'select' begin insert into Tsel Default values select @someid2 = @@IDENTITY end if @test1 = 'adv' begin insert into Tadv Default values select @someid2 = @@IDENTITY end update test2 set name2=(@someid2) where sysid = @someid SET NOCOUNT OFF

    Read the article

  • Optimize Duplicate Detection

    - by Dave Jarvis
    Background This is an optimization problem. Oracle Forms XML files have elements such as: <Trigger TriggerName="name" TriggerText="SELECT * FROM DUAL" ... /> Where the TriggerText is arbitrary SQL code. Each SQL statement has been extracted into uniquely named files such as: sql/module=DIAL_ACCESS+trigger=KEY-LISTVAL+filename=d_access.fmb.sql sql/module=REP_PAT_SEEN+trigger=KEY-LISTVAL+filename=rep_pat_seen.fmb.sql I wrote a script to generate a list of exact duplicates using a brute force approach. Problem There are 37,497 files to compare against each other; it takes 8 minutes to compare one file against all the others. Logically, if A = B and A = C, then there is no need to check if B = C. So the problem is: how do you eliminate the redundant comparisons? The script will complete in approximately 208 days. Script Source Code The comparison script is as follows: #!/bin/bash echo Loading directory ... for i in $(find sql/ -type f -name \*.sql); do echo Comparing $i ... for j in $(find sql/ -type f -name \*.sql); do if [ "$i" = "$j" ]; then continue; fi # Case insensitive compare, ignore spaces diff -IEbwBaq $i $j > /dev/null # 0 = no difference (i.e., duplicate code) if [ $? = 0 ]; then echo $i :: $j >> clones.txt fi done done Question How would you optimize the script so that checking for cloned code is a few orders of magnitude faster? System Constraints Using a quad-core CPU with an SSD; trying to avoid using cloud services if possible. The system is a Windows-based machine with Cygwin installed -- algorithms or solutions in other languages are welcome. Thank you!

    Read the article

  • What is a good solution to log the deletion of a row in MySQL?

    - by hobodave
    Background I am currently logging deletion of rows from my tickets table at the application level. When a user deletes a ticket the following SQL is executed: INSERT INTO alert_log (user_id, priority, priorityName, timestamp, message) VALUES (9, 4, 'WARN', NOW(), "TICKET: David A. deleted ticket #6 from Foo"); Please do not offer schema suggestions for the alert_log table. Fields: user_id - User id of the logged in user performing the deletion priority - Always 4 priorityName - Always 'WARN' timestamp - Always NOW() message - Format: "[NAMESPACE]: [FullName] deleted ticket #[TicketId] from [CompanyName]" NAMESPACE - Always TICKET FullName - Full name of user identified by user_id above TicketId - Primary key ID of the ticket being deleted CompanyName - Ticket has a Company via tickets.company_id Situation/Questions Obviously this solution does not work if a ticket is deleted manually from the mysql command line client. However, now I need to. The issues I'm having are as follows: Should I use a PROCEDURE, FUNCTION, or TRIGGER? -- Analysis: TRIGGER - I don't think this will work because I can't pass parameters to it, and it would trigger when my application deleted the row too. PROCEDURE or FUNCTION - Not sure. Should I return the number of deleted rows? If so, that would require a FUNCTION right? How should I account for the absence of a logged in user? -- Possibilities: Using either a PROC or FUNC, require the invoker to pass in a valid user_id Require the user to pass in a string with the name Use the CURRENT_USER - meh Hard code the FullName to just be "Database Administrator" Could the name be an optional parameter? I'm rather green when it comes to sprocs. Assuming I went with the PROC/FUNC approach, is it possible to outright restrict regular DELETE calls to this table, yet still allow users to call this PROC/FUNC to do the deletion for them? Ideally the solution is usable by my application as well, so that my code is DRY.

    Read the article

  • How to refactor jquery

    - by Pierce McGeough
    I have buttons on the page that will activate and deactive settings. the Ids are the same bar their prefix e.g I have '#rl-activate', '#rl-deactivate', '#cl-activate', '#cl-deactivate' Is there a way to refactor this code so i am not doing it for every button on the page. // rl activate $('#rl-activate').click(function(){ $('#rl-activate').hide(); $('#rl-deactivate').show(); $('#rl').val(50).prop('selected', true); $('#rl').prop('disabled', false).trigger('liszt:updated'); displayCPM(); newPrice(); checkSettings(); }); // rl deactivate $('#rl-deactivate').click(function(){ $('#rl-deactivate').hide(); $('#rl-activate').show(); $('#rl').prop('disabled', true).trigger('liszt:updated'); $('#rl').val('').trigger('liszt:updated'); displayCPM(); newPrice(); checkSettings(); }); So for the next one all that changes will be the rl to cl to bm etc

    Read the article

  • Configure Zabbix to send email notifications through Exim

    - by gshankar
    I've been working through the installation and configuration of Zabbix over the past couple of days and I think I've finally got everything working... except the sending of notifications / alerts. I'm running on a Ubuntu server which is using Exim to send emails. I'd previously used this Exim setup to send notifications for Nagios so I know that Exim itself works. However, I can't seem to get Zabbix to send out notifications. Here's what I've done so far: Set up a "test trigger" like so: Trigger severity >= "Information" Send message to User "Admin" The Admin user has a email contact (and I've sent command line emails from Exim on the server using "sendmail" to this email address successfully) The media type for email is set. (I've tried 127.0.0.1) I've checked the user permissions and it is read/write for all host groups The triggers are definitely getting set but no actions are being called... I think my problem is within Zabbix as it's not actually executing the actions And idea how to configure this correctly?

    Read the article

  • Installing MySQL on Ubuntu 12 fails on a clean installation

    - by Keenora Fluffball
    I do have the problem, that even if I uninstall mysql completely and do a restart, it still doesn't install mysql. This is the error I get: Paketlisten werden gelesen... Fertig Abhängigkeitsbaum wird aufgebaut Statusinformationen werden eingelesen... Fertig Die folgenden zusätzlichen Pakete werden installiert: libdbd-mysql-perl libmysqlclient18 mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server-5.5 mysql-server-core-5.5 Vorgeschlagene Pakete: tinyca mailx Die folgenden NEUEN Pakete werden installiert: libdbd-mysql-perl libmysqlclient18 mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server mysql-server-5.5 mysql-server-core-5.5 0 aktualisiert, 8 neu installiert, 0 zu entfernen und 0 nicht aktualisiert. Es müssen 26,2 MB an Archiven heruntergeladen werden. Nach dieser Operation werden 94,2 MB Plattenplatz zusätzlich benutzt. Möchten Sie fortfahren [J/n]? J Hole:1 http://de.archive.ubuntu.com/ubuntu/ quantal-updates/main mysql-common all 5.5.28-0ubuntu0.12.10.1 [13,4 kB] Hole:2 http://de.archive.ubuntu.com/ubuntu/ quantal-updates/main libmysqlclient18 amd64 5.5.28-0ubuntu0.12.10.1 [949 kB] Hole:3 http://de.archive.ubuntu.com/ubuntu/ quantal/main libdbd-mysql-perl amd64 4.021-1 [97,7 kB] Hole:4 http://de.archive.ubuntu.com/ubuntu/ quantal-updates/main mysql-client-core-5.5 amd64 5.5.28-0ubuntu0.12.10.1 [1.941 kB] Hole:5 http://de.archive.ubuntu.com/ubuntu/ quantal-updates/main mysql-client-5.5 amd64 5.5.28-0ubuntu0.12.10.1 [8.332 kB] Hole:6 http://de.archive.ubuntu.com/ubuntu/ quantal-updates/main mysql-server-core-5.5 amd64 5.5.28-0ubuntu0.12.10.1 [5.983 kB] Hole:7 http://de.archive.ubuntu.com/ubuntu/ quantal-updates/main mysql-server-5.5 amd64 5.5.28-0ubuntu0.12.10.1 [8.842 kB] Hole:8 http://de.archive.ubuntu.com/ubuntu/ quantal-updates/main mysql-server all 5.5.28-0ubuntu0.12.10.1 [11,6 kB] Es wurden 26,2 MB in 1 min 5 s geholt (399 kB/s) Vorkonfiguration der Pakete ... Vormals nicht ausgewähltes Paket mysql-common wird gewählt. (Lese Datenbank ... 68073 Dateien und Verzeichnisse sind derzeit installiert.) Entpacken von mysql-common (aus .../mysql-common_5.5.28-0ubuntu0.12.10.1_all.deb) ... Vormals nicht ausgewähltes Paket libmysqlclient18:amd64 wird gewählt. Entpacken von libmysqlclient18:amd64 (aus .../libmysqlclient18_5.5.28-0ubuntu0.12.10.1_amd64.deb) ... Vormals nicht ausgewähltes Paket libdbd-mysql-perl wird gewählt. Entpacken von libdbd-mysql-perl (aus .../libdbd-mysql-perl_4.021-1_amd64.deb) ... Vormals nicht ausgewähltes Paket mysql-client-core-5.5 wird gewählt. Entpacken von mysql-client-core-5.5 (aus .../mysql-client-core-5.5_5.5.28-0ubuntu0.12.10.1_amd64.deb) ... Vormals nicht ausgewähltes Paket mysql-client-5.5 wird gewählt. Entpacken von mysql-client-5.5 (aus .../mysql-client-5.5_5.5.28-0ubuntu0.12.10.1_amd64.deb) ... Vormals nicht ausgewähltes Paket mysql-server-core-5.5 wird gewählt. Entpacken von mysql-server-core-5.5 (aus .../mysql-server-core-5.5_5.5.28-0ubuntu0.12.10.1_amd64.deb) ... Trigger für man-db werden verarbeitet ... mysql-common (5.5.28-0ubuntu0.12.10.1) wird eingerichtet ... Vormals nicht ausgewähltes Paket mysql-server-5.5 wird gewählt. (Lese Datenbank ... 68251 Dateien und Verzeichnisse sind derzeit installiert.) Entpacken von mysql-server-5.5 (aus .../mysql-server-5.5_5.5.28-0ubuntu0.12.10.1_amd64.deb) ... Vormals nicht ausgewähltes Paket mysql-server wird gewählt. Entpacken von mysql-server (aus .../mysql-server_5.5.28-0ubuntu0.12.10.1_all.deb) ... Trigger für man-db werden verarbeitet ... Trigger für ureadahead werden verarbeitet ... libmysqlclient18:amd64 (5.5.28-0ubuntu0.12.10.1) wird eingerichtet ... libdbd-mysql-perl (4.021-1) wird eingerichtet ... mysql-client-core-5.5 (5.5.28-0ubuntu0.12.10.1) wird eingerichtet ... mysql-client-5.5 (5.5.28-0ubuntu0.12.10.1) wird eingerichtet ... mysql-server-core-5.5 (5.5.28-0ubuntu0.12.10.1) wird eingerichtet ... mysql-server-5.5 (5.5.28-0ubuntu0.12.10.1) wird eingerichtet ... AppArmor parser error for /etc/apparmor.d/usr.sbin.mysqld in /etc/apparmor.d/usr.sbin.mysqld at line 9: >>abstractions/mysql<< konnte nicht ge?ffnet werden start: Job failed to start invoke-rc.d: initscript mysql, action "start" failed. dpkg: Fehler beim Bearbeiten von mysql-server-5.5 (--configure): Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück dpkg: Abhängigkeitsprobleme verhindern Konfiguration von mysql-server: mysql-server hängt ab von mysql-server-5.5; aber: Paket mysql-server-5.5 ist noch nicht konfiguriert. dpkg: Fehler beim Bearbeiten von mysql-server (--configure): Abhängigkeitsprobleme - verbleibt unkonfiguriert Trigger für libc-bin werden verarbeitet ... ldconfig deferred processing now taking place Es wurde kein Apport-Bericht verfasst, da die Fehlermeldung darauf hindeutet, dass dies lediglich ein Folgefehler eines vorherigen Problems ist. Fehler traten auf beim Bearbeiten von: mysql-server-5.5 mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1) Do you have any clue, whats going on here?

    Read the article

  • Ouya Controller on Windows 8 to Emulate a Microsoft 360 Controller

    - by TheCompander
    I thought I'd create a central repository for those looking to get their OUYA controller working in Windows. Currently there is an underlying Windows driver issue causing the left/right triggers to be recognized as Z-Axis and Z-Rotation as well as button presses. The Xbox 360 Controller Emulator is able to connect to the controller but the underlying driver issue causes the emulated Right Trigger to remain HIGH and consequently unusable by games that look for a 360 controller (eg. Batman Arkham Origins [tested today], all buttons work except the Right Trigger). Has anyone made progress in overcoming this issue? if not would anyone know where to start to modify the controller driver to ignore the z-axis? I was intrigued into investigate this out of interest and because there is no purely bluetooth game controller on the market to my knowledge.

    Read the article

  • Stop Zabbix notification for nodes under zabbix-proxy when proxy service is down

    - by A_01
    I have a zabbix-proxy and 12 nodes in that proxy. Right now whenever proxy service goes down. It send out of reach mail for all the 12 nodes. I want to send mail only for the zabbix proxy not for the nodes under that proxy Updated: Now I am trying to have a single trigger in which I want to check both the conditions like 1-check zabbix-host is not accessble from past x minutes. 2-check the host is not giving any data to the proxy(Host is down). Not the trigger should start shouting onle when we have condition in which proxy is running and node is down. I tried the below but its not working for me. Can some please help me out in this ({ip-10-4-1-17.ec2.internal:agent.ping.nodata(2m)}=1) & ({ip-10-4-1- 17.ec2.internal:zabbix[proxy,zabbixproxy.dev-test.com,lastaccess].fu??zzytime(120)}=1)

    Read the article

  • Postgres error messages in Apache error log

    - by Warren Pena
    I'm running Apache 2.2, PHP 5.2, and Postgres 8.2 on Windows, and I'm seeing something funky in Apache's error.log file. Occasionally, I'll see the message "row number -1 is out of range 0..-1" pop up over and over. Unlike all the other lines in that log file, there's no timestamp or log level. Just that exact string. Googling around, it appears that message is, character for character, a common Postgres error message, but is not an Apache error. I've seen it happen multiple times, and on several different servers. I can't seem to reproduce it, though. I've tried throwing all sorts of error ridden database queries and result set inquiries at Postgres via PHP, and none of them seem to trigger that line being written to the log file. Is it possible for Postgres errors to be ending up in my Apache log file, and if so, how? What would trigger an error message like that? Thanks!

    Read the article

  • Postgres error messages in Apache error log

    - by Warren Pena
    I'm running Apache 2.2, PHP 5.2, and Postgres 8.2 on Windows, and I'm seeing something funky in Apache's error.log file. Occasionally, I'll see the message "row number -1 is out of range 0..-1" pop up over and over. Unlike all the other lines in that log file, there's no timestamp or log level. Just that exact string. Googling around, it appears that message is, character for character, a common Postgres error message, but is not an Apache error. I've seen it happen multiple times, and on several different servers. I can't seem to reproduce it, though. I've tried throwing all sorts of error ridden database queries and result set inquiries at Postgres via PHP, and none of them seem to trigger that line being written to the log file. Is it possible for Postgres errors to be ending up in my Apache log file, and if so, how? What would trigger an error message like that? Thanks!

    Read the article

  • Accessing my Rails webrick behind proxy?

    - by Eki Eqbal
    In my mackbook, when I try to connect to my rails application in office I can't , in the office there are some http proxy , and when I run my rails like this : sudo rails s -p8080 => Booting WEBrick => Rails 3.0.5 application starting in development on http://0.0.0.0:8080 => Call with -d to detach => Ctrl-C to shutdown server [2012-03-20 12:49:34] INFO WEBrick 1.3.1 [2012-03-20 12:49:34] INFO ruby 1.8.7 (2010-01-10) [universal-darwin11.0] [2012-03-20 12:49:34] INFO WEBrick::HTTPServer#start: pid=17439 port=8080 The local IP is : en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 ether f8:1e:df:d8:8c:25 inet6 fe80::fa1e:dfff:fed8:8c25%en1 prefixlen 64 scopeid 0x5 inet 10.21.21.240 netmask 0xffffff00 broadcast 10.21.21.255 media: autoselect status: active so when I try in the browser to trigger localhost:8080 or 10.21.21.240:8080 , it seems that I can't trigger my application as for the proxy check out the following : Any Ideas ?

    Read the article

  • Training Exchange junk filter via OS X Mail.app

    - by Doug Harris
    My company uses Exchange 2007 for our mail server (via 3rd party hosted service), I use OS X Mail.app on my MacBook Pro. When viewing my junk folder in the webmail interface, there's a "Not Junk" button which will move the email out of the Junk folder. I can mimic the basic functionality in Mail.app by dragging the message from the junk folder to another folder. But... does this train the server? Specific questions: Does pressing the "Not Junk" button in the webmail interface (or Outlook) do anything more on the server side? Does Exchange used any sort of statistical spam filtering (e.g. bayesian filtering) based on this action? If the answer to #1 is yes, does moving the folder out of the junk folder in Mail.app trigger the statistical learning? If the answer to #2 is no, is there a different way to trigger the learning?

    Read the article

  • X-ming, Ubuntu apps - getting the Ubuntu style/theme to load

    - by user5402
    I am running X-ming on Windows 7 and using putty to ssh into an Ubuntu system. On the Ubuntu system I use the command: $ gnome-terminal & to display a terminal back on the Windows box. When I do this I don't get the standard Ubuntu style, i.e. dark purple background, Mono font, solid cursor (which I've configured in the Gnome Control Center.) Instead I get a very plain style - white background, blinking cursor, very small font. However, if I run gnome-control-center and then click on, say, the Keyboard icon, the terminal window will be reconfigured with the Ubuntu style with my customizations (e.g. block cursor vs. blinking cursor.) Just starting one of the control applets seems to trigger this style change. My question is: How can I trigger this style change more directly - without having to launch the Gnome Control center and launching one of the configuration applets?

    Read the article

  • freeradius maximum session time problem

    - by haw3d
    hello I'm using openvpn and free-radius for control user accounts. for maximum session time for an user, free-radius has sqlcounter.conf that control that, but after a connection has disconnected that is useful and cannot destroy a connection. for control account time dynamically i need another script that do that. but should anytime that a connection has established a trigger run. is anyway to fire a custom trigger or script when a connection has established? or any way to control session time dynamically?

    Read the article

  • Log monitoring using Zabbix

    - by Supratik
    I am trying to monitor a log file using Zabbix 1.8.4. I created an item using the following details: Host: Zabbix server Description: logger_test Type: Zabbix agent (active) Key: log[/tmp/scribetest/test3/test3_current,error,,100] Type of Infromation: Log Update interval (in sec): 1 sec Keep history (in days): 90 Status: Active Applications: Log files I created a trigger and attached it with the item logger_test using the following details: Name: logger_test_trigger Expression: {Zabbix server:log[/tmp/scribetest/test3/test3_current,error,,100].str(error)}=1 Severity: disaster The above settings works fine for the first time but next time the trigger shows ZBX_NOTSUPPORTED and after that item also shows "not supported" message. Can you please tell me if anything I am doing wrong here ?

    Read the article

  • Log monitoring using Zabbix

    - by Supratik
    Hi I am monitoring logs using Zabbix. I am trying to monitor a log file using Zabbix 1.8.4. I created an item using the following details: Host: Zabbix server Description: logger_test Type: Zabbix agent (active) Key: log[/tmp/scribetest/test3/test3_current,error,,100] Type of Infromation: Log Update interval (in sec): 1 sec Keep history (in days): 90 Status: Active Applications: Log files I created a trigger and attached it with the item logger_test using the following details. Name: logger_test_trigger Expression: {Zabbix server:log[/tmp/scribetest/test3/test3_current,error,,100].str(error)}=1 Severity: disaster The above settings works fine for the first time but next time the trigger shows ZBX_NOTSUPPORTED and after that item also shows "not supported" message. Can you please tell me if anything I am doing wrong here ? Warm Regards Supratik

    Read the article

  • Windows 2008 R2 Task Scheduler triggered an event for unknown reasons.

    - by Mike
    Today I arrived at the office only to find that a task, which was scheduled to trigger at 5:30PM EST each Friday, had triggered on its own at 6:01AM EST this morning. I checked the event logs as well as the task schedule log and all of the evidence points to a timed trigger starting this task with the correct credentials, however the task history reports the task has not been triggered since last Friday when it ran to completion successfully. I do not have this task set to random start times or start if missed. This is the first time I have observed this happen in the Windows Task Scheduler and want to know if anyone else has come across this, why it happened and how to fix it?

    Read the article

  • Handling expected supervisord exit codes

    - by Mulkave
    I am using supervisord inside a Docker container to manage my running processes and would like to also use it to trigger certain commands - run them once and expect them to exit with 0. Here's one example: [program:central-seed-posts] command = /usr/bin/php /var/www/app/artisan post autostart = false autorestart = false startsecs = 3 startretries = 0 exitcodes = 0 stderr_logfile=/tmp/central/posts-stderr-supervisor.log stdout_logfile=/tmp/central/posts-stdout-supervisor.log And I'm using nsenter's docker-enter with supervisorctl start central-seed-posts to trigger it but I would also like to handle a successful exit instead of supervisor telling me ERROR (abnormal termination) Does it have to do with supervisor events ?

    Read the article

  • How to auto advance a PowerPoint slide after an exit animation is over?

    - by joooc
    PowerPoint entrance animation set up with "Start: With Previous" starts right when a new slide is advanced. However, if you set up an exit animation in the same way, it doesn't start with a slide ending sequence. Instead, the "Start: On Click" trigger needs to be used and after your exit animation is over you still need one extra click just to advance to the next slide. Workarounds to this are obvious: create a duplicate slide, make your ending animations from the original slide being your starting animations on the duplicate slide and let them be followed with whatever you want or create a transition slide with those ending animations only and set up "Change Advance slide - Automatically after - [the time it takes your animations to finish]". These workarounds will make it work for your audience, visually. However, it has an impact on slide numbers you might need to adjust accordingly and/or duplicate content changes. If you are the only one creating and using your presentation, this might be just fine. But if you are creating a presentation in collaborative mode with three other people and don't even know who will be the presenter at the end, you can mess things up. Let's be specific: most of my slides have 0.2s fly in entrance animation applied to blocks of content coming from right, bottom or left. Advancing to the next slide I want them to fly out in another 0.2s exit animation being followed by new slide 0.2s fly in entrance animation of the new blocks. The swapping of the blocks should be triggered while advancing to the next slide, as usually. As mentioned, I'm not able to achieve this without one extra click between the slides. I wrote a VBA script that should start together with an exit animation and will auto advance a slide after 0.3s when the exit animation is over. That way I should get rid of those extra clicks which are needed right now. Sub nextslide() iTime = 0.3 Start = Timer While Timer < Start + iTime DoEvents Wend With SlideShowWindows(1).View .GotoSlide (ActivePresentation.SlideShowWindow.View.Slide.SlideIndex + 1) End With End Sub It works well when binded on a box, button or another object. But I can't make it run on a single click (anywhere on the slide) so that it could start together with the exit animation onclick trigger. Creating a big transparent rectangular shape over the whole slide and binding the macro on it doesn't help either. By clicking it you only get the macro running, exit animation is not triggered. Anyway, I don't want to bind the macro to any other workaround object but the slide itself. Anyone knows how to trigger a PowerPoint VBA script on slide onclick event? Anyone knows a secret setting that will make the exit animation work as expected i.e. animating right before exiting a slide while transitioning to the next one? Anyone knows how to beat this dragon? Thank you!

    Read the article

  • Why does WPF Style to show validation errors in ToolTip work for a TextBox but fails for a ComboBox?

    - by Mike B
    I am using a typical Style to display validation errors as a tooltip from IErrorDataInfo for a textbox as shown below and it works fine. <Style TargetType="{x:Type TextBox}"> <Style.Triggers> <Trigger Property="Validation.HasError" Value="true"> <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/> </Trigger> </Style.Triggers> </Style> But when i try to do the same thing for a ComboBox like this it fails <Style TargetType="{x:Type ComboBox}"> <Style.Triggers> <Trigger Property="Validation.HasError" Value="true"> <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/> </Trigger> </Style.Triggers> </Style> The error I get in the output window is: System.Windows.Data Error: 17 : Cannot get 'Item[]' value (type 'ValidationError') from '(Validation.Errors)' (type 'ReadOnlyObservableCollection`1'). BindingExpression:Path=(0)[0].ErrorContent; DataItem='ComboBox' (Name='ownerComboBox'); target element is 'ComboBox' (Name='ownerComboBox'); target property is 'ToolTip' (type 'Object') ArgumentOutOfRangeException:'System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.Parameter name: index' Oddly it also attempts to make invalid Database changes when I close the window if I change any ComboBox values (This is also when the binding error occurs)!!! Cannot insert the value NULL into column 'EmpFirstName', table 'OITaskManager.dbo.Employees'; column does not allow nulls. INSERT fails. The statement has been terminated. Simply by commenting the style out everyting works perfectly. How do I fix this? Just in case anyone needs it one of the comboBox' xaml follows: <ComboBox ItemsSource="{Binding Path=Employees}" SelectedValuePath="EmpID" SelectedValue="{Binding Path=SelectedIssue.Employee2.EmpID, Mode=OneWay, ValidatesOnDataErrors=True}" ItemTemplate="{StaticResource LastNameFirstComboBoxTemplate}" Height="28" Name="ownerComboBox" Width="120" Margin="2" SelectionChanged="ownerComboBox_SelectionChanged" /> <DataTemplate x:Key="LastNameFirstComboBoxTemplate"> <TextBlock> <TextBlock.Text> <MultiBinding StringFormat="{}{1}, {0}" > <Binding Path="EmpFirstName" /> <Binding Path="EmpLastName" /> </MultiBinding> </TextBlock.Text> </TextBlock> </DataTemplate> SelectionChanged: (I do plan to implement commanding before long but, as this is my first WPF project I have not gone full MVVM yet. I am trying to take things in small-medium sized bites) // This is done this way to maintain the DataContext Integrity // and avoid an error due to an Object being "Not New" in Linq-to-SQL private void ownerComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { Employee currentEmpl = ownerComboBox.SelectedItem as Employee; if (currentEmpl != null && currentEmpl != statusBoardViewModel.SelectedIssue.Employee2) { statusBoardViewModel.SelectedIssue.Employee2 = currentEmpl; } }

    Read the article

  • "'0.offsetWidth' is null or not an object" - Coda Slider - Javascript Error Question

    - by bgadoci
    I implemented the Coda Slider tutorial successfully that is located here: http://jqueryfordesigners.com/coda-slider-effect/ The slider works great but I am getting a javascript error that I am not sure how to fix. The error says: '0.offsetWidth' is null or not an object coda-slider.js, line 19 character 3 Not sure how to fix it. Anyone have any ideas? Here is my js and css (don't think I need to upload the HTML but let me know if that helps). JS (coda-slider.js) // when the DOM is ready... $(document).ready(function () { var $panels = $('#slider .scrollContainer > div'); var $container = $('#slider .scrollContainer'); // if false, we'll float all the panels left and fix the width // of the container var horizontal = true; // float the panels left if we're going horizontal if (horizontal) { $panels.css({ 'float' : 'left', 'position' : 'relative' // IE fix to ensure overflow is hidden }); // calculate a new width for the container (so it holds all panels) $container.css('width', $panels[0].offsetWidth * $panels.length); <------line 19 } // collect the scroll object, at the same time apply the hidden overflow // to remove the default scrollbars that will appear var $scroll = $('#slider .scroll').css('overflow', 'hidden'); // apply our left + right buttons $scroll .before('<img class="scrollButtons left" src="/images/layout/navigation/scroll_left.png" />') .after('<img class="scrollButtons right" src="/images/layout/navigation/scroll_right.png" />'); // handle nav selection function selectNav() { $(this) .parents('ul:first') .find('a') .removeClass('selected') .end() .end() .addClass('selected'); } $('#slider .navigation').find('a').click(selectNav); // go find the navigation link that has this target and select the nav function trigger(data) { var el = $('#slider .navigation').find('a[href$="' + data.id + '"]').get(0); selectNav.call(el); } if (window.location.hash) { trigger({ id : window.location.hash.substr(1) }); } else { $('ul.navigation a:first').click(); } // offset is used to move to *exactly* the right place, since I'm using // padding on my example, I need to subtract the amount of padding to // the offset. Try removing this to get a good idea of the effect var offset = parseInt((horizontal ? $container.css('paddingTop') : $container.css('paddingLeft')) || 0) * -1; var scrollOptions = { target: $scroll, // the element that has the overflow // can be a selector which will be relative to the target items: $panels, navigation: '.navigation a', // selectors are NOT relative to document, i.e. make sure they're unique prev: 'img.left', next: 'img.right', // allow the scroll effect to run both directions axis: 'xy', onAfter: trigger, // our final callback offset: offset, // duration of the sliding effect duration: 500, // easing - can be used with the easing plugin: // http://gsgd.co.uk/sandbox/jquery/easing/ easing: 'swing' }; // apply serialScroll to the slider - we chose this plugin because it // supports// the indexed next and previous scroll along with hooking // in to our navigation. $('#slider').serialScroll(scrollOptions); // now apply localScroll to hook any other arbitrary links to trigger // the effect $.localScroll(scrollOptions); // finally, if the URL has a hash, move the slider in to position, // setting the duration to 1 because I don't want it to scroll in the // very first page load. We don't always need this, but it ensures // the positioning is absolutely spot on when the pages loads. scrollOptions.duration = 1; $.localScroll.hash(scrollOptions); }); CSS #slider { margin-left: 35px; position: relative; width: 875px; } .scroll { position: relative; width: 875px; height: 268px; overflow: auto; /* fix for IE to respect overflow */ background: #FFFFFF scroll 0; } .scrollContainer div.panel { position: relative; height: 210px; width: 875px; /* change to 560px if not using JS to remove rh.scroll */ } .scrollButtons { position: absolute; top: 115px; cursor: pointer; } .scrollButtons.left { left: -20px; } .scrollButtons.right { right: -20px; }

    Read the article

  • Delphi: how to create Firebird database programmatically

    - by Brad
    I'm using D2K9, Zeos 7Alpha, and Firebird 2.1 I had this working before I added the autoinc field. Although I'm not sure I was doing it 100% correctly. I don' know what order to do the SQL code, with the triggers, Generators, etc.. I've tried several combinations, I'm guessing I'm doing something wrong other than just that for this not to work. SQL File From IB Expert : /********************************************/ /* Generated by IBExpert 5/4/2010 3:59:48 PM / /*********************************************/ /********************************************/ /* Following SET SQL DIALECT is just for the Database Comparer / /*********************************************/ SET SQL DIALECT 3; /********************************************/ /* Tables / /*********************************************/ CREATE GENERATOR GEN_EMAIL_ACCOUNTS_ID; CREATE TABLE EMAIL_ACCOUNTS ( ID INTEGER NOT NULL, FNAME VARCHAR(35), LNAME VARCHAR(35), ADDRESS VARCHAR(100), CITY VARCHAR(35), STATE VARCHAR(35), ZIPCODE VARCHAR(20), BDAY DATE, PHONE VARCHAR(20), UNAME VARCHAR(255), PASS VARCHAR(20), EMAIL VARCHAR(255), CREATEDDATE DATE, "ACTIVE" BOOLEAN DEFAULT 0 NOT NULL /* BOOLEAN = SMALLINT CHECK (value is null or value in (0, 1)) /, BANNED BOOLEAN DEFAULT 0 NOT NULL / BOOLEAN = SMALLINT CHECK (value is null or value in (0, 1)) /, "PUBLIC" BOOLEAN DEFAULT 0 NOT NULL / BOOLEAN = SMALLINT CHECK (value is null or value in (0, 1)) */, NOTES BLOB SUB_TYPE 0 SEGMENT SIZE 1024 ); /********************************************/ /* Primary Keys / /*********************************************/ ALTER TABLE EMAIL_ACCOUNTS ADD PRIMARY KEY (ID); /********************************************/ /* Triggers / /*********************************************/ SET TERM ^ ; /********************************************/ /* Triggers for tables / /*********************************************/ /* Trigger: EMAIL_ACCOUNTS_BI */ CREATE OR ALTER TRIGGER EMAIL_ACCOUNTS_BI FOR EMAIL_ACCOUNTS ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF (NEW.ID IS NULL) THEN NEW.ID = GEN_ID(GEN_EMAIL_ACCOUNTS_ID,1); END ^ SET TERM ; ^ /********************************************/ /* Privileges / /*********************************************/ Triggers: /********************************************/ /* Following SET SQL DIALECT is just for the Database Comparer / /*********************************************/ SET SQL DIALECT 3; CREATE GENERATOR GEN_EMAIL_ACCOUNTS_ID; SET TERM ^ ; CREATE OR ALTER TRIGGER EMAIL_ACCOUNTS_BI FOR EMAIL_ACCOUNTS ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF (NEW.ID IS NULL) THEN NEW.ID = GEN_ID(GEN_EMAIL_ACCOUNTS_ID,1); END ^ SET TERM ; ^ Generators: CREATE SEQUENCE GEN_EMAIL_ACCOUNTS_ID; ALTER SEQUENCE GEN_EMAIL_ACCOUNTS_ID RESTART WITH 2; /* Old syntax is: CREATE GENERATOR GEN_EMAIL_ACCOUNTS_ID; SET GENERATOR GEN_EMAIL_ACCOUNTS_ID TO 2; */ My Code: procedure TForm2.New1Click(Sender: TObject); var query:string; begin if JvOpenDialog1.Execute then begin ZConnection1.Disconnect; ZConnection1.Database:= jvOpenDialog1.FileName; if not FileExists(ZConnection1.database) then begin ZConnection1.Properties.Add('createnewdatabase=create database '''+ZConnection1.Database+''' user ''sysdba'' password ''masterkey'' page_size 4096 default character set iso8859_2;'); try ZConnection1.Connect; except ShowMessage('Error Connection To Database File'); application.Terminate; end; end else begin ShowMessage('Database File Already Exists.'); exit; end; end; query := 'CREATE DOMAIN BOOLEAN AS SMALLINT CHECK (value is null or value in (0, 1))'; Zconnection1.ExecuteDirect(query); query:='CREATE TABLE EMAIL_ACCOUNTS (ID INTEGER NOT NULL,FNAME VARCHAR(35),LNAME VARCHAR(35),'+ 'ADDRESS VARCHAR(100), CITY VARCHAR(35), STATE VARCHAR(35), ZIPCODE VARCHAR(20),' + 'BDAY DATE, PHONE VARCHAR(20), UNAME VARCHAR(255), PASS VARCHAR(20),' + 'EMAIL VARCHAR(255),CREATEDDATE DATE , '+ '"ACTIVE" BOOLEAN DEFAULT 0 NOT NULL,'+ 'BANNED BOOLEAN DEFAULT 0 NOT NULL,'+ '"PUBLIC" BOOLEAN DEFAULT 0 NOT NULL,' + 'NOTES BLOB SUB_TYPE 0 SEGMENT SIZE 1024)'; //ZConnection.ExecuteDirect('CREATE TABLE NOTES (noteTitle TEXT PRIMARY KEY,noteDate DATE,noteNote TEXT)'); Zconnection1.ExecuteDirect(query); { } query := 'CREATE SEQUENCE GEN_EMAIL_ACCOUNTS_ID;'+ 'ALTER SEQUENCE GEN_EMAIL_ACCOUNTS_ID RESTART WITH 1'; Zconnection1.ExecuteDirect(query); query := 'ALTER TABLE EMAIL_ACCOUNTS ADD PRIMARY KEY (ID)'; Zconnection1.ExecuteDirect(query); query := 'SET TERM ^'; Zconnection1.ExecuteDirect(query); query := 'CREATE OR ALTER TRIGGER EMAIL_ACCOUNTS_BI FOR EMAIL_ACCOUNTS'+ 'ACTIVE BEFORE INSERT POSITION 0'+ 'AS'+ 'BEGIN'+ 'IF (NEW.ID IS NULL) THEN'+ 'NEW.ID = GEN_ID(GEN_EMAIL_ACCOUNTS_ID,1);'+ 'END'+ '^'+ 'SET TERM ; ^'; Zconnection1.ExecuteDirect(query); ZTable1.Active:=true; end;

    Read the article

  • DataTrigger inside ControlTemplate doesn't update

    - by kennethkryger
    I have a ListBox that is bound to a list of CustomerViewModel-objects, that each has two dependency properties: - Name (string) - Description (string) - IsVisible (bool) (the IsVisible property is True by default and is reversed via the ToggleVisibility Command on the CustomerViewModel) I would like to display the Name and Description to the right of a Border-control, that is has a Transparent background when the IsVisible property is True and Green when the False. My problem is that the DataTrigger part of the code below doesn't work the way I want, because the Setter-part isn't triggered when the IsVisible is changed. What am I doing wrong? Here's my code: <UserControl.Resources> <Style x:Key="ListBoxStyle" TargetType="{x:Type ListBox}"> <Setter Property="Margin" Value="-1,-1,0,0" /> <Setter Property="BorderThickness" Value="0" /> <Setter Property="Background" Value="Transparent" /> <Setter Property="ItemContainerStyle" Value="{DynamicResource ListboxItemStyle}" /> <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" /> </Style> <Style x:Key="ListboxItemStyle" TargetType="{x:Type ListBoxItem}"> <Setter Property="Background" Value="Transparent" /> <Setter Property="FocusVisualStyle" Value="{x:Null}" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ListBoxItem}"> <Grid> <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="#FFD4D6D5" BorderThickness="0,0,0,1"> <Grid Height="70" Margin="0,0,10,0"> <Grid.RowDefinitions> <RowDefinition Height="10" /> <RowDefinition Height="Auto" /> <RowDefinition /> <RowDefinition Height="10" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition /> </Grid.ColumnDefinitions> <Border x:Name="visibilityColumn" Grid.Row="0" Grid.Column="0" Grid.RowSpan="4" Background="Transparent" Width="4" Margin="0,0,4,0" /> <TextBlock x:Name="customerName" Grid.Row="1" Grid.Column="1" Foreground="#FF191919" FontWeight="Bold" Text="{Binding Name}" VerticalAlignment="Top" /> <TextBlock Grid.Row="2" Grid.Column="1" VerticalAlignment="Stretch" Text="{Binding Description}" TextWrapping="Wrap" Foreground="#FFB4B4B4" TextTrimming="CharacterEllipsis" /> </Grid> <Border.ContextMenu> <ContextMenu> <MenuItem Header="Edit..." /> <MenuItem Header="Visible" IsCheckable="True" IsChecked="{Binding IsVisible}" Command="{Binding ToggleVisibility}"/> </ContextMenu> </Border.ContextMenu> </Border> </Grid> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Background" Value="#FFEEEEEE" /> </Trigger> <Trigger Property="IsSelected" Value="True"> <Setter Property="Background" Value="#FFF5F5F5" /> <Setter TargetName="customerName" Property="Foreground" Value="Green" /> </Trigger> <DataTrigger Binding="{Binding IsVisible}" Value="False"> <!--If Value="True" the customerName Border shows up green!--> <Setter Property="Background" Value="Green" /> </DataTrigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> </UserControl.Resources> <ListBox Style="{StaticResource ListBoxStyle}" ItemsSource="{Binding CustomerViewModels}" />

    Read the article

  • WPF Xaml Custom Styling Selected Item Style in a ListBox

    - by John Batdorf
    I have a list box that scrolls images horizontally. I have the following XAML I used blend to create it. It originally had a x:Key on the Style TaregetType line, MSDN said to remove it, as I was getting errors on that. Now I'm getting this error: Error 3 Operation is not valid while ItemsSource is in use. Access and modify elements with ItemsControl.ItemsSource instead. I don't understand how to apply all of this junk that way, I've tried several thing, nothing is working. My goal is to have the selected item's background be white, not blue. Seems like a lot of work for something so small! Thanks. <ListBox ItemsSource="{Binding Source={StaticResource WPFApparelCollection}}" Grid.Row="1" Margin="2,26,2,104" ScrollViewer.VerticalScrollBarVisibility="Hidden" ScrollViewer.HorizontalScrollBarVisibility="Hidden" SelectionMode="Single" x:Name="list1" MouseLeave="List1_MouseLeave" MouseMove="List1_MouseMove" Style="{DynamicResource ListBoxStyle1}" > <Style TargetType="{x:Type ListBoxItem}"> <Setter Property="Background" Value="Transparent"/> <Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/> <Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/> <Setter Property="Padding" Value="2,0,0,0"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ListBoxItem}"> <Border x:Name="Bd" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}"> <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/> </Border> <ControlTemplate.Triggers> <Trigger Property="IsSelected" Value="true"> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/> <Setter Property="Background" TargetName="Bd" Value="#FFFFFFFF"/> </Trigger> <MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsSelected" Value="true"/> <Condition Property="Selector.IsSelectionActive" Value="false"/> </MultiTrigger.Conditions> <Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/> </MultiTrigger> <Trigger Property="IsEnabled" Value="false"> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <ListBox.ItemsPanel> <ItemsPanelTemplate> <VirtualizingStackPanel Orientation="Horizontal" IsItemsHost="True" /> </ItemsPanelTemplate> </ListBox.ItemsPanel> <ListBox.ItemTemplate> <DataTemplate> <Image Source="{Binding Image}" /> </DataTemplate> </ListBox.ItemTemplate> </ListBox>

    Read the article

< Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >