Windows error 0xFFFF0000, -65536

Detailed Error Information

HRESULT analysis[1]

FlagsSeverityFailure
Reserved (R)true
OriginCustomer

This code was defined by a third party software company, and may mean different things for different software. Contact the software author for more information about this error.

NTSTATUStrue
Reserved (X)true
FacilityCode4095 (0xfff)
Error Code0 (0x0000)

Questions

131votes
16answers

Change drawable color programmatically

I'm trying to change the color on a white marker image by code. I have read that the code below should change the color, but my marker remains white. Drawable.setColorFilter( 0xffff0000, Mode.MULTIPLY ) Did I miss something? Is there any other way to change colors on my drawables located in [...] read more
android
90votes
6answers

Android: Cloning a drawable in order to make a StateListDrawable with filters

I'm trying to make a general framework function that makes any Drawable become highlighted when pressed/focused/selected/etc. My function takes a Drawable and returns a StateListDrawable, where the default state is the Drawable itself, and the state for android.R.attr.state_pressed is the same drawable, just with a filter applied using setColorFilter. My [...] read more
android
android-widget
drawable
48votes
2answers

Create an Android GPS tracking application

Recently, I've taken up android development as a hobby and was looking to develop an application that can find and track a users position using Google Maps. Once the application has a GPS lock, it can track their movements by drawing a route using an overlay class. I've seen similar [...] read more
android
dictionary
gps
tracking
25votes
1answer

what is notification channel id?notifications not work in api 27

I updated my project api target to 27 and all notifications were disabled. What's the difference between notification in api 26 and 27? Notification notif = new NotificationCompat.Builder(this) .setContentTitle(getString(R.string.app_name)) .setContentText(message) .setSmallIcon(R.mipmap.ic_launcher) .setContentIntent(pIntent) .setSound(alarmSound) .setAutoCancel(true).build(); notif.ledARGB = 0xFFff0000; notif.flags = Notification.FLAG_SHOW_LIGHTS; notif.ledOnMS = 100; notif.ledOffMS = 100; NotificationManager notificationCompatManager = (NotificationManager) [...] read more
android
api
notifications
19votes
3answers

How to snap RecyclerView items so that every X items would be considered like a single unit to snap to?

BACKGROUND It's possible to snap a RecyclerView to its center using : LinearSnapHelper().attachToRecyclerView(recyclerView) Example: MainActivity.kt class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) val inflater = LayoutInflater.from(this) recyclerView.adapter = object : RecyclerView.Adapter<RecyclerView.ViewHolder>() { override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) { val textView = holder.itemView as TextView [...] read more
android
android-recyclerview
android-viewpager
snapping
7votes
3answers

Receive Android Push Notification even though App is Closed

I've tried using Google GCM but when the app is closed (Swipe or clear from the task manager), it wont receive any push notifications. And when i open the app again, the notification is already gone and lost. GCM is working for: - App is open - App is minimized [...] read more
android
notifications
google-cloud-messaging
push
6votes
1answer

Solution needed for building a static IDT and GDT at assemble/compile/link time

This question is inspired by a problem many have encountered over the years, especially in x86 operating system development. Recently a related NASM question was bumped up by an edit. In that case the person was using NASM and was getting the assemble time error: > shift operator may only [...] read more
assembly
x86
nasm
ld
osdev
6votes
1answer

Drawable is not drawing on canvas

I have a custom view and a drawable to be drawn on it, but for some reason the drawable is not drawing itself on the view's canvas. Here's how the drawable is created: int[] gradientColors=new int[] { 0xFFFF0000,0xFFFFFF00,0xFF00FF00, 0xFF00FFFF,0xFF0000FF,0xFFFF00FF,0xFFFF0000 }; gradient=new GradientDrawable(GradientDrawable.Orientation.LEFT_RIGHT, gradientColors); And here's the onDraw function: @Override protected [...] read more
android
android-canvas
5votes
1answer

VPN DNS configuration bug in OS X

I am using TunnelBlick to connect to an VPN (OpenVPN) with OS X 10.9.2. I can authenticate and pass traffic but the DNS entries injected from the VPN do not work. Here is the output of scutil --dns (resolver #1 is the correct DNS server injected by Tunnelblick) resolver #1 [...] read more
macos
networking
vpn
dns
openvpn
5votes
1answer

Keyboard interrupt handler not working in system iso

I'm trying to write an operating system using OSDev and others. Now, I'm stuck making a keyboard interrupt handler. When I compile my OS and run the kernel using qemu-system-i386 -kernel kernel/myos.kernel everything works perfectly. When I put everything into an ISO image and try to run it using qemu-system-i386 [...] read more
c
assembly
x86
interrupt-handling
osdev
4votes
7answers

How to draw an arrow using android graphic class?

How can i draw an arrow using the graphics class? Im using android graphics class and basically im trying to show a path on a map. So i need to print an arrow head on the canvas. Help me to figure out! Thank you! This is one of the methods [...] read more
android
graphics
android-canvas
draw
4votes
1answer

Raku: How do I assign values to CArray[WCHAR]?

$ raku -v This is Rakudo version 2019.07.1 built on MoarVM version 2019.07.1 The following was done on Raku REPL. What am I doing wrong here? How do I assign values to CArray[WCHAR]? I want $lpData[0] to be 0xABCD and $lpData[1] to be 0xEF12. > use NativeCall; Nil > constant [...] read more
raku
nativecall
4votes
1answer

Filling pattern in stead of a color using flood fill algroithim android

I am developing a coloring app and was able to fill white color of the image with different colors using the below code. Here is the Java class import java.util.LinkedList; import java.util.Queue; import android.app.Activity; import android.app.ProgressDialog; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.BitmapFactory.Options; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; [...] read more
android
flood-fill
4votes
0answers

How to cancel dragging of items in RecyclerView when using ItemTouchHelper, as you drag?

BACKGROUND I'm trying to have a RecyclerView that has different view types, and yet has the ability for drag&drop, together with single click and long click operations. It's similar to what you have on Phone app, where you can change the order of your favorites items. On the Phone app, [...] read more
android
android-recyclerview
drag-and-drop
itemtouchhelper
4votes
2answers

How to assign ARGB format (e.g. 0xFFFF0000) value to Kotlin INT

In Android, RED (in Java) is defined as @ColorInt public static final int RED = 0xFFFF0000; When we assign to the value as below (in Kotlin), all good. val value: Int = Color.RED However when I replace Color.RED with 0xFFFF0000; val value: Int = 0xFFFF0000 It will complaint The integer [...] read more
android
kotlin
colors
3votes
4answers

How to reverse bits in a bitset?

For example, I have the integer a = 10; and it's binary representation (for a 32 bit integer) is 00000000000000000000000000001010 and reversed, it becomes 01010000000000000000000000000000 Now I've seen this code, from this topcoder article that can accomplish this x = ((x & 0xaaaaaaaa) >> 1) | ((x & 0x55555555) << [...] read more
c++
c++11
bits
bitset
3votes
2answers

TCP Checksum calculation doesn't match with the wireshark calculation

I am experiencing a problem where the tcp checksum generated by the sample program (copied below) doesn't match with the checksum calculated by wireshark. Can some one please point me where I am going wrong. Here I tried two ways 1. tcp_checksum 2. get_ipv6_udptcp_checksum. with both these, getting two different [...] read more
c
unix
tcp
checksum
3votes
1answer

How to fix borderless form resize with controls on borders of the form?

I have a borderless winForm which I needed to resize, and I managed to do it this way: protected override void WndProc(ref Message m) { const int wmNcHitTest = 0x84; const int htLeft = 10; const int htRight = 11; const int htTop = 12; const int htTopLeft = 13; [...] read more
c#
window
window-resize
borderless
3votes
1answer

How do I use a constant in Rust's inline assembly macro?

I'm porting some legacy assembly code to Rust and I need to call it through the asm! macro. However, the assembly code depends on some constants stored in a C header file. I'd like to keep it similar, define the constants in Rust and have the names of the constants [...] read more
rust
inline-assembly
arm64
3votes
2answers

Cannot draw pixels, Pi number in a Synesthetic way

I want to print each digit of pi number as a colored pixel, so, I get an input, with the pi number, then parse it into a list, each node containing a digit (I know, I'll use an array later), but I never get this painted to screen... Can someone [...] read more
java
pi
memoryimagesource
3votes
1answer

Interrupt handler on C doesn't work after one interrupt

I'm trying to implement keyboard interrupt handler using C and QEMU. But when I execute the program my handler print only one character. After that the handler doesn't work at all. My IDT setup: struct IDT_entry { unsigned short int offset_lowerbits; unsigned short int selector; unsigned char zero; unsigned char [...] read more
c
gcc
assembly
interrupt-handling
osdev
2votes
2answers

Active CARP network loop

I have to setup, no matter what, a cluster of 3 active OpenBSD 5.5 with CARP on 3 separate ESXi 5.5 hosts. I think I'm close to the end but I have this message in /var/log/messages : carp0: replay or network loop detected Here is my configuration : -------------------------------------------------------------------------------- ON [...] read more
networking
vmware-esxi
openbsd
carp
2votes
0answers

juniper vpn network connect osx 10.6.8

Juniper Network Connect.app stopped working for me out of the blue, i made no upgrades recently. i see the following log, what else can i investigate? Process: ncproxyd [5322] Path: /usr/local/juniper/nc/7.1.0/ncproxyd Identifier: ncproxyd Version: ??? (???) Code Type: X86 (Native) Parent Process: Network Connect [5319] Date/Time: 2012-11-20 10:00:28.254 +0100 OS [...] read more
macos
vpn
juniper
2votes
0answers

const uint32_t gives the error: hicpp bitwise operations on signed integers

The code below gives me a clang-tidy error: > [clang-tidy] hicpp bitwise operations on signed integers // File 1: Clang - Tidy not enabled typedef struct A { struct { uint32_t b; } c; } A; // File 2: Clang-Tidy enabled A *ptr; // Some code that assigns values at [...] read more
c++
bitwise-operators
clang-tidy
2votes
1answer

Code works in Release mode, but throws error in Debug configuration

I put together the code for a system wide keyboard shortcut that I got from @Chris Taylor. I wanted it to work in .NETCoreApp 3.0 because according to MS docs, System.Windows.Forms.dll is supported I added a reference to System.Windows.Forms.dll located at C:\Windows\Microsoft.NET\Framework64\v4.0.30319 (older versions worked too). At this point the [...] read more
c#
.net-core
2votes
2answers

How to do computations with addresses at compile/linking time?

I wrote some code for initializing the IDT, which stores 32-bit addresses in two non-adjacent 16-bit halves. The IDT can be stored anywhere, and you tell the CPU where by running the LIDT instruction. This is the code for initializing the table: void idt_init(void) { /* Unfortunately, we can't write [...] read more
c
x86
linker
interrupt
osdev
2votes
3answers

How do you calculate percentages in Java?

So I am trying to make a game with a health bar for the player but whenever I use cross products or any other method of math that should work the percentage result is 0.0... Here is the .java file that handles this: package com.game.graphics; import com.game.entity.mob.Mob; public class HUD [...] read more
java
math
2votes
1answer

Laravel : get data array and loop with For

Hi I'am trying to get data Array and looping with For. So I have array called 'color' and I want loop the Array with For. But I have some trouble in the result. I've been tried change the array and in foreach but I got no idea how to get [...] read more
php
arrays
laravel
for-loop
2votes
1answer

How to build stacks out of assembly code?

I am studying cybersecurity at the moment, and we learned how to build stacks out of an assembly code piece. But because of a lack of examples I am not sure about my idea of doing this. The question is: > Assume an empty stack and that the register rax [...] read more
assembly
stack
x86-64
2votes
1answer

uboot hangs freeing init memory 216k - screen blank white

I'm building JB4.3 for custom board IMX6DL I have the board connected to a LVDS screen 7inch all the images are flashed to SD card and when I boot the kernel starts and runs until Freeing init memory:216k My build environment is as follows : bootdelay=3 baudrate=115200 netmask=255.0.0.0 loadaddr=0x10800000 rd_loadaddr=0x11000000 [...] read more
android
android-source
imx6
2votes
3answers

Divide a 48-bit number which is composed of a 16bit and a 32bit variable

I am developing a software for an embedded microcontroller (STN1110). It has no FPU or SFP emulation. There is an SDK method which returns the uptime of the controller in microseconds, split in two variables: uint16 (msw) and uint32 (lsw). I want to convert this "pair" into a single uint32 [...] read more
c
embedded
1vote
4answers

Varnish doesn't seems to be doing anything

I would highly appreciate an input on whats going wrong here: Running Magento on Ubuntu 14.04 x64 + Nginx + Mysql + Php5-FPM Please double check my steps so maybe you could help me point what's messy: * Installed Varnish * Installed Magento Tupertine (an extension that makes Varnish work [...] read more
varnish
cache
magento
1vote
0answers

Raid 5 XFS missing superblock

Yesterday I found (the hard way) that my APC battery had failed; After a power loss at home I had to power up my computer and NAS (raid 5 XFS on Debian). The computer was fine however the I was unable to mount my raid (md127) with the message "mount: [...] read more
linux
hard-drive
mount
raid
nas
1vote
0answers

How can I open a specific port on OS X El Capitan on a tun device?

I am trying to open port 3389 on OS X El Capitan. $ sw_vers ProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G31 $ ifconfig ..snip.. utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500 inet 10.X.X.XX --> 10.X.X.XX netmask 0xffff0000 How can I achieve this with pfctl? I found the man page rather difficult to [...] read more
macos
vpn
firewall
1vote
2answers

Mac: Internet blocked over WiFi

I'm not sure how it's happened but for some reason when using a shared internet connection on my iMac (OS X Lion) all internet traffic is now blocked from being sent to my other devices. However things like streaming radio do work. How can I figure out what's blocking the [...] read more
macos
mac
wireless-networking
airport
1vote
3answers

Bitmask depending on data type

I want to apply a bitmask to get only the upper half of bits. So for an uint32 it would be this: uint32_t version_part = oldID & 0xFFFF0000; This is all fine when the data type is hardcoded but if this was a templated function and I wanted to provide [...] read more
c++
bitmask
1vote
1answer

URLImage.createToStorage failing in codenameone

I'm trying to create a URL image from a imgur png with codenameone, using this code: Form hi = new Form(new BoxLayout(BoxLayout.Y_AXIS)); EncodedImage placeholder = EncodedImage.createFromImage(Image.createImage(hi.getWidth(), hi.getWidth() / 5, 0xffff0000), true); URLImage background = URLImage.createToStorage(placeholder, "test2.png","https://i.imgur.com/VMwUrqH.png", URLImage.RESIZE_SCALE_TO_FILL); background.fetch(); hi.add(background); hi.show(); But it just gives me this error: Exception: java.lang.IllegalArgumentException - [...] read more
java
image
codenameone
1vote
1answer

Conversion from ARGB to RGBA

I'm trying to write my own Color struct for a task I have. My goal is that my buffer will always contain a RGBA value, even if it is initialized with ARGB values. I have 2 constructors: 1. Takes R,G,B,A values of type uint8_t separately - Works like a charm. [...] read more
c++
colors
bit-shift
rgba
argb
1vote
1answer

Can't read SDRAM of TI OMAP5912 ARM core using JTAG

I'm trying to connect to OMAP5912 device using XDS560v2 TRAVELER JTAG emulator using Code Composer Studio 7. When connecting to C55x device using Connect Target it successfully stops at an arbitrary RAM point. When using Connect Target on the ARM9 core, it always stops at 0xFFFF0000. Now, when I look [...] read more
jtag
omap
1vote
0answers

Reboot loop when enabling interrupts with sti

Whenever I try to enable interrupts using the sti command, the emulator instantly reboots. I am executing the following code in protected mode on bootup: void* idt = (void*) 0x00000; struct { uint16_t length; void* base; } __attribute__((packed)) IDTR = {128, idt}; asm ("lidt %0" : : "m"(IDTR)); asm ("sti"); [...] read more
gcc
x86
interrupt
osdev
protected-mode
1vote
1answer

How can I draw a polyline on a canvas in android?

I've been trying to draw a polyline on a canvas. There are no errors in my codes, but the connected sequence of line segments are not showing.Please find code snippet below; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Path; import android.view.View; public class MyView extends View { private [...] read more
java
android
graphics
android-canvas
polyline
1vote
2answers

How to support full screen navigation UI for RecyclerView?

BACKGROUND I wanted to support full screen navigation UI as shown here: https://medium.com/androiddevelopers/windowinsets-listeners-to-layouts-8f9ccc8fa4d1 https://developer.android.com/guide/navigation/gesturenav THE PROBLEM While all Activities of my app worked fine, I suddently reached a problematic one that has a RecyclerView with thumbs. Here, I got 2 weird issues: 1. When scrolling to the bottom, the last [...] read more
android
android-recyclerview
1vote
0answers

I want my application run on backgroud service when gps turn on

I want my application work every time in background when gps turn on e.g if closed application , still run if press back still run on resume still run my application get current location and compare it by another lat and long to track client (user) thanks very much GPS_Service.class [...] read more
java
android
service
1vote
0answers

Explanation of st_flags bits

I'm writing a python script to delete files on MacOS, and I run into SIP protected files. I know the presence of st_flags more than likely mean I can't delete the file. Like here: >>> os.stat(f).st_flags 524288 But I'm curious to know what that actually means. I looked in stat.h [...] read more
objective-c
linux
macos
file
unix
1vote
1answer

Clustering points in Esri-Maps

I am using ArcGIS maps by Esri for Android SDK link to ArcGIS to display some points on the map. So far I have removed points with same coordinates via removeDupes and just drawn the coordinates that are not duplicated. Then between the points are lines that are connecting them. [...] read more
java
android
point
esri
esri-maps
1vote
2answers

Problem with recycler-adapter onClick item

I have a problem with onClick method in my recycler adapter. I feed my adapter from fragment and then in adapter i get all the information i need from firebase including users info and buttons "join" that were already clicked (i set red background to that button). Everything works fine [...] read more
java
android
firebase
firebase-realtime-database
recycler-adapter
1vote
0answers

Bare bones kernel throws Invalid Opcode Exceptions and General Protection Fault Exceptions

I was following this guide in trying to build a small kernel. I used it to write a small bootloader in assembly which eventually loads and runs C code. I've tried to implement basic interrupt-handling and following this other tutorial but my interrupt handling doesn't seem to work and it [...] read more
gcc
x86
kernel
nasm
osdev
1vote
0answers

How to make my MIPS program more register efficient and readable

This is the C++ code I am trying to convert to MIPS with int count_painted(int *wall, int width, int radius, int coord) { int row = (coord & 0xffff0000) >> 16; int col = coord & 0x0000ffff; int value = 0; for (int row_offset = -radius; row_offset <= radius; row_offset++) [...] read more
c++
performance
assembly
mips
cpu-registers
1vote
1answer

Colors "flowing" in Android background

I have an application and I want to set it's background just like the Instagram's login page, the one with that "gradient colors". The colors are "moving" and it creats a cool effect. This is what I've tried so far: protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_take_one); colorFul = (RelativeLayout) [...] read more
android
colors
instagram
gradient
1vote
1answer

QEMU networking and getty issues

I'm trying to create a minimalist setup for an ARM based virtual machine using qemu. I am following the following guide to do so. I am running QEMU with the following command qemu-system-arm -M vexpress-a9 -dtb ./linux-4.20.8/arch/arm/boot/dts/vexpress-v2p-ca9.dtb -kernel ./linux-4.20.8/arch/arm/boot/zImage -initrd rootfs.img --append "console=ttyAMA0" --nographic I am, for some reason unable [...] read more
embedded-linux
qemu
initrd
initramfs
1vote
2answers

How to make a GridLayout to change its children views size accordingly?

BACKGROUND I need to make a dialpad-like View, like on the Phone app. I'm using a GridLayout of Views. Each cell is of the same size, and contains just a simple TextView that should change its font size if needed. THE PROBLEM I've succeeded, but for some reason it doesn't [...] read more
android
androidx
android-gridlayout
1vote
2answers

Codename One - how to use onTitleScrollAnimation with BorderLayout?

as the Toolbar or Titlearea on scroll animation feature is referenced in the last section of the Toolbar API, and also in this great video tutorial (starting at about min 45), the animation works well under given circumstances. I was not able to find any documentation about what these have [...] read more
animation
codenameone
1vote
1answer

Fading Toolbar on scrolling of a tab (in Codename One)

How to fade the Toolbar on scrolling is described in the Codename One manual, in the section "Title Animations": https://www.codenameone.com/manual/components.html#title-animations-section The example code (taken from the given link) works. I slightly modified it because I need to fade the Toolbar on scrolling of tabs, but my code doesn't work. Can [...] read more
codenameone
1vote
0answers

How to resize the bitmap image in this flood Fill algorithm code and custom view

I am new to programming and I am trying to implement a flood fill algorithm to colorize selected part in the image as a color book app. I have found this link which provides full working code (but slow) for the algorithm. and also provide QueueLinearFloodFiller which is way faster. [...] read more
java
android
0votes
0answers

Linux - ARM - page allocation failure:

I received the following error: ip: page allocation failure: order:10, mode:0x140c0c0(GFP_KERNEL|__GFP_COMP|__GFP_ZERO), nodemask=(null) . . . lowmem_reserve[]: 0 0 0 Normal: 1509*4kB (UEH) 1627*8kB (UE) 1214*16kB (UMH) 898*32kB (UEH) 166*64kB (UEH) 9*128kB (UE) 6*256kB (UH) 6*512kB (EH) 2*1024kB (H) 1*2048kB (U) 0*4096kB 0*8192kB = 87692kB HighMem: 244*4kB (UMC) 161*8kB (UM) 56*16kB [...] read more
linux
memory-usage
linux-kernel
0votes
0answers

Strange system crash & freez

I am facing a strange problem and trying to find any piece of information to get a direction. my System is loose connection suddenly, I can't reach it in the LAN, also the app process that I'm running losing all connection to the cloud. See the following lines of logs [...] read more
linux
debian
raspbian
0votes
1answer

how to redirect a specific loopback port to another address

I would like to redirect the postgres' port to another address which is running postgres. The postgres' instance is hosted on a virtualbox machine with host-only networking configuration. Unfortunately the following rule does not seem to make the job echo "rdr pass inet proto tcp from any to 127.0.0.1 port [...] read more
networking
mac-osx
mac
0votes
1answer

Cannot connect to internet after a power cut yesterday

I work at a small company, we have set up our LAN using an ASUS RT-N18U. We are in a small office as part of a business park, our network comes in over wire, as part of a package supplied by the business park. We had a power cut yesterday, [...] read more
router
troubleshooting
wide-area-network
asus
0votes
0answers

Linux-Yocto, ARM: VFS: Cannot open root device "ubi0:root" or unknown-block(0,0):

I'm booting from NAND zImage and rootfs (UBIFS) to the ARM board (yocto-project building). global.bootm.image="/dev/nand0.root.ubi.kernel" global.bootm.oftree="/dev/nand0.root.ubi.oftree" global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=root rootfstype=ubifs" The process is just erase, format UBI volume and write UBIFS. ubiformat /dev/nand0.root ubiattach /dev/nand0.root ubimkvol -t static /dev/nand0.root.ubi kernel 8M ubimkvol -t static /dev/nand0.root.ubi oftree 1M ubimkvol -t dynamic /dev/nand0.root.ubi [...] read more
linux
partitioning
root
yocto-project
0votes
1answer

UBI layout volume not found

I am following Bootlin's embedded Linux training which aims to put an embedded Linux system on an Atmel SAMA5D4 Xplained board (theory slides, practical lab instructions) and I am stuck a putting the whole system on the NAND flash. They ask me to put the DTB, the kernel, the root [...] read more
linux
embedded-linux
0votes
1answer

SSHing into a RasPi while an openVPN connection is active for all IPs not within the local 10.0.0.* network

I would like to be able to SSH into my raspi; which I can do so over the wlan0 interface if it simplifies things. All other connections Id like to be routed through an openvpn connection at interface tun0. What Im hoping for is the openvpn configurations or the iptables [...] read more
networking
wireless-networking
ssh
vpn
openvpn
0votes
1answer

Why isn't my forced MAC address change working (Raspberry Pi)?

I'm working with Raspberry Pi Zeros on a subnet. I bought external Ethernet adapters for each one to connect them to one another. Unfortunately, these ethernet adapters all came with the exact same MAC addresses, making communication between the Pis near impossible. Because of that I've tried forcing a change [...] read more
linux
networking
raspberry-pi
subnet
0votes
1answer

I was getting strange IP Adress from my (2nd) router ad figure it out it was I change the ethernet port. Why I was getting strange IP?

I have two Routers, the 2nd a tp-link with dd-wrt. I configure it with the same SSID and other options to have one big wifi network. It worked well. But from one moment to another I was not getting internet. At first I though I was being hacked. Then I [...] read more
networking
router
ip
ethernet
dd-wrt
0votes
0answers

Computers can't access each other when both of them connect to Apple NAT64 hotspot

We have an iOS App on App Store. To submit a new version after Jun 1st, 2016, we have to support an “IPv6-only network” according to this link. We referred to Apple's documentation, upgraded a Mac Mini to El Capitan and set it to a NAT64 hotspot. This Mac Mini [...] read more
macos
ipv6
nat
ios
0votes
2answers

List only interface names for ifaces that have 'parent: eth0' field in ifconfig output with sed and/or grep

ifconfig output: lo: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192 inet 127.0.0.1 netmask 0xff000000 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 eth0: flags=8b43<UP,BROADCAST,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST> mtu 1500 address: 01:02:03:04:05:06 media: Ethernet 1000baseT full-duplex status: active inet 192.168.0.10 netmask 0xffff0000 broadcast 192.254.255.255 inet alias 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255 inet6 fe80::0:0:0:01%eth0 prefixlen 64 scopeid [...] read more
linux
networking
sed
0votes
1answer

Strange RFID behaviour and BSOD

I am experiencing a strange issue with an RFID Pad and a BSOD. Dell Optiplex 7010, Win7, 64bit, Intel Corie 7 The issue is that I receive a BSOD just before the login screen appears. However if I unplug the RFID pad from it's USB port at start up, the [...] read more
windows-7
hard-drive
drivers
bsod
0votes
1answer

How do I get USB devices working with BeagleBoard xM and Yocto project Linux?

I've built a minimal Linux for my BeagleBoard xM (Rev C) using the Yocto project build appliance, and installed it on a uSD card following their instructions. It works (Yay!), has a small footprint and boots really fast which is what I want. I used a pretty minimal build recipe [...] read more
linux
boot
beagleboard
0votes
0answers

Why would there be an ifconfig listing en2 with 169.254.x.x on OSX 10.6.8?

Web browsing was becoming very slow, after trying in two different places (home,starbucks). I was looking at ifconfig output and everything I found reasons for, lo0 gif0 stf0, except for one of the enX interfaces: en2: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 ether 0b:0b:0b:0b:0b:0b inet6 fe80::223:32ff:fec7:d2dc%en2 prefixlen 64 scopeid 0x5 inet 169.254.193.122 netmask [...] read more
networking
osx-snow-leopard
0votes
4answers

MacBook OS X applications crashing on startup

Closed my computer last night, went home. Opened it and it had restarted. Now when I open a couple programs such as Adobe Fireworks or Appcelerator Titanium they throw up a nasty error like below. Other programs (Chrome, Firefox, Textmate, Versions) work fine. Any thoughts on this? I haven't owned [...] read more
macos
crash
0votes
0answers

Firefox Plugin Process quit unexpectedly on MacBook

Some plugin on my Firefox 4.0.1 'quits unexpectedly' /almost/ everytime I close my Firefox on my Macbook. Any idea which plugin may be causing this? 'Process: plugin-container [666] Path: /Applications/Firefox.app/Contents/MacOS/plugin-container.app/Contents/MacOS/plugin-container Identifier: org.mozilla.plugincontainer Version: ??? (1.0) Code Type: X86 (Native) Parent Process: firefox-bin [653] Date/Time: 2011-05-18 14:23:20.759 -0400 OS Version: Mac [...] read more
firefox
plugins
0votes
2answers

How do I set the background to a solid color? When I use setContentView the screen is blank

I have looked and tried a lot of different things but no matter what I end up doing the screen is always blank and I'm sure it's something really dumb I'm doing and I'm hoping someone will catch it. I'm trying to alternate background colors but before I even get [...] read more
android
screen
0votes
0answers

qemu-system-arm with sabrelite does not recognize mmc without initrd

I extracted zImage and initrd from the OpenSUSE image for sabrelite and use it to start qemu-system-arm generally successful. But i detect that the initrd execute 2 times, even with the parameter "noinitrd". But without the qemu-system-arm paramater "-initrd initrd" the mmc (sdcard) will not be recognized and it is [...] read more
arm
qemu
initrd
0votes
1answer

DE1-SoC displaying LEDs

I am trying to use the DE1-SoC board to run this program. It is supposed to allow the user to input a character, and return that letter in binary on red LEDs on the board. It uses two functions that take in user input and displays the execution to the [...] read more
c
pointers
embedded
intel
fpga
0votes
1answer

Why does the loop direction of my filter change my result?

I have designed a simple dual channel filter to remove some noise at a given frequency. #include "../include/Filter.h" void Filter(int DataIn, int* DataOut, bool Enable) { static coef_t Coefficients[] = { 0.0076925293, -0.039817952, 0.018740745, 0.013075141, -0.052312399, 0.052374545, 0.017044802, -0.14227364, 0.26541378, 0.68194015, 0.26541378, -0.14227364, 0.017044802, 0.052374545, -0.052312399, 0.013075141, 0.018740745, -0.039817952, 0.0076925293 [...] read more
c++
vivado
vivado-hls
0votes
1answer

Code hangs randomly after 1hr/1day/30 days

I am using Altera Cyclone V FPGA with ARM 7 core, I am running a application with 7 thread with mutexes. The application randomly hangs after 1hr or 1 Day or 1 Month, no defined time. I ran strace when the application is running smoothly and it gives: --------------------------------------------------------------------------------------------------------- -------------------- [...] read more
stack
mutex
deadlock
corrupt
futex
0votes
0answers

How to animate progressbar color with Flutter

I tried to create an animated progressbar where the progress is filling up animatedly and also it changes it's color depending on the final value of the progress. The first part is working properly, but I can't figure out what is wrong with the color animation. What am I missing? [...] read more
flutter
flutter-animation
0votes
0answers

Alert Geofence once when map is opened

My geofence is trigering actions once when i open map. Basically i want it to show a toast and make a button visible once i enter a circle and show a toast and make a button invisible once i leave the circle. I can't find a solution so maybe you [...] read more
java
android
google-maps
geofencing
0votes
0answers

Gdb layout asm window showing raw instruction opcodes and operands

When I use layout asm command I see the following: │0x4000f2 <_start+18> mov $0xffff0000,%eax When I use disas /r command I see the following: 0x00000000004000f2 <+18>: b8 00 00 ff ff mov $0xffff0000,%eax That is, in the latter case, I can also see the opcode b8 and the operand. How [...] read more
linux
gdb
executable
elf
instructions
0votes
1answer

How to setOnClickListener on a customView inside a Wallpaper Service?

I have a class that extends the WallpaperService and inside it i have a CustomView that is being drawn on Canvas. What i want to do is setOnClickListener on this view. Currently i am doing it like customView.SetOnClickListener({}). But its not working. Below is my Service Class: public class ClockWallpaperService [...] read more
java
android
android-studio
live-wallpaper
0votes
0answers

Clearing the Hardfault or Usage faults in Cortex-M4 processor

While working on implementation of system faults for the system with ARM cortex-m4 microprocessor. I have enabled usage faults using System Handler Control and State Register, SCB->SHCSR |= SCB_SHCSR_USGFAULTENA_Msk; and enabled divide by zero faults using configurable control register. SCB->CCR |= SCB_CCR_DIV_0_TRP_Msk; I'm also trying to avoid entering into usage [...] read more
arm
cortex-m
iar
ucos
0votes
0answers

Boot of embedded Linux is stuck. How to debug?

In embedded platform built by petalinux, during boot(from u-boot), the last print I see is(sometimes) mmcblk0boot1 print. What are the good ways to debug/trace/fix the problem? As you can see at the end of the log is the start of another boot The attached log ======================================================================= > U-Boot 2015.07 (Jul [...] read more
embedded-linux
u-boot
petalinux
0votes
1answer

React Native bundle loading slowly or not at all

The problem seems to be network-specific, the console log points to two possible errors causing the slowdown: > nw_resolver_create_dns_service_locked [C150094] DNSServiceCreateDelegateConnection failed: NoMemory(-65539) or > nw_socket_handle_socket_event Socket SO_ERROR [61: Connection refused] I tried two network configurations: 1. The development Mac and the iPhone on the same subnet (WiFi) of a [...] read more
ios
react-native
sockets
dns
node-webkit
0votes
0answers

Jetpack Composable doesn't react to changes

I've been trying to follow the only good example with support that I could find, but in my case, it doesn't work. I have a ViewModel that talks to a @Model in Composable, and changes a loading: Bool according to a MutableLiveData<Boolean> but it doesn't recompose. class LoaderViewModel : ViewModel() [...] read more
android
android-fragments
android-livedata
android-viewmodel
android-jetpack-compose
0votes
0answers

RX Fifo1 for CAN is not generating an interrupt callback (basically it is not receiving the data)

There are two types of messages on the CAN bus. Those are broadcast message and default message. Currently, I'm using fifo0 for both the message(which works perfectly fine). But I would like to use fifo1 specially for broadcast message. Below is my initializing code uint8 BspCan_RxFilterConfig(uint32 filterId, uint32 filterMask, uint8 [...] read more
embedded
stm32
fifo
can-bus
iar
0votes
0answers

Striped down kernel take long time to load on Raspberry Pi 4

I'm just trying to customize the kernel configuration for Raspberry Pi 4B, to achieve a compact system image and quick startup, but as we can see in the logs there's approximate ~4.0s to start executing my 4.2MB kernel. * Logs: 23:20:06.198 -> 23:20:06.198 -> PM_RSTS: 0x00001000 23:20:06.198 -> RPi: BOOTLOADER [...] read more
linux-kernel
buildroot
raspberry-pi4
0votes
0answers

Rust: Implemented Display on Formatter for BufferMemory but for some reason won't take

currently I'm trying to debug a problem but in order to do that I'm trying to print out some information so I figured I would go and implement Display for my BufferMemory. I keep getting std::option::Option<&memory::BufferMemory>` doesn't implement `std::fmt::Displaystd::option::Option<&memory::BufferMemory>` cannot be formatted with the default formatter even though I'm pretty [...] read more
rust
0votes
1answer

How can I change color of specific layout component?

How can I change color of star components in this layout? Can it be done it below code or do I have to work in xml? @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setTheme(R.style.Custom); ViewGroup layout = getLayout(getIntent().getStringExtra("key1")); if (layout == null) return; layout.addView(new ProgressBar(this)); layout.addView(new RadioButton(this)); layout.addView(new RatingBar(this)); layout.addView(new [...] read more
android
0votes
1answer

How does the UTF-8 encoding algorithm work on 8-bit chunks (in JavaScript)?

I am looking at this: function encodeCodePoint(codePoint) { if ((codePoint & 0xFFFFFF80) == 0) { // 1-byte sequence return stringFromCharCode(codePoint); } var symbol = ''; if ((codePoint & 0xFFFFF800) == 0) { // 2-byte sequence symbol = stringFromCharCode(((codePoint >> 6) & 0x1F) | 0xC0); } else if ((codePoint & 0xFFFF0000) [...] read more
javascript
encoding
utf-8
bit-manipulation
0votes
4answers

How can I extract first and last line from multiple text blocks separated with new line?

I have a file containing multiple tests with detailed action written one beneath another. All test blocks are separated one from another by new line. I want to extract only first and last line from the all blocks and put it on one line for each block into a new [...] read more
sed
0votes
0answers

problem while booting when the uImage is replaced

I made a small change in the driver code in the kernel, built the kernel (uImage). make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage Replaced the uImage in the ISO (extracted it and rebuilt). But I get the following error while booting. I even reverted the code changes, only built and replaced the uImage. [...] read more
ubuntu
linux-kernel
driver
u-boot
0votes
0answers

MWhy is my bitmaps not drawn on the canvas?

I am trying to make an app where the user selects an image from the device's gallery and then can draw rectangles on the selected image, I can already navigate in the gallery and get the image then I convert it into bitmap and with the Canvas class the I [...] read more
java
android
android-studio
canvas
0votes
2answers

Why can not use hex Int in kotlin method intArrayOf?

I found a strange problem in Kotlin. I can assign a hexadecimal integer to an Int variable, just like: private val a = 0xFFFF0000 //works good but I can't use this hex integer in intArrayOf: private val array: IntArray = intArrayOf(0xFFFF0000) IDE prompts: the integer literal does not conform to [...] read more
java
kotlin
int
0votes
0answers

Why is my program failing to load a null value into the final index of an array?

I'm working on a Memory Mapped I/O problem using MIPS/QtSPIM for one of my classes. The goal is to read characters from the keyboard into a fixed length buffer (size n) pointed to by $a0. If the buffer reaches index n-1 or a linefeed character is entered, the final step [...] read more
mips
0votes
0answers

flutter BottomAppBar selected color

So I currently have the following for my bottom navigation bottomNavigationBar: BottomAppBar( shape: CircularNotchedRectangle(), child: Container( decoration: new BoxDecoration(color: new Color(0xFFFF0000)), height: 75, child: Row( mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: <Widget>[ IconButton( iconSize: 30.0, padding: EdgeInsets.only(left: 28.0), icon: Icon(Icons.home), onPressed: () { setState(() { onTabTapped(0); }); }, ), IconButton( iconSize: [...] read more
flutter
android-bottomappbar
0votes
0answers

Gesture Detector doesn't want to size itself to a child container (unless you give it a color)

So this problem is driving me mad so any help would be greatly appreciated :) I currently have a custom Gesture Detector which I want to size to the width and height parameters I've given to the child container. Though it will only do this if the child container is [...] read more
flutter
layout
gesturedetector
0votes
2answers

UBI layout volume not found

I am following Bootlin's embedded Linux training which aims to put an embedded Linux system on an Atmel SAMA5D4 Xplained board (theory slides, practical lab instructions) and I am stuck a putting the whole system on the NAND flash. They ask me to put the DTB, the kernel, the root [...] read more
linux
linux-kernel
embedded-linux
u-boot
0votes
0answers

changing this IO MIPS program to work on a null terminating string

First off thank you for taking the time to help me out. I'm new to Comp Architecture and MIPS and am passionate about learning this stuff so excuse the noobiness. Secondly before you say there are other discussions opened discussing this topic- i've tried & they don't fit into the [...] read more
io
mips
mars-simulator
null-terminated
0votes
1answer

The right way to pack BGRA and ARGB color to int

In SharpDx BGRA shift for red is 16: (color >> 16) & 255 see here. But in .NET, ARGB shift for red is also 16: private const int ARGBRedShift = 16; see here and here and here. I'm confused, what's right? this (like .NET): public int PackeColorToArgb() { int value [...] read more
c#
.net
colors
sharpdx
argb
0votes
2answers

Switching between tabs initstate() called multiple times

Switching between tabs initstate() called multiple times. i have 4 tabs in my tab barA,B,C and D. case (1) if i switch in tab like from tab A to B it's working fine. case (2) but if i'm go to tab A to C then initstate() of tab 'B' called [...] read more
flutter
dart
flutter-layout
0votes
0answers

Title ColorPickerDialog not showing

I'm developing a color selector. The selector works, but I can't show the title. The selector class: public class ColorPickerDialog extends Dialog { public interface OnColorChangedListener { void colorChanged(int color); } private OnColorChangedListener mListener; private int mInitialColor; private static class ColorPickerView extends View { private Paint mPaint; private Paint mCenterPaint; [...] read more
android
color-picker
0votes
1answer

embedded linux buidling/booting issue

I am trying to cross compile the Linux for a dual-core ARM Cortex A9 device. While booting I got the following prints on the UART which is showing some sync issue when Core-1 is starting. I remember I have enabled multi programming while compiling the kernel. What part of the [...] read more
linux-kernel
embedded-linux
buildroot
busybox
intel-fpga
0votes
0answers

Notification LED shows only when device is locked

During development of an Android app, I would like to use the notification LED for an unobtrusive way of debugging, eg. when something happens, it should switch to red. I already realized that it is not that easy to use, since I have to use a notification. This is my [...] read more
android
android-notifications
0votes
1answer

Assertion failed CV_Assert( CV_IS_MAT(objectPoints) && CV_IS_MAT(imagePoints) && CV_IS_MAT(A) && CV_IS_MAT(rvec) && CV_IS_MAT(tvec) )

I've calibrated a camera and obtained 0.17 reprojection error, the file is saved as camera.yml. Then, I imported this file to my aruco detection algorithm and when I run this algorithm, everything starts out fine until an aruco marker is detected, however, the moment an aruco marker is detected, the [...] read more
c++
opencv
camera-calibration
aruco
0votes
1answer

AS3 'drawPath' simple shape not drawing correctly - why?

I want to draw a simple triangle in ActionScript 3. I use the 'drawPath' method of 'Graphics' class. here is the code snippet: stage.stage.quality = StageQuality.LOW; // Change quality to low so no anti-aliasing occurs var trianglePoints:Vector.<Number> = new Vector.<Number>(); trianglePoints.push(0); trianglePoints.push(0); // Coordinate (0,0) trianglePoints.push(20); trianglePoints.push(0); // Coordinate (20,0) [...] read more
actionscript-3
flash
graphics
0votes
1answer

How to create scratch card which allows user to scratch only once

This code is working, I created Scratch image view through which I can scratch the image view to see the the image, but scratch image view is automatically filling with scratch pattern when I reopen the app or I move to previous activity.only once the user should scratch the image [...] read more
android
firebase
0votes
0answers

Is there a way to generate a GUID based on the high and low values from the NHibernate algorithm in JavaScript?

I need to generate a GUID or UUID based on high and low values. I already converted the high and low values to uint32 or I hope so. I converted the numbers with this code: var n1 = lo_value; var n2 = hi_value; var n1Low16 = n1 & 0x0000ffff; var [...] read more
javascript
guid
0votes
0answers

How to draw 2 cubes instead fo one? (DirectX9)

Here my code draws one cube: void CreateCube( LPDIRECT3DDEVICE9 &ptr_dxDevice, LPDIRECT3DINDEXBUFFER9 &ptr_indexBuffer, LPDIRECT3DVERTEXBUFFER9 &ptr_vertexBuffer, int cubeNumber ) { // create the vertices using the CUSTOMVERTEX struct CUSTOMVERTEX vertices[] = { { -0.2f, 0.2f, -0.2f, 0xffff0000,}, { 0.2f, 0.2f, -0.2f, 0xff00ff00,}, { -0.2f, -0.2f, -0.2f, 0xffff0000,}, { 0.2f, -0.2f, -0.2f, 0xff00ff00,}, [...] read more
c++
visual-c++
directx
0votes
2answers

Raspberry Pi 3 bare metal: unexpected behaviour from arrays and switch statements

I currently have a simple program that sets up a framebuffer that can be written to. I am encountering behaviour where values stored i arrays, once retrieved, come back as seemingly random values, with no relation to the originals. I have also noticed some similarly strange and.unexpected behaviour from switch [...] read more
c
raspberry-pi
raspberry-pi3
0votes
1answer

Are the 3 pointed lines in the source code redundant?

The following program detects an image on the basis of histogram and mode calculation. SECTION .data histogram_buffer: times 1024 db 0 ; 256 * 4 SECTION .text global food food: push ebp mov ebp,esp push esi push ecx push edx push ebx push edi mov esi,[ebp+8]; 1st function parameter. save [...] read more
assembly
bitmap
x86
0votes
1answer

How can I realize a Mars program while Extended (pseudo) instruction or format not permitted is deactivated using the Operation NOT, ADDI and ADDIU?

We have to extend our code. With these operations. Operations [https://i.stack.imgur.com/sWzCa.png] Ziel= destination register in line 14 im getting the error: line 14 column 2: Extended (pseudo) instruction or format not permitted. See Settings. When i comment line 14. (#not $9, $9) i get this errorline 27: Runtime exception at [...] read more
assembly
mips
mars
0votes
1answer

initializing values in Mars 4.5 getting an error

My homework is to initialize values in certain registers. We have to turn off Permit extended (pseudo) instructions and formats. When i try to assemble the code i get this error message for line 7,8,9 Extended (pseudo) instruction or format not permitted. Also is there a way to optimize the [...] read more
assembly
mips
mars-simulator
0votes
0answers

Calculating the TCP checksum value - TCP Length & Padding

I'm attempting to calculate the TCP checksum value (which apparently is the same as the IP4 checksum) but getting the wrong results. I think the issue is arrising from either the padding at the end or the TCP header field but I can't find any details (from the RFC) on [...] read more
java
tcp
checksum
libpcap
0votes
0answers

Linux hangs at [random: nonblocking pool is initialized]

I'm learning to use pico-imx6 on baseboard pico-dwarf. I copy the image to the eMMC on pico-imx6 using: sudo dd if=pico-imx6_pico-dwarf_ubuntu-16.04_installer_hdmi_20160825.img of=/dev/sd<partition> bs=1M && sync The boot process is stuck. Here is the whole console message: U-Boot SPL 2015.04-00021-g9a899f8 (Jul 19 2016 - 14:07:40) Boot Device: MMC Boot Device: MMC [...] read more
embedded-linux
boot
imx6
0votes
0answers

How do I enable All UART Ports at Boot?

On my embedded system there is a Real Time Clock (RTC) connected to uart 2. 21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 59, base_baud = 5000000) is a IMX I have written a rtc kernel driver that uses filp_open("/dev/ttymxc1", O_RDWR | O_NOCTTY | O_SYNC, 0) to communicate with the RTC. [...] read more
linux-kernel
kernel-module
uart
imx6
0votes
1answer

Confusion regarding kernel version, device tree, and buildroot

I was provided with a 3.0.35 linux kernel for an arm i.mx6 board that uses the older "board file" format, as well as an older (2013.02) buildroot repo that has been used to generate the proper images and rootfs. My goal is to use the latest buildroot public repo commit [...] read more
linux
buildroot
device-tree
imx6
0votes
2answers

How to enable android's Status LED or change its color?

I searched about it but I can't figure this out!! There are a few answers but they are not working in Android 8.0 or above. I saw this feature in Alibaba and WhatsApp!! Help if you can! This can help others too. My Codes: NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); if [...] read more
android
-1votes
1answer

How can I access my own IP under StrongSwan? [MacOS]

I've set up SoftEther VPN on a brand-new Ubuntu 16.04 server and connected macOS, Windows and iOS client to it. I've created Ruby on Rails webserver on my macbook and binded it to my VPN address. Other clients can access it but not my macbook - I can't even ping [...] read more
vpn
mac-osx
ip
l2tp
softether
-1votes
1answer

Read pcm file in node js to get raw data

The below code parses a sample pcm file var dataFile = 'C:\\Users\\<user>\\Desktop\\small.pcm'; fs.readFile(dataFile, function(err, res) { if(err) { console.log('Error:', e.stack); }else{ var ampData = []; var arrByte = Uint8Array.from(Buffer.from(res)); //Convert to byte array for(var i=0;i<arrByte.length;i=i+2){ var val; var byteA = arrByte[i]; var byteB = arrByte[i+1]; var sign = byteA & [...] read more
javascript
node.js
parsing
pcm
waveform
-1votes
1answer

Nested classes in Dart

How to create nested structure like Theme.colors.primary ? I js/ts if i want to create an app theme like this it would be: class Theme { public colors = { primary: '#ff0000' } } And in Dart ? Something like the following ? class AppColors { Color get primary => [...] read more
flutter
dart
-1votes
1answer

Why is the binary shift required when extracting lo and hi words from a DWORD?

First off sorry about the title, I didn't want to make it too long or confusing. If someone can help me make it more general as this situation probably applies to any kind of bit mask operation. [The following code is run in Windows (so it's little endian)] If I [...] read more
c++
c
-1votes
4answers

How to show Cancel and Accept button in AlertDialog Android

I am having troubles setting the two buttons on the lower part of the alert what I am trying to do is get a similar look to the IOS look of the buttons. here is my current code: public void openInstructions() { AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); final AlertDialog dialog [...] read more
java
android
interface
-2votes
1answer

Getting user Id from session after Facebook login

I'm working with Codenameone, and integrated Facebook login and worked so well, the good thing is that when I reload my emulator the session is always on, What I actually want to do is to get the user Information and save it in my database in the user's table. Is [...] read more
java
facebook
codenameone
-3votes
1answer

Fixed Point number 4 bytes or 8 bytes with different scale factors - library to convert numbers?

I have to read fixed point numbers either 4 bytes or 8 bytes and the location of the decimal moves for each item (a known location)(scale number) Is there a library where this is automated? C/C++ is the language of choice For Example: This is assuming a scale of 20 [...] read more
c++
c
bit-manipulation
fixed-point
-7votes
2answers

Understanding problem in bitwise operator in C

Here x is any decimal number. What does this expression mean? return ( (x & 0x0000FFFF)<<16 | (x & 0xFFFF0000)>>16 ); read more
c

Comments

Leave a comment

(plain text only)

Sources

  1. https://msdn.microsoft.com/en-us/library/cc231198.aspx

User contributions licensed under CC BY-SA 3.0