tag:blogger.com,1999:blog-5879050571098780501.comments2023-07-29T17:37:04.170+05:30The Code ArtistUnknownnoreply@blogger.comBlogger277125tag:blogger.com,1999:blog-5879050571098780501.post-21237173489255261422023-07-29T17:36:56.051+05:302023-07-29T17:36:56.051+05:30Consider the situation without "__read_mostly...Consider the situation without "__read_mostly". There is a certain distribution of element in memory spread over multiple cachelines. By picking a bunch of these elements tagged with "__read_mostly" and placing them elsewhere, now the remaining elements are packed together closer - i.e. some of the elements that were previously on separate cachelines are now mapped into a single cacheline.TheCodeArtisthttps://www.blogger.com/profile/11629092532561603507noreply@blogger.comtag:blogger.com,1999:blog-5879050571098780501.post-62249449325580780632023-07-29T16:08:04.331+05:302023-07-29T16:08:04.331+05:30How to understand "This increases the chances...How to understand "This increases the chances that two frequently used elements will end-up competing for the same position."? For example, two variables in adjacent cachelines are in different cache-line set, so one will not competing cache slots of another.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5879050571098780501.post-86863205879806013562020-12-21T18:06:25.643+05:302020-12-21T18:06:25.643+05:30Can the light sensor detect a specific color?
I wa...Can the light sensor detect a specific color?<br />I was thinking if possible to have a specific color cover (such as blue/red etc.) and have a logic that only if phone is covered with blue color than turn the screen off.<a href="https://vytechenterprise.com/" rel="nofollow">Aum Patel </a><br />vytechhttps://www.blogger.com/profile/09514075880660848326noreply@blogger.comtag:blogger.com,1999:blog-5879050571098780501.post-90159700999236606972020-06-05T00:21:26.724+05:302020-06-05T00:21:26.724+05:30Hello, rather late to your article, but thank you,...Hello, rather late to your article, but thank you, very informative. <br />If I may ask you, I don't know if you recall, what is the response time of these cameras to the register writes? <br />I'm wondering if adjustments to the shutter and other parameters can be done per-frame. Two examples would be to increase dynamic range by combining frames with different exposures, or quickly windowing into image details at higher resolution.<br />Thanks!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5879050571098780501.post-1034454156293462020-04-12T20:45:02.511+05:302020-04-12T20:45:02.511+05:30Here's a nice artice on teh same with a lot of...Here's a nice artice on teh same with a lot of historical titbits on "commoditising one's complement"<br />https://www.gwern.net/ComplementTheCodeArtisthttps://www.blogger.com/profile/11629092532561603507noreply@blogger.comtag:blogger.com,1999:blog-5879050571098780501.post-29249582723343945592019-11-13T23:28:33.052+05:302019-11-13T23:28:33.052+05:30Sorry, its been quite some time since i did this a...Sorry, its been quite some time since i did this and newer version of Android appear to have complicated over time.<br /><br />The issue appears to be incompatibility between SELinux and the NFS-based root-fs.<br /><br />Few things to try disabling SELinux.<br /><br />Add either of these command-line options to the kernel bootargs in U-boot:<br /><br />android.SElinux=disable<br /> or<br />androidboot.selinux=permissive<br /><br />Also add a suffix ",v3,tcp" (without the quotes) at the end of the value specified for the nfsroot property in the bootargs.<br /><br />nfsroot=:,v3,tcp<br /><br />I haven't been able to verify this myself. If this works for you, please feel free to drop a note here for others in future... :-)<br /><br /><br />On a related note, for anyone interested in what SELinux needs under the hood from a filesystem, here are a few slides describing what was done to add SELinux support to NFS - https://www.nsa.gov/Portals/70/documents/what-we-do/research/selinux/documentation/presentations/2005-implementing-selinux-support-for-nfs-presentation.pdfTheCodeArtisthttps://www.blogger.com/profile/11629092532561603507noreply@blogger.comtag:blogger.com,1999:blog-5879050571098780501.post-18068984627234835352019-09-25T19:57:29.479+05:302019-09-25T19:57:29.479+05:30Is this issue fixed. Can you please let us know th...Is this issue fixed. Can you please let us know the fix?Anonymoushttps://www.blogger.com/profile/09125086076860356309noreply@blogger.comtag:blogger.com,1999:blog-5879050571098780501.post-69736660835423613182019-06-20T10:57:09.906+05:302019-06-20T10:57:09.906+05:30Highly Commendable blog! Keep up the great workHighly Commendable blog! Keep up the great workPrachi Kalrahttps://www.blogger.com/profile/10099929607773192171noreply@blogger.comtag:blogger.com,1999:blog-5879050571098780501.post-86374465849054044372019-02-03T15:00:37.672+05:302019-02-03T15:00:37.672+05:30Recently presented this talk at BarCamp Bangalore ...Recently presented this talk at BarCamp Bangalore Spring 2019.<br /><br />During the session, we applied this technique to brainstorm how one could solve the problem of bad public infrastructure (eg. Good Roads) due to corrupt/inefficient public officials n developing regions.<br /><br />- There is already lot of public and private money (Corporate Social Responsibility) poured into solving infrastructure issues.<br /><br />- Workforce / Time is also NOT a constraint as there is no lack of expertise in developing basic infrastructure like roads.<br /><br />Applying the "Commoditise the Supply-Chain" method, 2 potential approaches to this problem that we came up with were:<br /><br /><b>1. Solve other basic problems first.</b><br />As long as people in the region have more pressing concerns that affect them directly, they will not unite behind the cause to improve roadworks to the level of first-world nations.<br /><br /><b>2. Commoditise decision making.</b><br />Currently the people of a region do NOT get to directly decide which individual road they would like improved first. For example, an app on everyone's phones that detects rough-rides / potholes as one rides around everyday, can help people to identify and report/upvote the worse stretches of roads that need to be fixed first. TheCodeArtisthttps://www.blogger.com/profile/11629092532561603507noreply@blogger.comtag:blogger.com,1999:blog-5879050571098780501.post-23808848338607419702019-02-03T14:58:16.366+05:302019-02-03T14:58:16.366+05:30TL;DR: Model your challenge / problem-scenario as ...<b>TL;DR: Model your challenge / problem-scenario as a supply chain.</b><br /><br /> 1. Identify the actors/entities involved.<br /> 2. Identify the "item" in short supply.<br /> 3. Commoditise the "item".<br /> <br /> Congratulations, <br /> you have found an "out of the box" solution<br /> to your problem.<br />TheCodeArtisthttps://www.blogger.com/profile/11629092532561603507noreply@blogger.comtag:blogger.com,1999:blog-5879050571098780501.post-25185242061541261552018-12-15T14:27:28.707+05:302018-12-15T14:27:28.707+05:30I am also facing same issue, is issue fixed?I am also facing same issue, is issue fixed?shahulhttps://www.blogger.com/profile/08442924773921542710noreply@blogger.comtag:blogger.com,1999:blog-5879050571098780501.post-91605358916249697582018-11-01T18:47:41.859+05:302018-11-01T18:47:41.859+05:30I am facing below error:
================
Freeing ...I am facing below error:<br />================<br />Freeing unused kernel memory: 1024K (c1100000 - c1200000)<br />init: init first stage started!<br />audit: type=1403 audit(3005.970:2): policy loaded auid=4294967295 ses=4294967295<br />init: (Initializing SELinux non-enforcing took 0.10s.)<br />init: SELinux: Could not set context for /init: Operation not supported on transport endpoint<br />init: restorecon failed: Operation not supported on transport endpoint<br />init: Security failure; rebooting into recovery mode...<br />sysrq: SysRq : Emergency Remount R/O<br />Emergency Remount complete<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5879050571098780501.post-32776603687695963222018-02-17T22:31:01.000+05:302018-02-17T22:31:01.000+05:30Consider acquiring a CPU-wakelock to prevent the d...Consider acquiring a CPU-wakelock to prevent the device from entering sleep mode.TheCodeArtisthttps://www.blogger.com/profile/11629092532561603507noreply@blogger.comtag:blogger.com,1999:blog-5879050571098780501.post-54374243847796652362018-02-17T20:46:35.036+05:302018-02-17T20:46:35.036+05:30If proximity sensor is on and mobile is locked I w...If proximity sensor is on and mobile is locked I want to play some media player music . I am able to do it when phone is on but phone is locked n sleep mode it will not work . can u please suggest me ? how to do it in android ? Anonymoushttps://www.blogger.com/profile/01908264734476847965noreply@blogger.comtag:blogger.com,1999:blog-5879050571098780501.post-71275981555735110672018-01-17T18:10:47.188+05:302018-01-17T18:10:47.188+05:30I have Honeywell ScanPal™ EDA50
How can I emulat...I have Honeywell ScanPal™ EDA50 <br /><br />How can I emulate the hardware button "SCAN" with the KeyEvent is KeyEvent.KEYCODE_UNKNOWN if I only know the scanCode. Anonymoushttps://www.blogger.com/profile/04331508761849207533noreply@blogger.comtag:blogger.com,1999:blog-5879050571098780501.post-17584158045926677492018-01-17T17:18:20.983+05:302018-01-17T17:18:20.983+05:30I have Honeywell ScanPal™ EDA50 (https://aidc.hone...I have Honeywell ScanPal™ EDA50 (https://aidc.honeywell.com/en-GB/Pages/Product.aspx?category=hand-held-mobile-computer&cat=HSM&pid=scanpaleda50k)<br /><br />How can I emulate the hardware button "SCAN" with the KeyEvent is KeyEvent.KEYCODE_UNKNOWN and I only know the scanCode. Anonymoushttps://www.blogger.com/profile/04331508761849207533noreply@blogger.comtag:blogger.com,1999:blog-5879050571098780501.post-83318722524894837602017-11-03T02:53:57.939+05:302017-11-03T02:53:57.939+05:30Has anyone tried sending the keyevent codes to the...Has anyone tried sending the keyevent codes to the android via an arduino? I am using the arduino to determine if the screen needs to be dimmed or if the tablet should go to sleep. This is a car head unit.<br /><br /> Thanks!Anonymoushttps://www.blogger.com/profile/12538957471260774797noreply@blogger.comtag:blogger.com,1999:blog-5879050571098780501.post-64958151373645655192017-10-25T18:27:00.379+05:302017-10-25T18:27:00.379+05:30why someone goes all the way to define their own b...why someone goes all the way to define their own bus-specs when the hardware obviously works on I2C??? <br /><br />Obvious... to save millions in royalties they'd have to pay Philips.<br /><br />Sony did a very similar thing with their earlier Triniton TVs so they weren't crippled with PAL royalties.<br /><br />Answer to all questions, follow the money trail.....<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5879050571098780501.post-7828194073170677842016-12-26T23:49:39.312+05:302016-12-26T23:49:39.312+05:30Hello. How did you fix input text for German umlau...Hello. How did you fix input text for German umlaut?<br />Please send me your solution on oleh.prilepin@gmail.com<br />Thanks a lotAnonymoushttps://www.blogger.com/profile/04323655144106928366noreply@blogger.comtag:blogger.com,1999:blog-5879050571098780501.post-65468564556896552342016-08-28T09:01:32.163+05:302016-08-28T09:01:32.163+05:30It is up to the software applications to enable or...It is up to the software applications to enable or make use of the proximity sensor inputs and decide whether to dim/turn-off the display and disable the touchscreen. Currently on Android, most dialer applications choose to do so during a call (and ignore the proximity sensor rest of the time).TheCodeArtisthttps://www.blogger.com/profile/11629092532561603507noreply@blogger.comtag:blogger.com,1999:blog-5879050571098780501.post-48331662055924969022016-08-27T19:44:16.044+05:302016-08-27T19:44:16.044+05:30Hi..
Proximity sensor works only durning call...ot...Hi..<br />Proximity sensor works only durning call...other times it won't work...how sensors are working during callsAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5879050571098780501.post-22820913885860669362016-07-08T00:08:14.962+05:302016-07-08T00:08:14.962+05:30I really appreciate your professional approach. Th...I really appreciate your professional approach. These are pieces of very useful information that will be of great use for me in future.Jeffhttp://letsdev.innoreply@blogger.comtag:blogger.com,1999:blog-5879050571098780501.post-36833778236003610142015-07-25T03:54:16.670+05:302015-07-25T03:54:16.670+05:30Nice one. Did part 2 ever show up?Nice one. Did part 2 ever show up?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5879050571098780501.post-75489608814999888682015-04-26T17:50:50.022+05:302015-04-26T17:50:50.022+05:30Yes. The same hardware can do both light and proxi...Yes. The same hardware can do both light and proximity sensing. <br /><br />The light sensor as always can detect the brightness of light incident on it (amount in LUX). Also it can be configured to detect the absence/presence of a particular wavelength as far/near. This wavelength is usually emitted by a very low intensity infra-red LED right next to it and is reflected onto the light sensor only when an object in in the vicinity of the emitter-sensor setup.TheCodeArtisthttps://www.blogger.com/profile/11629092532561603507noreply@blogger.comtag:blogger.com,1999:blog-5879050571098780501.post-67081258760268531842015-04-24T17:32:09.598+05:302015-04-24T17:32:09.598+05:30If the second one - "active" proximity-s...If the second one - "active" proximity-sensor provides information no matter the light around, wouldn't it be better to use just one proximity sensor?Patriciahttps://www.blogger.com/profile/02485357825200650886noreply@blogger.com