w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Xampp on linux mint
you need to execute the file (e.g. open a terminal, navigate to your Downloads folder and run bash xampp-linux-x64-1.8.3-0-installer.run (possibly it might need to be run otherwise, but thats my best guess)). alternatively you might be presented to run/execute the file (instead of displaying it). if so, choose this option. on the other hand, you might consider installing apache/php/mysql via your package manager.

Categories : Linux

How to install git-svn on Linux Mint 15 (Olivia)
Billy: You can check this documentation: http://community.linuxmint.com/software/view/git-svn http://git-scm.com/download/linux If this doesn't works, try this method instead: $which git $sudo apt-get install git-core $which git /usr/bin/git $git --version

Categories : GIT

How to make svn client on linux mint?
Do you have Subversion on your Linux box? If so, you should be able to just point to the URL of your Windows server, and do a checkout. If you don't have Subversion on your Linux box, you need to install it. Your Linux distro's package manager should have a release of Subversion you can use, and should be the first place to check. If you cannot use your distro's Subversion package, you can download a Subversion client from the Subversion Apache project. There's really not much to configuration you have to do for Subversion client to talk to a Subversion repository. You just need the URL of your Subversion server's repository. Do you know your Subversion repository URL?

Categories : Svn

Disable Linux Mint Alt-F1 shortcut
As CharliePrynn pointed out, superuser.com would be a better place for this question. I actually found the solution there: http://superuser.com/questions/531874/disable-alt-f1-keyboard-shortcut-in-cinnamon: gsettings set org.gnome.desktop.wm.keybindings panel-main-menu "[]" plus logout & login

Categories : Intellij Idea

Configuring Android to use in terminal for Linux Mint
If ADB is properly in your path, the android command should launch the SDK updater. Here is what I have in my .bashrc # SDK PATH=${PATH}:~/android-sdk/tools PATH=${PATH}:~/android-sdk/platform-tools

Categories : Android

GTK+-3.0-dev No Such File Or Directory on compile (Linux Mint/gcc)
OK, the guys over at linuxquestions got me straightened out. ` != ' (backtick is not the same as single quote) I should have used backticks instead of the quote, also could have used $() $ gcc simple.c -o simple $(pkg-config --args) I'll go read a manual on the command line... :/ as for the first problem (why pkg-config --libs gtk+-3.0) gave me a "package gtk+3.0 was not found in the pkg-config search path", I think I must have only had libgtk-3-dev installed and not installed gtk+3.0.

Categories : C

Segmentation fault when I call operator new in linux mint
1,000,000 probably should not fail on a modern desktop, so I expect you are blowing up elsewhere. To see what/where the problem is: $ gdb gdb> file ./a.out gdb> run <wait for crash> gdb> bt full If the allocation failed, you should see an uncaught bad_alloc exception. Otherwise, please post the source code and results of the backtrace.

Categories : C++

How to install Software Manager (from Linux Mint) in Xubuntu?
You will need to have the latest version of Python installed as this is what actually runs Software Manager then in Synaptic Program Manager look for Software Manager or Software Center and tick for installing an next reboot then apply then submit then reboot and when the system reboots the system should start downloading Software Manager and install it and then you should be able to find it in the start menu.

Categories : Misc

Linux Mint 15 refusing to boot after errorless install
No boot loader is installed in the MBR of /dev/sda http://wiredrevolution.com/system-administration/install-the-grub-boot-loader-to-the-mbr

Categories : Linux

Beautiful Soup has stopped working since Linux Mint Upgrade Python 2.7.4
I tried this code with BeautifulSoup 3 and it seems to work: In [1]: import BeautifulSoup In [2]: from urllib import urlopen In [3]: html = urlopen('http://www.gutenberg.org/files/82/82-h/82-h.htm').read() In [4]: soup = BeautifulSoup.BeautifulSoup(html) In [5]: len(soup('h2')) Out [5]: 58 Note that version 4 uses a different HTML parser under the hood and I remember reading somewhere that the 3 version can handle more. Maybe you can try version 4 with a different HTML parser.

Categories : Python

Why do I get the error "bash: ./a.out: Permission denied" when I execute a C program in Linux mint 15
I think, you are trying to run your program on an NTFS partition, different from the one on which Mint is installed. Try to compile the program in your ext4 partition and generate the a.out there. It should run.

Categories : C

Facebook sdk 3.0 where set the permision?
Below is the complete response you get from the Response object in onCompleted callback method. Check if response is not null (for safety), then you can parse the JSON response and get email id from it. Permission "email" is valid as you have done here: PERMS.add("read_stream"); PERMS.add("email"); // -- valid permission As printed in log like this: Log.i("fb_response", response.toString()); {Response: responseCode: 200, graphObject: GraphObject{graphObjectClass=GraphObject, state={"work":[{"employer":{"id":"some_number","name":"some_name"}}],"location":{"id":"some_id","name":"ab, cd"},"middle_name":"name","locale":"en_US","link":"https://www.facebook.com/link_to_your_profile","education":[{"type":"unknown","school":{"id":"some_id","name":"school_name"}}],"updated_time":"2013-07-31T

Categories : Android

What is the execution order of global filters MVC 4
In this MSDN article scroll down to the Filter Order section. There are the Order and Scope properties that allow you to control the execution order.

Categories : Asp Net Mvc

Pthreads update on global 2D array segfaults on execution
I haven't read your code yet, but I saw "I have not implemented blocking of any kind because there are no Write/Write conflicts", That's a MAJOR red flag to me. If you have Read/Write conflicts, then... well... you have conflicts. That's probably related to the bug. The only time it's valid is if you have std::atomic variables or volatile variables, and a quick CTRL+F says you have neither. Your code is probably not synchronizing at all, and thus threads are never seeing the values that the other threads are writing.

Categories : C

Hoare partition : is this implementation more/less efficient than the standard partition algorithm?
I always prefer the standard Hoare's implementation. If you look at it, it is not very intuitive, but it has a visible advantage: Less number of swaps. While your implementation effectively always does exactly N comparisons and N swaps, the Hoare's implementation does only N comparisons, but it does not swap anything if it is not needed. The difference is significant in some scenarios. At first in a case you use environment where swaps or assignment of variables/objects is a costy operation. For example if you use C/C++ with arrays of objects. Another typical examples where Hoare's partition implementation performs better if when many of the items in your array are of the same value or when the array is almost sorted and needs just to swap a few items. In that cases Hoare's version perfor

Categories : Matlab

After new partition gets created insert partition info in another table through trigger
You can do it with DDL Trigers. Check out this link One important note from the author you should consider adding a partition is not DDL if Oracle decides to do it internally, it’s only DDL if it’s an end-user statement Implicit partition creation is a new feature of 11g and it reffers to the interval partition option.

Categories : Oracle

how to get linux command execution result or message
The return value will be the string if the command is executed success without any error. If execution have error, the return value is null. You have to check the shell_exec() return value like $t = shell_exec($cmd); if($t === null) echo "error"; else echo "success"; from the ajax return value you can come to know the result. hope it will help.

Categories : PHP

Gradle: Execution failed for task on Linux
So after some digging around I figured it out: my linux system didn't have the right 32bit libraries installed. when I ran the following command I found which libraries were missing: linux-t1h0:/opt/gradle/latest # ldd /opt/intellij/android_studio/v.2/sdk/build-tools/android-4.2.2/aapt linux-gate.so.1 (0xf7760000) librt.so.1 => /lib/librt.so.1 (0xf773e000) libdl.so.2 => /lib/libdl.so.2 (0xf7739000) libpthread.so.0 => /lib/libpthread.so.0 (0xf771e000) libz.so.1 => /lib/libz.so.1 (0xf7707000) libstdc++.so.6 => not found libm.so.6 => /lib/libm.so.6 (0xf76c3000) libgcc_s.so.1 => not found libc.so.6 => /lib/libc.so.6 (0xf750e000) /lib/ld-linux.so.2 (0xf7761000) BTW, look at the log file at ~/.AndroidStudioPreview/system/log/idea

Categories : Java

Linux Redhat Command Execution via executable files
Yes. Use BASH, the shell common to most Linux distributions. You will find the "Advanced BASH scripting Guide" useful.

Categories : Linux

When does I/O redirection occur relative to the execution of commands in the Linux shell?
You are correct; the I/O redirection takes place before the find command is executed, so the file file2.txt already exists (but is empty) when the find command is running. Therefore, the output of the find command will include file2.txt. It makes sense if you think about it. The redirection has to be done before find executes. You can't have it writing to the terminal first and then going to the file, even if there was a mechanism that allowed that.

Categories : Linux

Global text caret position in Linux
There is no such thing as a caret position in X11. While the older UIM framework did a fairly good job of displaying the input method UI near the cursor position, this failed often enough that it was abandoned. You might want to take a look at the SCIM framework. Note that it is usually preferred to hint the application at the completion state rather than provide a separate editor, as this gives a more seamless integration.

Categories : Python

Linux C processes pids global visibility
Create a file with the parent process and write pids of all children. Read this file from the children after some delay. You can write out, N, the number of children first and then N lines each line containing one pid.

Categories : C

Single copy of global variables in Linux shared library
Both B and C are used by A, and I would expect each to have its own instance of the global variable Your expectations are wrong. What you are observing here is the correct and expected behaviour. If what you expect was true, every single library out there would face a problem quite similar to the infamous diamond class hierarchy. Can someone suggest a method to allow me having to different instances of the global variable in A? As far as I know, this is not possible in C++. If you want to use different variables, you have to define them separately and pass a reference to your function: // B void myFunc(int& myVar) { ++myVar; std::cout << myVar << " "; } // C int myGlobalC = 0; void someCFunc() { myFunc(myGlobalC); } // A int myGlobalA = 0; int mai

Categories : C++

How to get to last NTFS MFT record?
The MFT location isn't always fixed on the volume. You should get the starting MFT offset from the boot sector (sector 0 of the volume, you can find the structure online). The first file in the MFT is the "$MFT" file which is the file record for the entire MFT itself. You can parse the attributes of this file like any other file and get it's data run list. When you know the size of each fragment in clusters, parse the last cluster for each 1024 byte record of the last fragment (although I believe a fragmented MFT is rare). The last record in the MFT is the last record in that particular cluster marked "FILE0", if you encounter a null magic number that would be 1024 bytes too far. Or you can just get the file size from it's attributes and calculate the offset to the end of the MFT based o

Categories : Windows

How to remove an SVN global-ignore
You change your global-ignores in your configuration file, it will not ignore those files any more. Even if you do ignore a particular file, it can always be added into Subversion by simply doing svn add and specifying the ignored file. Files already in the repository are never ignored. The purpose of ignore is to prevent the accidental addition of a file if you specify svn add without specifying a file name, or if you do a svn status and see new files that have not been added. The global ignore list is a per-user setting. What you are ignoring isn't what your coworker is ignoring. Subversion also uses the svn:ignore property on files to mark files to ignore. svn:ignore works only on that directory, but for all users. For example, when I build a project, it creates a target directory wh

Categories : Svn

MySQL table Partition with FLOOR function (partition function not allowed)?
MySQL documents the partitioning functions here. The floor() function appears to have some special considerations. In this case, I think the issue might be that the division is returning a float/double result rather than a decimal result. This is easily fixed in your case because you do not need to do the division: CREATE TABLE `fact_events` ( `event_key` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `event_type_key` tinyint(3) unsigned NOT NULL, `analytic_file_id` bigint(20) unsigned NOT NULL, `sdk_session_id` bigint(20) unsigned NOT NULL, `virtual_button_create_id` bigint(20) unsigned NOT NULL, PRIMARY KEY (`event_key`), KEY `idx_events_event_type` (`event_type_key`) ) PARTITION BY RANGE(event_key) ( PARTITION p0 VALUES LESS THAN (0), PARTITION

Categories : Mysql

NTFS vs. File Share
Short answer: No. In Windows each file and directory has an ACL controlling access to it. Each file share also has an ACL controlling access to the share. When you access a remote file through a share you are doing so using the credentials used to login to the local computer. (You can connect using different credentials by entering a username/password when connecting). The remote computer tests the supplied credentials against the ACL on the share. Once you are past that, then every file you attempt to access on the remote machine through this connection will be checked using your credentials against the ACL on the file and the share. This allows a file share to offer more restricted access to some files than if the same user were attempt to access them locally. (So you could share file

Categories : Misc

jQuery remove() moves view to top of screen on execution
Like others in the comments mentioned, if you have an anchor element like: <a href="#" id="remove">Remove</a> By default pressing it would cause the behavior you're experiencing, a way to prevent it to do the following: $("#remove").on("click", function(e) { // do your stuff here ... // prevent the default behavior e.preventDefault(); });

Categories : Jquery

How can I remove need for these checking functions to be global
Here is a possible approach. You will have to decide whether it is more readable/maintainable/etc. # check nested json import collections from functools import reduce import datetime #this is json from GET session myjson = { "accessed": "Wed, 31 Jul 2013 13:03:38 GMT", "created": "Wed, 31 Jul 2013 13:03:38 GMT", "dnUrls": [ "http://135.86.180.69:8580/ucc/api/v1/session/dns/50000" ], "expires": "Wed, 31 Jul 2013 13:03:48 GMT", "modified": "Wed, 31 Jul 2013 13:03:38 GMT", "name": "KW50000", "person": { "employeeId": "KW50000", "firstName": "KW50000", "lastName": "Dev5" }, "previewRedirect": { "destination": "", "enabled": False, "setupEnabled": False } } # returns dictionary with key= fiel

Categories : Python

NTFS - file record size
It's not actually that much of a waste. You should try to look at what happens when the number of attributes stored in the file record exceeds 1 KB. (by adding additional file names, streams, etc.) It is not clear (to me at least) for different versions of NTFS if the additional attributes are stored in the data section of the volume or in another File Record. In previous versions of NTFS the size of a MFT File Record was equal to the size of a cluster (generally 4KB) which was a waste of space since sometimes all the attributes would take less than 1 KB of space. Since NT 5.0 (I may be wrong), after some research, Microsoft decided that all MFT File Records should be 1KB. So, one reason for storing that number may be backwards compatibility. Imagine you found an old hard drive which stil

Categories : File

NTFS Journal USN_REASON_HARD_LINK_CHANGE event
As always with the USN, I expect you'll need to go through a bit of trial and error to get it to work right. These observations/guesses may, I hope, be helpful: When the last hard link to a file is deleted, the file is deleted; so if the last hard link has been removed you should see USN_REASON_FILE_DELETE instead of USN_REASON_HARD_LINK_CHANGE. I believe that each reference number refers to a file (or directory, but NTFS doesn't support multiple hard links to directories AFAIK) rather than to a hard link. So immediately after the event is recorded, at least, the file reference number should still be valid, and point to another name for the file. If the file still exists, you can look it up by reference number and use FindFirstFileNameW and friends to find the current links. Comparin

Categories : Windows

What is the difference between HDFS and NTFS and FAT32?
... Because NTFS and FAT aren't Distributed. The advantage of HDFS is that it is. See the HDFS Introduction.

Categories : Hadoop

Viewing Ciphertext of Encrypted File on NTFS (EFS)
The way you open an encrypted file in order to read its raw encrypted contents (e.g. for a backup/restore application) is to use the: OpenEncryptedFileRaw, ReadEncryptedFileRaw, WriteEncryptedFileRaw, and CloseEncryptedFileRaw api functions. Writing the code on the fly, in a hypothetical hybrid language: void ExportEncryptedFileToStream(String filename, Stream targetStream) { Pointer context; res = OpenEncryptedFileRaw("C:UsersIanwallet.dat", 0, ref context); if (res <> ERROR_SUCCESS) RaiseWin32Error(res); try { res = ReadEncryptedFileRaw(exportCallback, null, context); if (res != ERROR_SUCCESS) RaiseWin32Error(res); } finally { CloseEncryptedFileRaw(context) } } function ExportCallback(pbData: PBYTE, pvCallbackCo

Categories : Windows

can we remove wait using while loop with anything else for global variable of thread?
If you remove the while loops in threadfunc1 and threadfunc2, then the threads would return and not proceed. So, you most certainly need a way for the thread to remain alive till it completes its computation of the series (10, in this case). Here is a sample code that shows trying to co-ordinate between the main thread and the two threads. With the pthread_cond_wait(), the wait moves from a simple "while" loop to the pthread_cond_wait(). #include <stdio.h> #include <pthread.h> //Values to calculate int x1 = 0, x2 = 0; //Values for condition int cond1 = 0, cond2 = 0; static pthread_mutex_t m1 = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t m2 = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t c = PTHREAD_COND_INITIALIZER; void *threadfunc1(void *parm) { int i = 0;

Categories : C

Python: Refactor code to remove global variable
something like this: def game(correct=0): nums = gen_randoms(lower, higher) this_equation = gen_equation(nums) gen_answer = evaluate(this_equation) correct = compare_answers(gen_answer, game, correct) game(correct)

Categories : Python

access to ntfs stream for a very long filename fails
As the very helpful page on CreateFile says referring to the lpFileName parameter which specifies the filename: In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, call the Unicode version of the function and prepend "?" to the path. Since you are contemplating BackupRead obviously you are wanting to access this stream programatically. If so, test things programatically. Trying all these operations from the command prompt is a crap-shoot and will not establish anything more than the ability to perform such operations from the command prompt. With that in mind, let's try this simple program - boilerplate code removed: #include "stdafx.h" int APIENTRY _tWinMain(HINSTANCE, HINSTAN

Categories : Windows

NTFS sparse file data runs ($UsnJrnl)
No, it means that $UsnJrnl occupies 2576 clusters on disk. Sparse clusters don't occupy any space on disk, if you'd try to read sparse cluster, e.g. cluster 10 in your example, NTFS just returns zeros. Generally, you can't determine start and end cluster of the file, since files can be fragmented - your example says that first 1408 clusters are not allocated on disk at all, then 128 clusters of that file occupy disk clusters 510119 - 510247, then 2448 clusters of the file occupy disk clusters 256 - 2704; so in this case you can't say that file begins by cluster X (on disk) and ends by cluster Y (on disk) - it's possible only if file is not fragmented (when it uses only one cluster run).

Categories : Windows

How does NTFS handle the conflict of short file names?
NTFS won't create two short names like that. The first will be THISIS~1.txt and the second will be THISIS~2.txt. For example, open a command prompt and from the root of C: drive type C:>dir prog* /x /ad<Enter> On a Windows 7 64-bit system you will see output similar to this 03/28/2013 12:24 PM <DIR> PROGRA~1 Program Files 07/31/2013 11:09 AM <DIR> PROGRA~2 Program Files (x86) 12/10/2012 05:30 PM <DIR> PROGRA~3 ProgramData

Categories : Windows

How to remove ^M ^J characters in linux
You're just reading blocks of 300 characters, so there is no string termination . You'll have to look at n to see how much data you have read and then process the data before printing it i.e. look for the ^J^M and terminate the line,then continue reading the rest of the data. FYI ^J^M is Windows line termination (it's just ^J form linux) The following should read multiple messages and convert ^ and J to and ignore ^M. Note this uses STDIN, not a serial port. #include <stdio.h> #include <unistd.h> int main(int argc, char** argv) { int fd=STDIN_FILENO; int i,n; int c=0; char buff[300]; memset(buff, 0, sizeof(buff)); for (;;) { n=read(fd,buff,sizeof(buff)); for (i=0; i<n; i++) { switch(buff[i])

Categories : C

How to make Gradle stop trying to chmod MANIFEST.MF on an NTFS drive
Gradle is trying to set default permissions for that file, and I can't see a way to stop it from doing that. (You could make it set different permissions, but I guess that won't help.) Under Windows/NTFS this normally works just fine, so it might be a problem with you Linux NTFS driver or configuration.

Categories : Linux



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