w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Using Mixpanel to push notifications to Android Automatically
You can get Mixpanel to send your push notifications automatically using the "Notifications" feature- you don't have to log in to Mixpanel every time. You can set up the notifications to be sent based on a user's properties. If you want to send a notification based on some event in your app, you can send a people analytics update to Mixpanel when that event occurs. So suppose you want people to receive a push notification to their mobile device every time they sign up in your web app. On the "Thanks for signing up" page of your app, you'd put something like the following: // Assuming you've added the Mixpanel JS snippet to your page mixpanel.identify(SOME USER DISTINCT ID); mixpanel.people.set("Signed Up", true); Then, you could set up a notification in Mixpanel with "Signed Up Is True

Categories : Android

Send Push Notifications Android No Server
This will help you out!! http://developer.xtify.com/display/sdk/Getting+Started+with+Google+Cloud+Messaging Push messages aren't received when the app is force closed. That is expected behavior for pushing to Android devices. If the Xtify-enabled app is force-closed then a push message sent via GCM will not be received.The Xtify service will be restarted and messages will be received when the user re-opens the app or the user restarts his/her device.

Categories : Android

Push notifications for 500k user's. ActiveMQ supports it?
I think your best aim for this would be a message- or worker queue. A very popular worker system is Gearman (http://www.gearman.org/). If you want to take a simpeler approach, I suggest Beanstalk, in combination with Pheanstalk API (if you use PHP for your application development). See http://kr.github.io/beanstalkd/ Hope this helps.

Categories : Android

Android GCM push notifications - sending notification to a specific device instead of all devices
But It runs notification to all the devices instead of specific device Since GCM does not support sending a notification to all devices, this is not possible. GCM supports sending a message to a specific device, or to all devices registered to same user (if you use the opt-in user notifications feature). Here what is the meaning of 3rd party Application. This is defined on the very Web page that you linked to. You can tell this by reading that page, and seeing: 3rd-party Application Server: An application server that you write as part of implementing GCM. The 3rd-party application server sends data to an Android application on the device via the GCM connection server.

Categories : Android

Dynamic table columns based on user preferences
The usual approaches to this are: EAV hstore XML JSON See: Database design - should I use 30 columns or 1 column with all data in form of JSON/XML? http://dba.stackexchange.com/q/27057/7788 The whole "make columns available to other users" thing just requires you to keep a "custom keys" table that you add to whenever a user defines a previously unused key. Adding columns with dynamic DDL sounds reasonable at first, but there are limits to how many columns you can store and how "wide" a row can be. Performance of scanning the table gets worse as you add more columns, though "sparse" columns that are mostly null are relatively cheap. An exclusive lock is required to add a column, something that can take time to get on a busy system, though adding the column its self is very quick if

Categories : Ruby On Rails

Send Push notifications to iOS/Android on closed WiFi nework (no internet connection)
E.g. an on premises push notification service that can be used to send a notification to a users phone based on an event that is triggered by our server? With respect to Android, the answer is "not really". Your options are: Implement your "push" mechanism in the form of some message queue, where the devices poll looking for messages every so often, or Use a WakeLock and WifiLock to keep the device (and WiFi) powered on constantly, then use something like MQTT for the push message Either of these will be bad for the battery, though the first one is more configurable in terms of power drain (e.g., if you only check for messages once per hour, it won't be bad). The reason why GCM can keep the power drain low is because of special hooks for mobile data connections within the OS and

Categories : Android

GCM: Send notifications only for the current user logged in application
Yes its true that you have one google registration ID for the app per device. But you can always register and unregister users at your own Server that will actually send messages to GCM and GCM will send this to the registered devices. Define some interfaces for your Server like registerOnServer and unRegisteronServer , send some unique value for each user on this interface. So, in your case, when A use Log ins , regitration is done on GCM first and register the user on your Server with registerOnServer inteface and while the user is logged in send notifications pertaining to him to GCM to be send to the device. When A logs out, unregister him using unRegisterServer and do not send any messages from your Server to GCM as A is unregistered. So,now if B Logs in even with the same device

Categories : Android

Specifying Shield UI JavaScript Chart series color, based on user preferences
You may not check for the select state/values in the chart creation module. Instead you need to assign the selected value. For that purpose you might want to update your select options like this: <select id="seriescolor"> <option value="#E01B1B"> Red </option> <option value="#46E01B"> Green </option> <option value="#1B28E0"> Blue </option> </select> In addition you may assign the color’s value by choosing one of the two options: color: document.getElementById("seriescolor").value or you can use an additional variable: var SeriesColor = document.getElementById("seriescolor").value and than assign its value to the property: color: document.getElementById("seriescolor").value

Categories : Javascript

what 's difference between android system user and linux root user
As far as Linux is concerned, the system user is just a regular user (UID 1000). Android services however give it special permissions and you can get access to pretty much anything. Most services have code like this somewhere: private static final void enforceSystemOrRoot(String message) { final int uid = Binder.getCallingUid(); if (uid != Process.SYSTEM_UID && uid != 0) { throw new SecurityException(message); } } What that does is deny access to anyone who is not root or system. The shell user (UID 2000) (what you get when doing adb shell) is another user with a lot of power (member of many groups). Cf. system: $ su 1000 $ id uid=1000(system) gid=1000(system) groups=1003(graphics),1004(input),1007(log),1009(mount), 1011(adb),1015(sdcard_rw),1028(sdc

Categories : Android

Verifying user input for a magic square game/Comparing arrays (user-defined&programmer-defined)
IMO you should maintain a multi-dimensional array for better code readability that is int[3][3] instead of 3 int[3]'s. Below is my try public static void main(String [] args) { int[][] input=new int[3][3]; int[][] defined={{8,1,6}, {3,5,7}, {4,9,2}}; Scanner sc=new Scanner(System.in); //Take input //Outer loop for(int i=0; i<3; i++) { System.out.println("Enter value for Row number - "+(i+1)); //Inner loop for(int j=0; j<3; j++) { input[i][j] = sc.nextInt(); } } //Compare boolean matches = true; for(int i=0; i<3; i++) { //Inner loop for(int j=0; j<3; j++) { if(input[i][j] != defined[i][j]) { matches = false; break; }

Categories : Java

How to send Push notification to a particular user using GCM
Checkout this link to implement GCM for your android powered device. Android GCM Push Notification Demo Also you need to implement a server side implementation to configure you server with GCM compatible. Hope it will help you.

Categories : Android

Android Alarm Based On a Time Stored in Shared Preferences
You don't need to check how much time is elapsed. AlarmManager.RTC_WAKEUP is measured in real UTC time and is not relative to device up time. So first your call to invokeAlarm should just use something like Calendar cal = Calendar.getInstance(); cal.setTime(myDate); cal.add(Calendar.DATE, 30); invokeAlarm(cal.getTimeInMillis(), rowId); Just a note that the AlarmManager loses all alarms on reboot. You need to set up a Service that is a Broadcast Receiver for the "Intent.ACTION_BOOT_COMPLETED" intent. In this service just set the alarm again using the same logic.

Categories : Java

c# convert from System.Reflection.FieldInfo to user defined type
Use FieldInfo.GetValue() method: listPt.Add((Point)field.GetValue(this));

Categories : C#

Can I automatically navigate users to System Preferences ➞ Privacy?
I see from your answer to the other topic that you've already discovered AXProcessIsTrustedWithOptions, which will take the user straight to the privacy accessibility settings; you're presumably wanting to implement your own user prompt that is less baffling and suspicion-arousing than the official alert provided by that function. You can open the Security & Privacy preferences pane and navigate straight to the Accessibility section using Applescript: tell application "System Preferences" --get a reference to the Security & Privacy preferences pane set securityPane to pane id "com.apple.preference.security" --tell that pane to navigate to its "Accessibility" section under its Privacy tab --(the anchor name is arbitrary and does not imply a meaningful hierarchy.)

Categories : Osx

Is it possible to send the user to the system settings?
Short answer, Its not possible. There is no way to launch device default "Settings" app from within your app. All you can do is give user some instructions of how to go about and change certain settings by themselves. You can do this as either a pop-up alert message or some sort of tutorial with screenshots built in your app.

Categories : IOS

How do I set the Google Form to automatically send to another user in HTML format other than respondent?
You can do this with google apps scripting, in particular the function MailApp.sendEmail. For HTML messages be sure to make use of the advanced parameters like htmlBody. Check out the MailApp class for full details: https://developers.google.com/apps-script/reference/mail/mail-app

Categories : Forms

Get device token for push notifications after app was deleted
From Push Notification Programming Guide An application should register every time it launches and give its provider the current token. It calls the registerForRemoteNotificationTypes: method to kick off the registration process. By requesting the device token and passing it to the provider every time your application launches, you help to ensure that the provider has the current token for the device. If a user restores a backup to a device or computer other than the one that the backup was created for (for example, the user migrates data to a new device or computer), he or she must launch the application at least once for it to receive notifications again. If the user restores backup data to a new device or computer, or reinstalls the operating system, the de

Categories : IOS

Automatically building SelectList based on user access level
You've already got the answer: just make "Magic" a static class with a method called "GenerateASelectListFor". Then, in your Views, skip the ViewBag entirely. Your Views can talk to any public classes in your namespace. namespace YourNameSpace { public static class Magic { public static SelectList GenerateASelectListFor() { // your code here obviously.... return new SelectList(new Dictionary<string, string> { { "Foo", "Barr" }, { "Car", "Dog" } }); } } } And in your View its as easy as: @Html.DropDownList("Foo", YourNameSpace.Magic.GenerateASelectListFor()) You will just need to make sure the Web.config in the root of your Views folder (not the main Web.config) has an entry for your namespace: <namespaces>

Categories : C#

How to get site to automatically scale based on user's browser window
What you are looking for is a responsive background image....its not that easy unfortunately but checkout Responsive background image in div full width Responsive css background images

Categories : HTML

How to sign out user automatically from Rails app after a certain period of time?
I use a similar method, but I'm using sessions not cookies. I have an 'authenticate' action in my application controller which is triggered by a before_filter for each controller, this action pokes the 'session[:accesses]' to add 1 which in turn updated the 'updated_at' column in the database. I then have a cron job that removes any sessions from the database that haven't been updated in 20 minutes.

Categories : Ruby On Rails

Send push notifications in java
Have you looked at the Java Client for Apple Push Notifications? It's used for the most common use cases and can be configured easily.

Categories : Java

how to properly send push notifications
It's possible that some of the device tokens you are sending to are invalid. Even one invalid device can explain what you are experiencing. When you send a notification with an invalid device token, Apple returns an error response and closes the socket. It's possible that by the time your code detects that the socket is closed you already sent many notifications after the invalid one (it's even possible you finished sending all the notifications before detecting the socket is closed), which causes all of the notifications sent after the invalid one to be discarded. Such notifications must be resent to Apple after you create a new socket. I suggest you read the Push Notification Throughput and Error Checking section in this document for further details. Make sure that your database doe

Categories : PHP

Send custom push notifications to my app?
It's Ok Everyone! I've found a tutorial. (after about 9 hours of searching the internet) The tutorial, incase anyone else should need it, is here: https://blog.serverdensity.com/how-to-build-an-apple-push-notification-provider-server-tutorial/ Will let people know if it works after I've tried it. Thanks for all your help @Linuxios!

Categories : IOS

Kill a calculation programme after user defined time in R
You can add code to your R function which issued the executable call: setTimeLimit(elapse=5, trans=T) This will kill the calling function, returning control to the parent environment (which could well be a function as well). Then use the examples in the question you linked to for further work. Alternatively, set up a loop which examines Sys.time and if the expected update to the parameter set has not taken place after 5 seconds, break the loop and issue the system kill command to terminate myfile.exe .

Categories : R

Django - sorting object based on user defined order in template
I don't think this is possible with queryset. Try following: pk_list = [2, 1, 3, 4] pk2obj = {obj.pk: obj for obj in Model.objects.all()} objects_ordered = [pk2obj[pk] for pk in pk_list] pkg2obj is mapping between pk and model instance object. To make a dictionary I used dictionary comprehension. If you want to omit deleted objects: objects_ordered = [pk2obj[pk] for pk in pk_list if pk in pk2obj] Else if you want to replace deleted objects with default value (None in following code): objects_ordered = [pk2obj.get(pk, None) for pk in pk_list]

Categories : Django

can we call a user defined function in MySQL range based partition
I found solution for the question. No We Can't use user defined function while creating partitioning . Below is the MySQL Docs Link which describe limitation of MySQL partitioning . . Url : http://dev.mysql.com/doc/refman/5.5/en/partitioning-limitations.html

Categories : Mysql

Issue in sending APNS push notifications to multiple device tokens in PHP
Try this its work for me. while($res = mysql_fetch_assoc($sql_device_token)) { $deviceToken = $res['devicetoken']; //Pushnotification($deviceToken,$message); /*#################################### Push Notification ####################*/ $ctx = stream_context_create(); stream_context_set_option($ctx, 'ssl', 'local_cert', 'ckipad.pem'); stream_context_set_option($ctx, 'ssl', 'passphrase', $passphrase); $fp = stream_socket_client( 'ssl://gateway.sandbox.push.apple.com:2195', $err, $errstr, 60, STREAM_CLIENT_CONNECT|STREAM_CLIENT_PERSISTENT, $ctx

Categories : PHP

Apple Push Notifications System Not Receving Message! (PHP)
I have some experience with Apple's push service and i have to say that apple seems to have soem restrictions in place. First of all you dont need to close and open the socket connection for every message. That will save you a lot of time. On the other hand you have to check if the connection is broken before you send the next message. Anyway, it seemed that apple does not like it much when you connect a hundred times a second and send messages. Apples has blocked me for that as well in the passed. But when you send the message with a already established connection, and at some point the connection is returning an error/ is disconnected, you dont know at what message he stopped. But you can define a identifier for each message and check the error returned when the connection is broken.

Categories : PHP

Does it mean that most time is IO? [./run 278.74s user 83.56s system 0% cpu 13:50:45.69 total]
The output tells you that you were blocked on something for most of the runtime of the process. It could be I/O to the disk or network, but it could be calls to sleep() or anything else that takes your process off-CPU. Because the total number in the output is "real time since the beginning of the process," the discrepancy could even be caused by other tasks on the system hogging all the resources and not giving your process a chance to run. Also, keep in mind that any time spent waiting for user input counts towards the total time, but you wouldn't normally consider that to be I/O bound (unless you consider the user to be a very slow device, but that's another discussion entirely). In other words, the only thing you know is that your process by itself is not CPU-bound. To figure out whe

Categories : Performance

Do i really need a Dedicated IP address to send push notifications to APNS
No you don't. Shared hosting plans tend to have controlled environments that you, as a shared user, can't really change, such as open or blocked ports. Is there any way you can check if connections through port 2196 are being successfully established (not necessarily to Apple)? Some low-cost, shared plans are known for blocking some juice in favour of stability and security. Also check if your push certs are properly uploaded. Cheers.

Categories : PHP

How to implement a role based user management system with ASP.NET MVC 4
Here is an article for ASP.NET MVC 3 (Razor) that covers membership and roles. I don't believe things changed greatly between MVC 3 and 4 with regard to the builit-in membership provider - http://www.c-sharpcorner.com/uploadfile/b19d5a/membership-and-authorization-in-Asp-Net-mvc-3-razor/ Additionally, here is the portion of Microsoft's Music Store tutorial that deals with membership - http://www.asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-7 Hope they help.

Categories : Asp Net

How to send IOS Push Notifications with Emoji in message in a NodeJS server?
You keep saying different things. You first said: If I write ue48d , for a cloud character, server see it as a string 'ue48d'. Now you're saying I write "e415 Hello!" to the message field. At the risk of pointing out the obvious ue48d != e415 UTF8 characters in JSON are encoded like with u and then the character code i.e. ue48d is a valid character to send to the phone in JSON. e415 is not, which is why your phone is not displaying it as an emoji character. So, what does your phone see when you send 'ue48d' to it? i.e. what does it see when you send it the original correctly encoded string. Edit If it works when you send a properly encoded string from the server, then you probably just need to decode the message sent to the server, before sending it back out i.e. messag

Categories : Node Js

Role based user permission system for Admin Panel
Well, if you are attempting to go with an object oriented approach then certainly you can, but you need to make sure you will be having a class file where your hasPermission() for $user member variable(most probably of user class) is defined which fetches the values from database by hitting a query specifically on $user. PS: This will make sense if you are aware frameworked PHP approach.

Categories : PHP

Automatically logon user when another user logs out using PowerShell
Create a logoff script with the following registry keys. Doesn't have to be powershell, this code would work for a normal command line batch script. The username is "user" and the password is "user" reg add "HKLMSOFTWAREMicrosoftWindows NTCurrentVersionWinlogon" /v DefaultUsername /t REG_SZ /d user /f reg add "HKLMSOFTWAREMicrosoftWindows NTCurrentVersionWinlogon" /v DefaultPassword /t REG_SZ /d user /f reg add "HKLMSOFTWAREMicrosoftWindows NTCurrentVersionWinlogon" /v AutoAdminLogon /t REG_SZ /d 1 /f reg add "HKLMSOFTWAREMicrosoftWindows NTCurrentVersionWinlogon" /v ForceAutoLogon /t REG_SZ /d 1 /f If you have a "welcome message", you will still have to click OK to fully log in, though Here is how you create a logoff script: http://technet.microsoft.com/en-us/magazine/dd630947.aspx

Categories : Powershell

How to get the user's system clock time to display in a web application?
PHP doesn't run on the client but on the server, so if you want to do this you can use some JavaScript. function set_time() { var d = new Date(); var c_hour = d.getHours(); var c_min = d.getMinutes(); var c_sec = d.getSeconds(); var t = c_hour + ":" + c_min + ":" + c_sec; return t; }

Categories : PHP

how to integrate multiple push notifications for the same time & for the same app
http://maniacdev.com/2011/05/tutorial-ios-push-notification-services-for-beginners .. Check if this is helpful .. something for a beginner level ..

Categories : PHP

CPU User time and System time on AIX
mpstat is providing these metrics, either parse its output or figure out how/where does it find them.

Categories : Linux

How can I find the instance of a user in this javascript user system codebase?
I've never used it, but it's built using Mongoose and it exposes a db.users collection which you can query for user information. If you're interested in that, you can use it like so: db.users.findOne({ username: 'pinky' }, function(err, user) { // work with user here if it was found! }); You will have access to the following user properties and functions based off of the schema: var userSchema = new mongoose.Schema({ username: { type: String, unique: true }, password: String, email: String, roles: { admin: { type: mongoose.Schema.Types.ObjectId, ref: 'Admin' }, account: { type: mongoose.Schema.Types.ObjectId, ref: 'Account' } }, isActive: String, timeCreated: { type: Date, default: Date.now }, resetPasswordToken: String, twitter: {}

Categories : Javascript

Facebook - Send friend request (User to User) using graph API and PHP SDK?
You can use the Friends Dialog. To integrate you can use javascript as- FB.ui({ method: 'friends', id: USER_ID }, function(response){}); OR, a URL redirect as- https://www.facebook.com/dialog/friends/? id=USER_ID &app_id=APP_ID &redirect_uri=REDIRECT_URI For more details: Friends Dialog

Categories : PHP

Keeping count of user metrics based around time
You will need to track all data that is (even partially) required to get the achievement. For the achievements around logging in, you need to track each login once per day, having a table like: user_id | login 1 | 2013-07-20 1 | 2013-07-19 1 | 2013-07-16 2 | 2013-07-20 ... Whenever the tracking event is triggered, you also check for the achievements. event onLogin { // get the last 4 logins before the current login statement = ( SELECT login FROM tracking_user_login WHERE user_id = 1 ORDER BY login DESC LIMIT 1,4 ); statement.execute(); // did the user even login at least 4 times already? if (statement.rowCount == 4) { date lastLogin = todaysLogin; int consecutiveLogins = 1; // iterate descending thro

Categories : Database



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.