Search Results

Search found 784 results on 32 pages for 'da cheng'.

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

  • Reload table view in real time

    - by Lucas Vallim da Costa
    The app receives a UILocalNotification, but if the user is at the UITableViewController at the fire time, the table view (containing the scheduled notifications) does not reload. The user has to get out of that view and load the view again so that the cells are loaded and, as the notification was already fired, it will not be displayed on any cell of that table view. Problem is: If the user touches the specific tableView cell that contained the notification that just fired, the app crashes, cause the notification is not there anymore. I've implemented the - (void)reloadData in every place possible, and it still doesn't load in real time. What would be a better solution for this? Other detail, how can I push a specific view after the notification is displayed (when the user slides the app icon when the phone is locked)? Any help will be truly appreciated, since theres are the last details remaining to publish my first App.

    Read the article

  • javascript watching for variable change via a timer

    - by DA
    I have a slide show where every 10 seconds the next image loads. Once an image loads, it waits 10 seconds (setTimeout) and then calls a function which fades it out, then calls the function again to fade in the next image. It repeats indefinitely. This works. However, at times, I'm going to want to over-ride this "function1 call - pause - function2 call - function1 call" loop outside of this function (for instance, I may click on a slide # and want to jump directly to that slide and cancel the current pause). One solution seems to be to set up a variable, allow other events to change that variable and then in my original function chain, check for any changes before continuing the loop. I have this set up: var ping = 500; var pausetime = 10000; for(i=0; i<=pausetime; i=i+ping){ setTimeout(function(){ console.log(gocheckthevariable()); console.log(i); pseudoIf('the variable is true AND the timer is done then...do the next thing') },i) } The idea is that I'd like to pause for 10 seconds. During this pause, every half second I'll check to see if this should be stopped. The above will write out to the console the following every half second: true 10000 true 10000 true 10000 etc... But what I want/need is this: true 0 true 500 true 1000 etc... The basic problem is that the for loop executes before each of the set timeouts. While I can check the value of the variable every half second, I can't match that against the current loop index. I'm sure this is a common issue, but I'm at a loss what I should actually be searching for.

    Read the article

  • jquery focusin() and preventing bubbling.

    - by DA
    I'm showing a div via an onclick event. If you click outside the div, I want to hide it. To do so, I'm binding a one time click event on the body: $('body').one('click.myDivPopup', function(e) { ...close my div... }); Within the div itself, I tell it to not propogate events so that actually clicking within the div won't trigger a click on the body: $myDiv.click(function(e){e.stopPropagation()}); This works fine as intended. I also want to hide the div if one tabs out of the div. My thinking was that in that scenario, I could use a focusin event on the body: $('body').one('focusin.myDivPopup', function(e) { ...close my div... }); Again, I don't want the events to bubble out of the div itself, so added this: $myDiv.focusin(function(e){e.preventDefault()}); This does NOT work. Changing focus within elements within myDiv triggers the focusin event on the body. Is this maybe a bug in jQuery? If so is there a better way to accomplish this?

    Read the article

  • Optional URL fragment in Codeigniter?

    - by DA
    This is maybe a simple syntax question or possibly a best-practices question in terms of codeigniter. I should start by saying I'm not a PHP or Codeigniter person so trying to get up to speed on helping on a project. I've found the CI documentation fairly good. The one question I can't find an answer to is how to make part of a URL optional. An example the CI documentation uses is this: example.com/index.php/products/shoes/sandals/123 and then the function used to parse the URI: function shoes($sandals, $id) For my example, I'd like to be able to modify the URL as such: example.com/index.php/products/shoes/all So, if no ID is passed, it's just ignored. Can that be done? Should that be done? A second question unrelated to my problem but pertaining to the example above, why would the variable $sandals be used as in the example, the value is 'sandals'? Shouldn't that variable be something like $shoetype?

    Read the article

  • finding last loop through a jQuery object

    - by DA
    Sample jquery. Assume $cog is a cached selector of multiple items. $cog.fadeOut('slow',function(){ alert('hey'); }) In that example, of $cog is a jQuery object of 4 DOM elements, the above will fade each element out one by one, and trigger an alert each time on the callback (4 alerts). I'd like to only call the alert when all 4 elements are done with their fadeOut function. This: $cog.fadeOut('slow',function(){ }) alert('hey'); when run, will show an alert, then the $cog elements disappear (I'm guessing due to timing issues with the fadeOut animation) Is there a way when calling a function against multiple DOM objects in a jQuery object to know when it's done with the last item?

    Read the article

  • eth0:0 is configured but not listed in ifconfig output

    - by FractalizeR
    Hello. I have the following problem: My server was given two IPs from [b]different[/b] subnets. Now I am trying to configure the system to work properly. I have created [root@server ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 # Intel Corporation 80003ES2LAN Gigabit Ethernet Controller (Copper) HWADDR=00:30:48:DA:B1:0E DEVICE=eth0 BOOTPROTO=none BROADCAST=79.174.69.255 IPADDR=79.174.69.241 NETMASK=255.255.254.0 NETWORK=79.174.68.0 ONBOOT=yes GATEWAY=79.174.68.1 TYPE=Ethernet [root@server ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0:0 # Intel Corporation 80003ES2LAN Gigabit Ethernet Controller (Copper) HWADDR=00:30:48:DA:B1:0E DEVICE=eth0 BOOTPROTO=none BROADCAST=79.174.69.255 IPADDR=79.174.71.74 NETMASK=255.255.255.0 NETWORK=79.174.71.1 ONBOOT=yes GATEWAY=79.174.71.1 TYPE=Ethernet But both after "service network restart" and after "reboot" [root@server ~]# ifconfig eth0 Link encap:Ethernet HWaddr 00:30:48:DA:B1:0E inet addr:79.174.71.74 Bcast:79.174.71.255 Mask:255.255.255.0 inet6 addr: fe80::230:48ff:feda:b10e/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:910284 errors:0 dropped:0 overruns:0 frame:0 TX packets:2924 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:257964879 (246.0 MiB) TX bytes:232450 (227.0 KiB) Memory:df220000-df240000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:27 errors:0 dropped:0 overruns:0 frame:0 TX packets:27 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:6976 (6.8 KiB) TX bytes:6976 (6.8 KiB) Device eth0:0 is not shown as active. If I try [root@server ~]# ifconfig eth0:0 eth0:0 Link encap:Ethernet HWaddr 00:30:48:DA:B1:0E UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Memory:df220000-df240000 It is shown as up and running, but IP is not assigned to it. Also it is strange, that IP address assigned to eth0:0 in config file is used by eth0. /var/log/messages shows nothing about network configuration errors on either eth0 or eth0:0. system-config-network seem to understand all settings correctly and resaves them ok also. "ifup eth0:0" executes ok, but ifconfig afterwards shows no eth0:0 device after that. What did I do wrong? May be the problem is that IPs are from different subnets?

    Read the article

  • systemd initiated uwsgi process shuts down after a while

    - by Calvin Cheng
    So I wrote this simple systemd service script:- [Unit] Description=uwsgi server script [Service] User=web Group=web WorkingDirectory=/var/www/prod/myproject/releases/current ExecStart=/bin/bash -c 'source ~/.bash_profile; workon myproject; uwsgi --ini /var/www/prod/myproject/releases/current/myproject/uwsgi_prod.ini' [Install] WantedBy=multi-user.target which works fine - it starts up and I can see my uwsgi processes in htop. However, it inexplicably shuts down after being idle for 5 minutes. If I start this process manually in bash console by executing, as web user:- source ~/.bash_profile workon myproject uwsgi --ini /var/www/prod/myproject/releases/current/myproject/uwsgi_prod.ini my process does not die after being idle. What could the problem be?

    Read the article

  • How do I disable other monitors while running games in Wine?

    - by Michael Cheng
    My current setup is: * Dual GTS 250 video cards * 3 Monitors * Used nvidia-settings to run each monitor as a separate x session * This is all running on Linux Mint Debian Edition When running games (Starcraft II) in Wine via PlayOnLinux, I've found that the mouse does not get locked. I already tried various solutions littered across the web and none work so I'd rather just disable my other two monitors while playing. Does anyone know of a method where I can turn off my other two monitors (not my primary monitor) while running Wine and then turn then back on afterwards? I don't mind having to manually run a script before and after gaming. Thanks.

    Read the article

  • How to run Event Viewer as another user?

    - by Ray Cheng
    I want to create a shortcut to run Windows Event Viewer as another user, but the following doesn't seem to work. Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Windows\System32>C:\Windows\System32\runas.exe /noprofile /user:domain\username "C:\Windows\system32\eventvwr.msc /s" Enter the password for domain\username: Attempting to start C:\Windows\system32\eventvwr.msc /s as user "dnr\adm_rche490" ... RUNAS ERROR: Unable to run - C:\Windows\system32\eventvwr.msc /s 193: C:\Windows\system32\eventvwr.msc /s is not a valid Win32 application. But if I create the shortcut without the runas part, it works but with the current logon user. What am I doing wrong?

    Read the article

  • How to implement Comet in database side?

    - by Morgan Cheng
    I have been searched for this question for a long time. How to implement Comet in database side? To support Comet, we'd better have a web server stack that supports asynchronous operation. So, Apache is not a option. There are some open source web server such as tornado can do asynchronous http handling. This is in web server level. In database level, how to make web server know that some event happens in database? There should be a asynchronous way to let web server know that something updated in database. Polling is not a option. Is there any example available?

    Read the article

  • placing shell script under systemd control

    - by Calvin Cheng
    Assuming I have a shell script like this:- #!/bin/sh # cherrypy_server.sh PROCESSES=10 THREADS=1 # threads per process BASE_PORT=3035 # the first port used # you need to make the PIDFILE dir and insure it has the right permissions PIDFILE="/var/run/cherrypy/myproject.pid" WORKDIR=`dirname "$0"` cd "$WORKDIR" cp_start_proc() { N=$1 P=$(( $BASE_PORT + $N - 1 )) ./manage.py runcpserver daemonize=1 port=$P pidfile="$PIDFILE-$N" threads=$THREADS request_queue_size=0 verbose=0 } cp_start() { for N in `seq 1 $PROCESSES`; do cp_start_proc $N done } cp_stop_proc() { N=$1 #[ -f "$PIDFILE-$N" ] && kill `cat "$PIDFILE-$N"` [ -f "$PIDFILE-$N" ] && ./manage.py runcpserver pidfile="$PIDFILE-$N" stop rm -f "$PIDFILE-$N" } cp_stop() { for N in `seq 1 $PROCESSES`; do cp_stop_proc $N done } cp_restart_proc() { N=$1 cp_stop_proc $N #sleep 1 cp_start_proc $N } cp_restart() { for N in `seq 1 $PROCESSES`; do cp_restart_proc $N done } case "$1" in "start") cp_start ;; "stop") cp_stop ;; "restart") cp_restart ;; *) "$@" ;; esac From the bash script, we can essentially do 3 things: start the cherrypy server by calling ./cherrypy_server.sh start stop the cherrypy server by calling ./cherrypy_server.sh stop restart the cherrypy server by calling ./cherrypy_server.sh restart How would I place this shell script under systemd's control as a cherrypy.service file (with the obvious goal of having systemd start up the cherrypy server when a machine has been rebooted)? Reference systemd service file example here - https://wiki.archlinux.org/index.php/Systemd#Using_service_file

    Read the article

  • systemd: enabling cherokee service as a `unit file`

    - by Calvin Cheng
    So I am learning how to use systemd to initialize my services automatically on server reboot. So of course, I first make sure I have systemd and some optional systemd related packages installed. pacman -S systemd initscripts-systemd Installation seems to go well and checking, I can see that systemd and its dependency libsystemd are installed. And the optional package initscripts-systemd is also installed:- [root@li280-195 ~]# pacman -Ss systemd extra/libsystemd 44-5 [installed] systemd client libraries extra/systemd 44-5 [installed] system and service manager extra/systemd-sysvcompat 2-2 sysvinit compat symlinks for systemd community/initscripts-systemd 20120412-1 [installed] Arch specific systemd initialization/bootup scripts for systemd community/systemd-arch-units 20120412-2 Arch specific Systemd unit files Next, I ensure that systemd is loaded up when my server reboots, via grub in grub's /boot/grub/menu.lst file like this:- kernel /boot/vmlinuz root=/dev/xvda ro init=/bin/systemd Rebooting my server to check, all loads up well and I can check that systemd is operational via:- systemctl list-unit-files However, I don't see my cherokee initialization script (which is simply created at /etc/rc.d/cherokee when I installed cherokee earlier via pacman -S cherokee) being listed as one of my unit files. So the question is, how do I do that? How do I put my cherokee initialization script under systemd's control?

    Read the article

  • How do I add new users to PostgreSQL 9.1 on Mac OS X 10.6?

    - by Cheng
    I am unable to run psql with my normal Mac user account in Terminal session, although I can do it using the postgres service account). When I enter the command psql mydb and type my password, I get the following message: WARNING: password file "/Users/beh/.pgpass" has group or world access; permissions should be u=rw (0600) or less But I cannot find .pgpass. How do I set up and add users to my PostgreSQL 9.1 database on Mac OS X 10.6.8?

    Read the article

  • HTTP 401 error in Windows Authentication disappears after swapping Providers

    - by Ray Cheng
    The IIS 7 on Windows 2008 R2 is acting really weird. We deploy our web apps as web sites with appcmd.exe. After they are deployed, if I browse to them, I'll get HTTP 401 errors. The web sites are only have Windows Authentication enabled and the providers are Negotiate and NTLM in such order. But if I swap the providers, the HTTP 401 error goes away. Even if I swap it back, the errors are still gone. So the order of the providers doesn't seem to matter, what matters is the swapping. It must have triggered something. Even if we delete the web site and application pool and reinstall the web sites, the errors are still gone. So far, we can't reproduce it easily since it happens randomly. Has anyone experienced this? How do I go about to troubleshoot it?

    Read the article

  • Databind' is not a member of 'CrystalDecisions.Windows.Forms.CrystalReportViewer'

    - by Selom
    Hi, ive being trying to cope with this problem but still. I need your help. Im having the following error message: Databind' is not a member of 'CrystalDecisions.Windows.Forms.CrystalReportViewer' in my code: Dim rpt As New CrystalReport1() Dim da As New SQLiteDataAdapter Dim ds As New presbydbDataSet 'Dim cmd As New SQLiteCommand("SELECT personal_details.fn, training.training_level FROM personal_details INNER JOIN training ON Staff_ID WHERE personal_details.staff_ID='" + detailsFrm.Label13.Text + "'", conn) Dim cmd As New SQLiteCommand("SELECT * FROM personal_details WHERE personal_details.staff_ID='" + detailsFrm.Label13.Text + "'; SELECT * FROM training WHERE training.staff_ID='" + detailsFrm.Label13.Text + "'", conn) cmd.ExecuteNonQuery() da.SelectCommand = cmd da.Fill(ds) rpt.SetDataSource(ds) rpt.Subreports.Item("personal_detailsRpt").SetDataSource(ds.Tables("personal_details")) rpt.Subreports.Item("trainingRpt").SetDataSource(ds.Tables("training")) CrystalReportViewer1.ReportSource = rpt CrystalReportViewer1.DataBind() Im using vb.net and these are the imports Im using: Imports System.Data.SQLite Imports System.Configuration Imports CrystalDecisions.CrystalReports.Engine Imports CrystalDecisions.ReportAppServer Please how can I get rid of this error? Thanks for answering

    Read the article

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