flags

node-webkit enabling flag touch screen

孤街浪徒 提交于 2019-12-04 17:04:17
I use Ubuntu 14.04 LTS. If I use Chromium 34.0.1847.116 to enable touch events on my web app I have to: start chromium with --enable-touch-events --enable-pinch set to enabled the flag "Enable touch events" using chrome://flags I'm looking to enable theses touch events on node-webkit . I'm using 64 bit version of node-webkit v0.9.2 that uses chromium 32.0.1700.107 . If I add the following key to package.json , it does not work. "chromium-args" : "--enable-touch-events --enable-pinch" touch events on browser don't work. If i try to open chrome://flags, I get a white page. Is it a problem of

C++ Access to vector from multiple threads

徘徊边缘 提交于 2019-12-04 09:34:05
In my program I've some threads running. Each thread gets a pointer to some object (in my program - vector). And each thread modifies the vector. And sometimes my program fails with a segm-fault. I thought it occurred because thread A begins doing something with the vector while thread B hasn't finished operating with it? Can it bee true? How am I supposed to fix it? Thread synchronization? Or maybe make a flag VectorIsInUse and set this flag to true while operating with it? vector , like all STL containers, is not thread-safe. You have to explicitly manage the synchronization yourself. A std:

Android: Activity is using old intent if launching app from Recent Task

∥☆過路亽.° 提交于 2019-12-04 08:19:26
问题 I'm implementing GCM. My app has two activities, say A and B . I'm using this code to launch B from the NotificationBar: long when = System.currentTimeMillis(); NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); String title = context.getString(R.string.app_name); Notification notification = new Notification(R.drawable.app_notification_icon, "De Centrale", when);//message Intent notificationIntent = new Intent(context, B

How to enable WebVR on Google Chrome?

家住魔仙堡 提交于 2019-12-04 08:16:17
I am trying to create a WebVR scene. For this task, I want to enable WebVR on Google Chrome. My OS is Windows 8. I open flags using chrome://flags/ . WebVR is not there. How can I enable it? Official channels of Google Chrome do not support WebVR. (now they do, see below) There is an unofficial build of chrome that does. FYI Firefox Nightly also supports WebVR in their official and current release, as does Samsung Internet Beta for GearVR (the latter after some configuration). UPDATE: Chrome Android now works with WebVR if you enable chrome://flags/#enable-webvr . See this manual on how to

Got “you are using unsupported command-line flag: --disable-web-security. Stability and security will suffer” error

依然范特西╮ 提交于 2019-12-04 07:57:14
I got this below error while using Selenium RC for Google Chrome you are using unsupported command-line flag: --disable-web-security. Stability and security will suffer. I don't know whats the issue with chrome. Reference code for flag --disable-web-security // Don't enforce the same-origin policy. (Used by people testing their sites.) const char kDisableWebSecurity[] = "disable-web-security"; It disallows cross scripting code, what are you doing on selenium RC? In feb 2013, someone (expert user/dev "PhistucK"; 1498 Posts as of 01/2014) said on the chrome-discuss gougle-group : No, it [the

How to add flags with my intent in the manifest file

女生的网名这么多〃 提交于 2019-12-04 00:03:48
we know that there are flags which we can add to our intent using the addFlags() method in our java code. Is there any way we can add these flags in the manifest file itself instead of writing this in java code. I need to add REORDER_TO_FRONT flag for one of my activities in the manifest. How to achieve this ? Vineet Shukla In manifest file you can not add Intent flags.You need to set the flag in Intent which u pass to startActivity. Here is a sample: Intent intent = new Intent(this, ActivityNameToLaunch.class); intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); startActivity(intent); To

Enum as Flag using, setting and shifting

本秂侑毒 提交于 2019-12-03 20:10:29
I have two flags: [Flags] enum Flags { A = 1, B = 2 }; I set them like this: Mode = Flags.A | Flags.B; // default value for(int i = 0; i < args.Length; i++) { switch(args[i]) { case "--a": { if ((Mode & Flags.A) == Flags.A && (Mode & Flags.B) == Flags.B) // both, default assume { Mode = Flags.A; // only A } else { Mode |= Flags.A; // append A } break; } case "--b": { if ((Mode & Flags.A) == Flags.A && (Mode & Flags.B) == Mode.B) { Mode = Flags.B; } else { Mode |= Flags.B; } break; } } } and use them later like this: if((Mode & Flags.A) == Flags.A) { // } if((Mode & Flags.B) == Flags.B) { // }

Getting all MotionEvents with WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH

假装没事ソ 提交于 2019-12-03 16:35:06
My question refers directly to this question . The answer to that question shows how one can create a ViewGroup , embed it inside a WindowManager , and allow the WindowManager to catch MotionEvent s through onTouchEvent(MotionEvent event) . WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH is the flag that allows this this ViewGroup to receive MotionEvent s. However, according to documentation, this flag ...will not receive the full down/move/up gesture I want to know if there's a work-around or a way so that I can get all touch events including down, move, and up. A proof of concept is in

Two users write to a file at the same time? (PHP/file_put_contents)

时光怂恿深爱的人放手 提交于 2019-12-03 14:12:10
If I write data to a file via file_put_contents with the FILE_APPEND flag set and two users submit data at the same time, will it append regardless, or is there a chance one entry will be overwritten? If I set the LOCK_EX flag, will the second submission wait for the first submission to complete, or is the data lost when an exclusive lock can't be obtained? How does PHP generally handle that? I'm running version 5.2.9. if that matters. Thanks, Ryan you could also check the flock function to implement proper locking (not based on the while / sleep trick) If you set an exclusive file lock via

Java integer flag and bitwise operations for memory reduction

痴心易碎 提交于 2019-12-03 12:36:24
问题 Is using an integer flag and bitwise operations an effective way of reducing the memory footprint of high volume Objects? Memory Footprint It is my understanding that commonly a boolean is stored as an int in a JVM implementation. Is this correct? In which case surely the 32 flags represent a large memory footprint reduction. Although of course the JVM implementations vary, so this may not always be the case. Performance It is my understanding that CPUs are very number driven and bitwise