w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
git - dual boot ubuntu and windows with separate data partition
I'm guessing there's an issue with line endings. You probably have commited your code with windows line endings and when you checked out the code in ubuntu git converted those to unix style line endings. Take a look at this page Dealing with line endings

Categories : Windows

How to get Windows key from disk that cannot boot?
Just for anyone having the same problem, I found this program http://www.nirsoft.net/utils/product_cd_key_viewer.html , that can find the keys also for external drives, choosing as source the WindowsSystem32configSOFTWARE file.

Categories : Misc

Programmatically determine if Windows 8 secure boot is enabled
MSinfo32.exe read the value UEFISecureBootEnabled from the registry under HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecureBootState. On my system SecureBoot is disabled and return value is 0. So I assume that 1 means enabled.

Categories : C#

Finding Memory Size in Boot without DOS, Windows, Linux
You will need to read the ACPI tables on a PC (or other machines that support ACPI). Note that this will not give you the total size as one number, but give you the memory size of each region of memory - on a simple machine, that may just be two or three regions (there are holes of "not real memory" at the 0xA0000-0xFFFFF and wherever the BIOS decides to put the "PCI-hole"). I suspect it won't be entirely trivial to fit the ACPI reader into a single sector, considering some of the boot sector only has around 400 bytes of space available (although if you completely skip the partition table, I suppose you can use almost all of the 512 bytes). As to "how to call C/C++", you will not be able to fit any meaningful C or C++ program in less than several sectors. You will need to take a look

Categories : C++

Running program from pendrive before windows boots
Is the program an executable file? Did you try looking into Windows registry? The following key is where the virus/malware usually attached itself during windows logon. A warning though, any mistake will cause you unable to go into Windows, you have to remotely modify the registry using Bootdisk. HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogon

Categories : Windows

python C-extension setup failed with "unable to find vscvarsall.bat" on windows-7
Since you have a C-extension you will need to compile all C Extensions to be used by your python installation using the same version of the C compiler used to build the python executable from the source. Hence, the answer to your first question is yes - you will need VS 2008 to build the C-extension. About the second query - please refer here to understand how to setup MinGW with Python 2.7.2. This example uses Windows XP, however I guess it should work on Win 7 as well provided the correct paths have been provided. Hope this helps

Categories : Python

qemu: could not load PC BIOS 'bios.bin' in Mountain Lion
I got the same error message on Windows when trying to run the x86 emulator. What worked for me was to find the "bios.bin" and "vgabios-cirrus.bin" files somewhere in C:, and copy them to the folder ....android-sdk-windows ools.

Categories : Android

U-Boot. Where does it all begin?
On u-boot-2013.04, board_mmc_init gets called from drivers/mmc/mmc.c, function mmc_initialize(...). To find this, "grep -r" (recursive) is your friend. "Where do I look to see where everything 'starts' ?" Not sure, but look for ENTRY(_start) lines.

Categories : Misc

try or tryCatch with boot R
This is not an answer with your specific code, but a more general demonstration of tryCatch for the situation you describe. If you want to simply remove entries that cause errors, have the function return nothing on error and then remove NULL values from the results: testfun <- function(i) { tryCatch({ d <- rbinom(1,1,.3) # generate an error 30% of the time if(d==1) error("test stop") else return(1:10) # return your actual values }, error = function(err) {return()} # return NULL on error ) } x <- sapply(1:20, FUN=testfun) # run demo 20 times x <- x[-(which(sapply(x,is.null),arr.ind=TRUE))] # when errors happen, x is shorter than 20 The final line removes NULL entries from the list (based on this: http://stackoverflow.com/a/3336726/2338862).

Categories : R

What is boot.js (dart)
In a nutshell, the boot.js script makes it possible to load and run a polymer.dart app without needing to compile your app using build.dart. You can still run build.dart as a lint tool, but there is no required compile step anymore. Internally, boot.js looks for the imported files with <polymer-element>s, collects them, and initializes each <polymer-element> for you. Read the description at the top of file if you want to know more about the internals. You can find it under packages/polymer of any polymer app.

Categories : Dart

Start Bluetooth from ADB or at boot?
If it works for you, an app can easily change the bluetooth state. The code is very simple, I'm sure you're familiar with it: BluetoothAdapter.getDefaultAdapter().enable() This could be a "headless" application with a service only that listens for a specific intent. You could install it and then broadcast the activator intent. If you want the application to not appear in the app "drawer" (only in the Settings->Apps) then remove the launcher and main intent filters from the AndroidManifest.xml file. That is, delete these: <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> From this time on you can start the app/service with the intent you define for it in th

Categories : Android

How do I start MariaDB on boot on Mac OS X?
You need to use launchd. See $ man launchd. Additionally, Nathan wrote a good article on launchd.

Categories : Osx

Running code at boot?
You can create a Launch Daemon and install it. You should go through the following procedure: Create your program (a normal executable with main() etc.) and put it into one of the standard executable paths. I suggest you use /usr/libexec/ for this purpose. Create a property list in /System/Library/LaunchDaemons/ of which the name is an arbitrary bundle ID (e. g. com.mycompany.NastyLaunchDaemon.plist), and its contents are the following: <plist> <dict> <key>Label</key> <!-- this needs to match the file name without the .plist extension! --> <string>com.mycompany.NastyLaunchDaemon</string> <key>Program</key> <string>/usr/libexec/mynastylaunchd</string> <key>RunAtLoad</key> <true

Categories : IOS

Boot Debian with Android
You can use Script Manager (https://play.google.com/store/apps/details?id=os.tools.scriptmanager) to run script with the following contents at boot: #!/system/bin/sh deb s Use your own parameters to "deb" to launch whatever service you need. In this case I've started the ssh server.

Categories : Android

Android app crashes on boot
Change like this in your manifest and try it: <receiver android:enabled="true" android:name=".Autostart" android:permission="android.permission.RECEIVE_BOOT_COMPLETED"> <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </receiver>

Categories : Java

Ruby script on ec2 boot
in your script put a "lock"file somewhere (e.g. /etc/couchbase-config-done) and in the beginning of your script only continue the script if this file is not found. however i do not understand who calls your script and why you cannot simply call it less often/only during/after instance creation not on every boot...

Categories : Ruby On Rails

SEandroid Boot Up Problems
Rookie mistake. Forgot to add in Google's proprietary drivers for the Nexus 7. Available here for who ever needs them! https://developers.google.com/android/nexus/drivers thanks all

Categories : Android

Starting Vagrant VM on host boot
Cron job doesn't fit into this use case, it is for scheduled jobs. As you are running Ubuntu as host, I'd recommend using /etc/rc.local, place the commands in the rc.local script which is executed at the end of the init process. It'll look like this #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. cd /path/to/vagrant_vm1 && vagrant up cd /path/to/vagrant_vm2 && vagrant up exit 0 NOTE: There will be port conflicts on the host if you start more than 1 Vagrant boxes with the same networking mode - NAT (default), which by de

Categories : Ubuntu

Decrease rails boot time
RUBY_HEAP_MIN_SLOTS (default 10_000) - the initial number of heap slots and minimum number of slots at all times. One heap slot can hold one Ruby object. RUBY_HEAP_FREE_MIN (default 4_096) - the number of free slots that should be present after the garbage collector finishes running. If there are fewer than those defined, it allocates new ones according to RUBY_HEAP_SLOTS_INCREMENT and RUBY_HEAP_SLOTS_GROWTH_FACTOR parameters RUBY_HEAP_SLOTS_INCREMENT (default 10_000) - the number of new slots to allocate when all initial slots are used. The second heap. RUBY_HEAP_SLOTS_GROWTH_FACTOR (default 1.8) - multiplication factor used to determine how many new slots to allocate (RUBY_HEAP_SLOTS_INCREMENT * multiplication factor). For heaps #3 and onward. RUBY_GC_MALLOC_LIMIT (default 8_000_

Categories : Ruby On Rails

Android how to start activity on Boot-up
Add this into Manifest. <receiver android:name=".Bootupclass" android:enabled="true" android:permission="android.permission.RECEIVE_BOOT_COMPLETED" > </receiver> Bootupclass public class Bootupclass extends BroadcastReceiver{ @Override public void onReceive(Context context, Intent intent) { //write intent here } }

Categories : Android

Android boot image format
No. You are right. mkbootimg cross-compiled for ARM will run into issues as described in this question.

Categories : Android

Android early boot console over usb
It is indeed possible to setup a serial console to capture the boot-loader and Linux-kernel console messages over the USB port of a Nexus S. Essentially one needs to setup a USB-to-UART converter modified to fit the micro-USB port of the Nexus S. Detailed instructions with screenshots are available in this article.

Categories : Android

Boot AngularJS + Cloud Endpoints
This sorted out my boot sequence: function customerInit(){ angular.element(document).ready(function() { window.init(); }); } The ng-cloak directive prevents me from seeing a flash of unparsed angular directives.

Categories : Angularjs

how does u-boot maps peripheral memory?
Welcome to Stackoverflow. The registers are mapped to RAM memory address space at hardware level using different type of interconnects in the SoC. e.g Lets take the example of OMAP 35x series and see how UART registers are mapped to the RAM memory address space of the SoC and how we may access them in U-Boot. In the Technical Reference Manual for OMAP 35x, Table 2-3. L4-Core Memory Space Mapping, we see that base address for UART1 is 0x4806A000 and the size (of RAM that it occupies) is 4KB. It means that registers for UART1 are mapped to RAM the memory space in a 4KB region starting at this address. To access a register of UART1, we need to know its offset from the base address to get its actual address. These offsets can be found in Table 17-39 UART IrDA CIR Register Summary. Once we

Categories : Misc

How to check if my BroadcastReceiver receives the BOOT?
Assuming BOOT means BOOT_COMPLETED then you could use the following: public class BootCompleteReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) { //Do a Log or, less likely, a Toast or start your application here. } } }; You would register this in the manifest like such: <receiver android:name="com.example.yourAppName.BootReceiver"> <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED"/> </intent-filter> </receiver>

Categories : Android

Raw read the boot sector with fstream
File stream operations are written to access files. The CPP Reference does not further specify what a 'file' is in this context -- and maybe they are right. After all, it highly depends on the OS what's considered a 'file'. However: under none of these interpretations is the boot sector a file. You cannot see or read the boot sector in Windows Explorer or OS X Finder -- it's "above and beyond" the level of files. Your test program fails because "G:" is not interpreted as 'a flash drive', but merely as 'a full path specification'. When working on the level of "boot sectors", there are no paths and drive letter assignments. You are working with physical objects instead: actual disks, and actual sectors. See http://www.codeproject.com/Articles/28314/Reading-and-Writing-to-Raw-Disk-Sectors

Categories : C++

How do I start gerrit automatically in OS X on boot?
So far the best solution I was able to come up with was this, which does the job: Create a wrapper script: /opt/gerrit2/bin/gerrit.sh start Put a .command extension to the wrapper script - "start_gerrit.command" and make it executable In System Preferences -> User & Groups -> Login Items, add the wrapper script. Now gerrit starts automatically whenever I log in. I really wanted to make it run at system start-up using launchd plist, but I couldn't get it to work. Also, if I just do "sudo gerrit.sh start", it always ends up taking me to root prompt for some reason, which I have to "exit" out of: Mac:~ me$ sudo /opt/gerrit2/bin/gerrit.sh start Starting Gerrit Code Review: Mac:~ root# Mac:~ root# Mac:~ root# exit logout FAILED Mac:~ me$ If someone has a better solution, please

Categories : Osx

WinService sometimes fails to start after boot
Please see my answer from the duplicate. A windows service typically shouldn't have access to the desktop for security reasons. But it certainly should have a good amount of logging in it. You probably have a race condition. The only thing you could do about this in WiX would be to express a dependency on another service to get the service control manager to wait awhile before starting the service. But it really would be better if your code was more robust. An example would be the OnStart event fire up a background worker process and then return success. The background thread could then keep attempting to host the WCF endpoint and everything do a fair amount of logging in the process.

Categories : C#

Scala app on Heroku - Boot Timeout
Does this happen all the time? It happens to me too, occasionally. Seems it started after I moved my app from US to EU region. Which region is your app in? It doesn't necessarily means there is something wrong with your app. Might just be that the Dyno it self takes a while to start, if you look at the log you should be able to see how long it takes from the app enters starting to when it starts the JVM. If that time is considerable and it keeps happening, you should contact Heroku support.

Categories : Scala

Setting Time on AlarmManager after Boot
You just need to calculate the time remaining until the notification is to fire within your BootBroatcastReceiver. For example private long getNextNotificationTime() { long value = // calculate milliseconds until next notification return value; } Now, use this value in your receiver. long nextAlarmTime = this.getNextNotificationTime(); Intent notificationIntent = new Intent(this, BQBroadcastReceiver.class); PendingIntent pendingIntent = PendingIntent.getBroadcast(this, 0, notificationIntent, 0); AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE); alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, nextAlarmTime, 24HOURS, pendingIntent); This means your alarm will ONLY need to recalculate on boot and the

Categories : Android

Linux boot process -- iniramfs & root ()
With initrd there are two options: Using pivot_root to rotate the final filesystem into position, or Emptying the root and mounting the final filesystem over it. More info can be found here.

Categories : Linux

create Android boot animation for TextView
You can try Frame Animation. Try animating each letter individually, and repeating them. Here is a tutorial, hope this helps you:

Categories : Android

Unable to boot rails server using mysql2
you have to read the error message carefully, it's in there ;) Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (mysql2 is not part of the bundle. Add it to Gemfile.) (LoadError) just add gem 'mysql2' to your Gemfile, and run bundle install.

Categories : Misc

Reading boot Sector of the hard disk
The boot sector of the disk contains not ASCII data, but code. With high probability, one of the first bytes will be NULL and remaining possibly not printable codes (such as CR, LF, etc.). Trying to print the buffer by INT 10h, which prints ascii codes, and ending on 0 will result probably with nothing displayed at all. You should convert every byte of the buffer to hexadecimal string and then print these strings to the display. This way you will get simple hex dump of the boot sector.

Categories : Assembly

how to edit initramfs to add a new partition after boot in CentOs
I'm gonna go on a guess here. If I understand what you want to do correctly, what you want to do is to make another ext3 partition visible in CentOS. If so, you want to make sure that the partition exists. Maybe you have a disk called /dev/sda it might have 2 partiotions sda1 ext3 mounted at /boot and sda2 ext3 mounted at / To view this use "sudo blkid" fdisk-l or similar. These partitions are loaded at boot from the list found in /etc/fstab say you still have space left on the disk. use fdisk/gparted to create a new ext3 partition sda3. add a line for that disk in /etc/fstab now it should be accessible after a reboot or after "sudo mount -a" I might have completely misunderstood your question. Edit: I think I understand what you want to do now, and you probably want to edit

Categories : Linux

Android start app at boot after waiting for 1 minute
You can use handler int duration = 1000; // milliseconds new Handler().postDelayed(new Runnable() { @Override public void run() { Intent i = new Intent(context, MainActivity.class); i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(i); } }, duration);

Categories : Android

Stop Raspberry Pi from running program at boot
Update: Looks like I failed to get that you want to interrupt the running bootprocess and stop the script. The simplest idea would be to turn of the pi, unplug the sd card and plug it into your desktop, (re)move the script and boot again. Processes spawned during are stored in scripts in /etc/init.d/.... These scripts are called by the init process, the first process on a Linux machine (PID:1) But init starts not all scripts in /etc/init.d. This depends on the run level. On a debian system there are 7 run levels. For every run level there is a folder called like: /etc/rc0.d ... /rc6.d in which are softlinks to scripts from /etc/init.d are stored. To remove a script from being executed on every boot you'll delete all links from that folders. Usually on debian systems this is don

Categories : Linux

u-boot - control characters support disabled
The CTRL key is a modifier. And CTRL+KEY combos register as normal KEY press event with additional flags set to indicate the status of modifier keys. Read about modifiers in keyboard drivers in the Linux kernel keyboard driver documentation. Also check this excellent article on how keyboards work. Handling all the modifiers requires additional complexity in the code. Bootloaders run in a severely constrained environment. Especially on embedded systems(which u-boot is meant for), it is very common to expect the entire u-boot to load and run within 64/128K of RAM (the binary + stack). Considering the fact that we have >50 unique keys on our keyboards to bang before we require using modifiers, software support for them is usually not implemented in u-boot.

Categories : Misc

U-Boot: Unexpected problems porting code
Indeed, the code was a little bit too complex to be executed at this point of boot time. At this time there is ne real CRT and I only have a minimal stack. Thus, I moved the code to board_init_f() which is still part of the SPL. It gave more stable results and my algorithm now works as expected.

Categories : C

File systems and the boot parameter block:
I asked Mike Saunders ( the author of Mike-OS) in an email and his answer was no. I can't use this table for FAT32 just by changing that (acFSType: ascii “FAT16 “)part. To get a boot parameter block for the FAT32 file-system he sent me this link to the Microsoft website.

Categories : Misc



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