w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
qemu on Raspberry Pi Arch Linux latest sd image
In case archlinux-hf-2013-07-22.img Here there 3 partion are made. you can check by using fdisk -l archlinux-hf-2013-07-22.img rootfs is in sd5 i.e 5th partion. So pass this parameter "root=/dev/sda5 panic=1" , it will boot perfectly.

Categories : Linux

How to get kernel version without arch
Given that regex can be used, you can match the string against ^(.*).[^.]*$ and take the first capture group. ((.*)..* will generally also work, with "greedy" quantifiers, but cf. a reference for your regex engine.)

Categories : Linux

Webstart: What os and arch does my system return?
You can use System.getProperty("os.name") for the OS and System.getProperty("os.arch") for the architecture, although this will need to be in the web start app itself.

Categories : Java

What is the macro testing AVX-2 arch for Intel CPU?
According to this thread Generate list of preprocessor macros defined by the compiler the same -dM works for icc.

Categories : C++

libcurl Invalid ELF header in new Arch Install
maybe I have a 64 bit version, whilst I'm running Arch i686 That would do it. Run file ./curl-config. If it says ELF 64-bit LSB executable,... reinstall curl from correct packages.

Categories : Misc

qmake on OS X: disable x86/i386 arch (build only x86_64)
I believe that qmake uses the compiler available in the PATH. If you want to use x86_64 compiler, alter PATH (and possibly INCLUDE, LIB and LIBPATH) environment variables for x86_64 compiler to be available, and then run qmake.

Categories : Osx

Apache permissions, PHP file create on Arch Lamp Setup
It is not possible to create directories (folders) with file_put_contents. See PHP, Creating a folder when I run file_put_contents()

Categories : PHP

gcc inline assembler implicit function declaration on Powerpc arch
According to the C standard (appendix J.5.10), asm is a common language extension. In gcc it is disallowed (together with all gcc extensions), if you use a flag like -std=c90, -std=c99 or -ansi. If you want C99 with gcc extensions, use -std=gnu99 instead.

Categories : C

Pthread support for Power arch in Codesourcery toolchain on Windows
If you want pthreads then @ams is probably right and you mixed up bare metal and Linux platforms. You probably want the Windows host Power GNU/Linux toolchain: https://sourcery.mentor.com/GNUToolchain/release1785 newlib is used only on the bare-metal toolchain variants and since the EABI variant is intended for bare-metal applications there is not a pthread implementation.

Categories : Misc

suspend thread for a second in C
I assume you are on Linux. Please read Advanced Linux Programming. You want to use the sleep(3) function (or the nanosleep(2) syscall). You probably need to learn also about multiplexing syscalls like poll(2) See also intro(2) man page.

Categories : C

Is there any method to wait until task catch SIGALRM signal in intel arch?
Is this helpful? do { ret = sigtimedwait(&sigact.sa_mask, &pInfo, &pTimeout); } while (ret < 0 && errno == EINTR); Similar question.

Categories : C

Threads suspend resume c#
You should never use suspend/resume, be it in Java or C#, because only your threads know when it's safe to stop or suspend. Instead use synchronization primitives like events to control the execution of a thread. Here is a little sample using WinForms (so you just need to add a reference to System.Windows.Forms): using System.Threading; using System.Windows.Forms; using System; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { Label label = new Label { Dock = DockStyle.Top }; Button button = new Button { Text = "||", Dock = DockStyle.Bottom }; Form form = new Form(); form.Controls.Add(label); form.Controls.Add(button); bool @continue = true; boo

Categories : C#

ValidateError Error occurred while validating the field(s) arch: Invalid XML for View Architecture!?
Many mistakes in your code, syntax and logical. why you write 'mymodule_menu.xml' this view in init, data, and demo and test, in version 7.0 init replace with data = [], and in init only include those file who will load at initiate time , demo are use for demo data, and test for testing file like yml _column use _columns you missed (s) in menu creation use three layer , first super parent, parent and menu child other wise it will not be clicable. to getting invalid xml error is because you have you missed 2. point _cloumn instead of _columns hope this help before going to develp first read openerp documentation in doc.openerp.com

Categories : Python

Apple Command Line Tool: Force Universal Binary with a Single Arch?
I was not able to find a switch to build the universal binary; and I was not able to track down the Xcode magic that Apple is performing. I did find you could build a non-universal binary (single architecture) and then run lipo to create the universal. $ make cryptest.exe clang++ -o cryptest.exe -DNDEBUG -g -Os -pipe -fPIC -arch armv7 --sysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -miphoneos-version-min=5.0 -DCRYPTOPP_DISABLE_ASM=1 bench.o bench2.o test.o validat1.o validat2.o validat3.o adhoc.o datatest.o regtest.o fipsalgt.o dlltest.o ./libcryptopp.a $ lipo -info cryptest.exe Non-fat file: cryptest.exe is architecture: armv7 $ lipo cryptest.exe -create -output cryptest.exe $ lipo -info cryptest.exe Architectures in

Categories : Iphone

How to Poweroff /suspend WinCE 6 device from C#
There's is no command line support to shutdown the WindowCE. you can use PInvoke the core.dll and call P/Invoke ExitWindowsEx [Flags] public enum ExitFlags { Reboot = 0x02, PowerOff = 0x08 } [DllImport("coredll")] public static extern int ExitWindowsEx(ExitFlags flags, int reserved); ... ExitWindowsEx(ExitFlags.PowerOff, 0); ----- Updated --------- Try with GwesPowerOffSystem it's for WinCE 5.0. This is exactly what you are looking for. It's in the same core dll file.

Categories : C#

iOS Reachability and app suspend/resume behavior
After app resumes, try this: //Reachability is the class from Apple's Reachability sample Reachability *reachability = [Reachability reachabilityForLocalWiFi]; NetworkStatus netStatus = [reachability currentReachabilityStatus]; if (netStatus == NotReachable) { NSLog(@"Not Reachable"); } else { NSLog(@"Reachable"); }

Categories : IOS

How to stop/suspend a form from painting in C#?
Several of the standard controls handle WM_SETREDRAW. They don't stop painting, they stop refreshing their window when, say, you add a new item or alter the text. This is not otherwise prescribed behavior, every control interprets that message the way it sees fit. The Form and Control classes do not have any logic built in that alters the way they draw. You will have to implement that yourself. You would not do so with a message handler (WndProc), you'd just add a public property of type bool. And, say, not paint anything in the OnPaint method when it is set to false. Etcetera. Preventing the parent from redrawing itself is not okay, it isn't clear why you are contemplating this.

Categories : C#

How to prevent a script being stopped by suspend?
Even in sleep mode S1 (your "suspend" I think), the CPU(s) stop executing instructions. So your program is no longer running -- hence cannot wake-up your computer... You will certainly have to explore other ways of doing, such as configuring the real-time clock (which is still powered at sleep) to wake-up the computer. On embedded systems, you also have access to an hardware watchdog that could be (miss)used for that purpose. Don't know if this is available on PC.

Categories : Python

Suspend Javascript execution in UIWebView
Do you need a full UIWebView? If not you could just invoke JavaScriptCore directly. - (NSString *)runJS:(NSString *)aJSString { JSContextRef ctx = JSGlobalContextCreate(NULL); JSStringRef scriptJS = JSStringCreateWithUTF8CString([aJSString UTF8String]); JSValueRef exception = NULL; JSValueRef result = JSEvaluateScript([self JSContext], scriptJS, NULL, NULL, 0, &exception); JSGlobalContextRelease(ctx); ... This would give you more control over the entire JS runtime, but unfortunately I've not found an API to suspend execution of timers other than releasing the whole context. For a more complete example of how to use JavaScriptCore see https://github.com/jfahrenkrug/AddressBookSpy/blob/master/AddressBookSpy/AddressBookSpy/ABSEngine.m

Categories : Javascript

how set suspend an application automatically ? for security purpose
You can use SharedPreferences to keep track of login attempts and check this value each time the login Activity starts. If it equals 6, or whatever number you choose, then show a Dialog informing the user of the issue and how to fix (or however you want to handle that). In the Dialog you can have one Button which on click it closes the Application (just call finish() on that Activity. Each time the login fails just add 1 to the previous value of that SharedPreference. If this isn't what you need then, as CommonsWare said, " define what you mean by 'suspend'"

Categories : Android

Suspend browsing while AJAX scripts are running?
You cannot suspend browsing per-se, but you can cough up a decent looking 'wait, loading' block on top of a full-page shadow that warns the user that things are happening. That, or disable every href on the page via javascript, which is hardly advisable. :) Other than that, you have no control over the client whatsoever. P.S.: If by "dialog" you mean an alert, kill that thought with fire immediately.

Categories : Ajax

"Suspend" execution, but keep event handlers running?
It seems like you're trying to create a service. To do that, the easiest way is probably to create a new project based on the "Windows Service" template and migrate your existing code. MSDN docs: http://msdn.microsoft.com/en-us/library/d56de412.aspx

Categories : Vb.Net

Can printf suspend after printing half the contents
printf ultimately calls write(). If the write() system call returns a -1 because the system call received EINTR, for example, then it is possible for some data to have been written. However, the tty (screen) is line buffered. This means nothing appears on the screen until a character is placed on the output stream. The EINTR would happen on a system that is being really hammered by I/O, for example. Because write() is not guaranteed to complete, it can be interrupted. So, I do not get what you are seeing. What problem do you see?

Categories : C

Does SQL Server 2008 Log Truncation suspend transactions
I've found this article, which states that a transaction can not be deleted if the records mentioned in the logs are still active. So the answer to your question is No, Transaction log back up or truncation wont suspend the active transactions. Here is the link http://msdn.microsoft.com/en-us/library/ms345414(v=sql.105).aspx

Categories : SQL

which signal can be used to suspend process temporary in linx
SIGSTOP stops a process, and SIGCONT resumes it (not SIGINT) A process that is stopped by SIGSTOP can not be set to resume on receiving a certain key, because it isn't processing anything while it is stopped, but a parent or another process could be programmed to continue a child on receiving a key...

Categories : Linux

Eclipse suspend a specific thread while letting others run
If you have a convenient point in your code to set a breakpoint for that single thread, you can change the Suspend Policy of that breakpoint in its properties to only stop the current thread instead of the whole VM.

Categories : Java

How can I run my shell script once the device wakeup from suspend mode?
You could try run a watchdog like script, checking if the application is running in a loop and restarting it when needed. In standby the watchdog script will stop and on resume it will restart your application.

Categories : Linux

How to suspend/resume a progress based on the scheduled time?
I assume that the scheduling application you show above persists that information to a file. If so, you can do the following. First, the process that you want to execute must have some way of being told that it needs to shut down. I'll assume that it's some kind of Windows event or a flag in a file or database somewhere that it checks periodically. If you don't have this facility, then you'll have a tough time killing the task safely. Have a small application (call it the Keeper) that reads the schedule from the file. It then checks to see if the program you're scheduling is running. If it is running and it's time to pause, then send the signal telling it to stop. Then, create a scheduled task to restart the program at the next start time. Also create a scheduled task to make the Keeper

Categories : C#

Does QMutex need to be static so other threads calls of this class instance know to suspend their operations?
No it doesn't need to be static, just make it a member in your classA and also you can take a look at QMutexLocker to scope lock and unlock the mutex: void classA::Append(int _msg) { static int c = 0; QMutexLocker locker(&mutex); // mutex is a QMutex member in your class intArray[c] = _msg; c++; /*mutex.unlock(); this unlock is not needed anymore, because QMutexLocker unlocks the mutex when the locker scope ends, this very useful especially if you have conditional and return statements in your function*/ }

Categories : C++

do we need to add provision at server end so that file downloading in browser can give facility for suspend and resume?
If you want to support suspend and resume, you'll need to add support for partial GETs, also referred to support for ranges or range headers. RFC2616 (section 14.35) has the details on how to handle range requests. http://tools.ietf.org/html/rfc2616#section-14.35 Tomcat's default servlet has an implementation you can use as a starting point if you wish. http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java?view=annotate

Categories : Java

Package failing to pass R CMD check 'package is not installed for arch =i386', any reason why this would happen?
A hunch: You are on Windows (or another OS which by default runs multi-arch like OS X), you are trying to run R CMD check and it fails to check on one of its two sub-architectures for lack of a package you depend upon. Also note that R CMD check --no-multiarch ... is likely to help you here.

Categories : R

Have Griffon generate jnlp with resource tag with os attribute but no arch attribute
Currently there's no way to configure a flag to tell Griffon to avoid adding a value for the "arch" attribute. However, you can "hack" your local copy of the $GRIFFON_HOME/scripts/_GriffonPackage.groovy and modify line 600 https://github.com/griffon/griffon/blob/master/subprojects/griffon-scripts/src/main/groovy/_GriffonPackage.groovy#L600 Perhaps you'd like to open a JIRA ticket for the configuration flag? http://jira.codehaus.org/browse/griffon

Categories : Misc

Linux users', specifically Apache, permissions settings, [Linux noob :]
usually any daemon will need to access a number of ressources. it is therefore good practice to run each daemon under a special user:group, rather than nobody:nogroup. traditionally (e.g. on Debian systems) apache runs as www-data:www-data. finally, user permissions take precedence over group permissions (which in turn take precedence over other permissions). this means that a directory where the user does not have write perms but the user's group can write is effectively r/o for that user (but not for other members of the group)

Categories : Linux

Exec(Linux). How it functions internally? Linux executable attributes(rlimit)
The RLIMIT_CORE is used to place a limit on the amount of info that coredump is allowed to produce, before it is aborted. Once this limit is hit, no more info is logged and the message Aborting Core is logged to the console. From the man page of core : A process can set its soft RLIMIT_CORE resource limit to place an upper limit on the size of the core dump file that will be produced if it receives a "core dump" signal. Use setrlimit() to configure RLIMIT_CORE to a larger value to obtain complete coredumps. The most common format of executables/shared-objects is ELF. On Linux, the dynamic loading and linking of these shared-objects is performed by ld.so ld.so is loaded in the address space of a newly created process (by exec in this case) and executed first. This is possible as

Categories : Android

Purpose of Curly Brace Usage of C Code found in Linux (include/linux/list.h)?
This is a GNU language extension known as a statement expression; it's not standard C.

Categories : C

What's a good way to set up Closure Compiler on Linux? Or, where should Java .jar's live on a Linux?
If you using the java command directly, then you'll have to provide a path to the jar in question. It's probably easier to place the jar in one place and create a shell script that handles the invocation and jar path.

Categories : Java

Write C++ on Windows but use Linux System calls through a Linux emulator
You've already tagged your question with Cygwin. That seems like the best solution for what you want. Cygwin is basically a collection of programs which emulate a GNU/LInux environment through the use of a DLL (cygwin1.dll) which acts as a Linux API layer providing substantial Linux API functionality. Here's the link to the documentation for its API Edit: Most of the Cygwin source code that I've looked at is written in C++ and makes system calls using MS Windows API to do provide the *nix emulation. The source is well written and very readable (even to to a non-C++ programmer such as myself). I think using Cygwin would be a good transition from programming on Windows to a GNU/Linux environment.

Categories : C++

How to turn a Linux application in C/C++ into a Desktop Enviroment for a Linux distro?
You either want to create a boot loader, or you want to replace the 'shell'. This would be governed by per-user or global xinit and Xsession files.

Categories : C

Do i need to install mono on every Linux PC to run .NET application on Linux platform?
"can I run a mono application on a machine that doesn't have mono installed": no; the same as you can't run a java application on a machine that doesn't have java installed. And at the same time (to both): yes. There are tools that attempt to make this work, but they tend to be fiddly and a bit unreliable. However, it should also be noted that several (not all, by any means) distros ship with mono by default.

Categories : Dotnet

fedora linux --- compiling first linux module
As guido said, you have to match your current kernel and the kernel-devel package. To get your kernel version run uname -r I get 3.6.10-4.fc18.x86_64, download that kernel-devel version sudo yum install kernel-devel-3.6.10-4.fc18 Or update your system and boot with the new kernel, I believe those two will automatically match.

Categories : Linux



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